-
Notifications
You must be signed in to change notification settings - Fork 452
Add Qwen3 Audio Encoder #2952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Qwen3 Audio Encoder #2952
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
580f4a2 to
875e674
Compare
9bbf2b0 to
ccb87ed
Compare
ccb87ed to
e4d6942
Compare
| return embeddings | ||
|
|
||
|
|
||
| class AudioEncoder(nnx.Module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing it as NNX!
|
|
||
| if audio_embeddings is not None and cfg.use_audio: | ||
| if cfg.model_name in ["qwen3-omni-30b-a3b"]: | ||
| y = multimodal_utils.merge_mm_embeddings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it support "video/audio interleaving" at the moment? Or it's in following PRs?
| image_embeddings=image_embeddings, | ||
| image_masks=encoder_image_masks, | ||
| audio_embeddings=audio_embeddings, | ||
| audio_masks=audio_masks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we can consolidate all multimodal inputs into a class and pass this single variable to the model. But that can be a follow up later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to this!
| config: Config | ||
| proj1: DenseGeneral | ||
| proj2: DenseGeneral |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these three lines necessary?
| self, | ||
| hidden_states: Array, | ||
| deterministic: bool = False, | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add an input/output shape comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you prefer to create this standalone check, or merge it with https://github.com/AI-Hypercomputer/maxtext/blob/main/tests/check_qwen3_embedding_vs_reference.py?
|
Thank you for the great work! |
NicoGrande
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| image_embeddings=image_embeddings, | ||
| image_masks=encoder_image_masks, | ||
| audio_embeddings=audio_embeddings, | ||
| audio_masks=audio_masks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to this!
Description
Original author @eitanporat in #2726
Revise according to the original PR comments:
Tests
tests/check_qwen3_omni_audio_vs_reference.py all pass
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.