Skip to content

Fix bug in MultiHeadAttention - #40

Merged
senstella merged 1 commit into
senstella:masterfrom
namgyaaal:master
Oct 3, 2025
Merged

Fix bug in MultiHeadAttention#40
senstella merged 1 commit into
senstella:masterfrom
namgyaaal:master

Conversation

@namgyaaal

Copy link
Copy Markdown
Contributor

Hello,

I'm using modules in this package for re-implementing Sortformer into MLX (and hopefully make adapter between canary and sortformer). I ran into this bug with MultiHeadAttention when writing the TransformerEncoder layer because n_feat wasn't set. Not sure if I was supposed to do something else in initializing them but I changed the forwarding.

@senstella

Copy link
Copy Markdown
Owner

Great catch! Current codebase doesn't utilize MultiHeadAttention directly, so I forgot to set self.n_feat in __init__. Thank you so much for fixing it!

@senstella
senstella merged commit 352a97b into senstella:master Oct 3, 2025
@namgyaaal

Copy link
Copy Markdown
Contributor Author

Great!

P.S., I know this is out of the scope of the repo but is there any desire to have sortformer models included? Think they would all fit in some sort of "mlx-NeMo-asr" library. Thanks.

@senstella

Copy link
Copy Markdown
Owner

Yeah, that'd be pretty awesome! In fact, I half-implemented Canary on #30 (kind of staled because of school stuffs, but I think I'll finish it someday). Sortformer would be nice too because they all share same Conformer architecture!

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.

2 participants