Skip to content

Adding attention bias input to Multi Head Attention parser#4680

Open
urpetkov-amd wants to merge 12 commits intodevelopfrom
multihead_attention_bias
Open

Adding attention bias input to Multi Head Attention parser#4680
urpetkov-amd wants to merge 12 commits intodevelopfrom
multihead_attention_bias

Conversation

@urpetkov-amd
Copy link
Collaborator

@urpetkov-amd urpetkov-amd commented Mar 17, 2026

Motivation

PR has been created as separate PR desired from this PR: #4637
Adding attention bias as new input for MultiHeadAttention parser in order to support some models.

Technical Details

Added attention bias in parse_multi_head_attention.cpp
Added tests covering bias and attention bias changes

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

@urpetkov-amd urpetkov-amd requested a review from causten as a code owner March 17, 2026 15:52
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4680      +/-   ##
===========================================
+ Coverage    92.27%   92.28%   +0.01%     
===========================================
  Files          578      578              
  Lines        28541    28561      +20     
===========================================
+ Hits         26335    26355      +20     
  Misses        2206     2206              
Files with missing lines Coverage Δ
src/onnx/parse_multi_head_attention.cpp 98.44% <100.00%> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@TedThemistokleous TedThemistokleous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good here. Just add a test for verify something simple just take the gold values from a working test and then bias the kv inputs or generate a verify case for the added bias to ensure we don't get regressions if something changes. Otherwise looks good.

@urpetkov-amd
Copy link
Collaborator Author

urpetkov-amd commented Mar 20, 2026

@TedThemistokleous Tests have been added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants