Skip to content

Adding Support for Qwen3.5 & Qwen3.5 MoE (Vision)#120

Merged
davidkoski merged 5 commits intoml-explore:mainfrom
johnmai-dev:qwen3_5_vision
Mar 2, 2026
Merged

Adding Support for Qwen3.5 & Qwen3.5 MoE (Vision)#120
davidkoski merged 5 commits intoml-explore:mainfrom
johnmai-dev:qwen3_5_vision

Conversation

@johnmai-dev
Copy link
Contributor

@johnmai-dev johnmai-dev commented Feb 25, 2026

Proposed changes

  1. Add Qwen3.5 and Qwen3.5 MoE (Vision)
  2. Skip sanitize when metadata.format == "mlx" to avoid reapplying HF-only transforms (e.g., norm + 1) that cause gibberish output. https://github.com/Blaizzy/mlx-vlm/blob/a673abf2e91c0afbb0fd53d8cf6cd7eda9bd487f/mlx_vlm/utils.py#L215

Ported

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

@johnmai-dev
Copy link
Contributor Author

mlx-community/Qwen3.5-27B-4bit

iShot_2026-02-25_16 49 58

mlx-community/Qwen3.5-35B-A3B-4bit

iShot_2026-02-25_15 57 20

@johnmai-dev johnmai-dev changed the title Add Qwen3.5 and Qwen3.5 MoE (Vision) Adding Support for Qwen3.5 & Qwen3.5 MoE (Vision) Feb 25, 2026
@tpae
Copy link
Contributor

tpae commented Feb 27, 2026

Would love this to be merged soon @davidkoski 🙏

Copy link
Collaborator

@davidkoski davidkoski left a comment

Choose a reason for hiding this comment

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

The new models look good but see my question on the weight loading and let me know what you think.

@johnmai-dev
Copy link
Contributor Author

Qwen/Qwen3.5-0.8B

Xcode 2026-03-02 22 08 37

@johnmai-dev
Copy link
Contributor Author

The new models look good but see my question on the weight loading and let me know what you think.

Previously, I referred to the implementation at Blaizzy/mlx-vlm -> utils.py/#L215, and at first I thought it was necessary to keep the logic consistent with mlx-vlm.

After reading your suggestion, I’ve already used loadArraysAndMetadata.

@johnmai-dev johnmai-dev requested a review from davidkoski March 2, 2026 15:24
@johnmai-dev
Copy link
Contributor Author

performance optimization

Before

Xcode 2026-03-02 23 41 35

After

Xcode 2026-03-03 00 03 49

@ronaldmannak
Copy link
Contributor

Am I the only one checking the status of this PR every few hours? Can't wait @johnmai-dev :)

@johnmai-dev
Copy link
Contributor Author

Am I the only one checking the status of this PR every few hours? Can't wait @johnmai-dev :)

haha,I can't wait too!This PR is ready.❤️

Copy link
Collaborator

@davidkoski davidkoski left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@davidkoski davidkoski merged commit 7da3344 into ml-explore:main Mar 2, 2026
2 checks passed
viktike pushed a commit to viktike/mlx-swift-lm that referenced this pull request Mar 7, 2026
* Add Qwen3.5 and Qwen3.5 MoE (Vision)
* Use `loadArraysAndMetadata`
* performance optimization
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.

4 participants