Skip to content

Updating Add qwen3 (PR 2903) to use HF weights #2930

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

Merged
merged 22 commits into from
May 2, 2025

Conversation

greenrazer
Copy link
Collaborator

@greenrazer greenrazer commented Apr 29, 2025

Builds off of @maximizemaxwell 's PR, who wrote it before the weights were released.

This PR:

  • Loads the weights
  • Fixes modeling code
  • Adds Multiple Qwen3 models to the qwen example.

Issues 2025/4/28

  • Qwen3 doesn't work with qwen example code by default
  • Qwen3 modeling code needs slight rework

@EricLBuehler
Copy link
Member

@greenrazer looks like the MoE model has the same architecture as the dense one and the MoE block from the V2!

@greenrazer greenrazer marked this pull request as ready for review April 30, 2025 00:09
@greenrazer
Copy link
Collaborator Author

greenrazer commented Apr 30, 2025

I couldn't test the MoE model completely because it couldn't run on my computer. So if anyone has a beefier rig that'd be great :).

Also the Model never terminates. I tried adding an EOS token to <im_end>. It's probably an issue with rotary embeddings like last time. I'll have to take a look later.

@EricLBuehler
Copy link
Member

I couldn't test the MoE model completely because it couldn't run on my computer. So if anyone has a beefier rig that'd be great :).

Will test!

@EricLBuehler
Copy link
Member

EricLBuehler commented Apr 30, 2025

I couldn't test the MoE model completely because it couldn't run on my computer. So if anyone has a beefier rig that'd be great :).

Will test!

@greenrazer seems that it is indeed broken for the MoE, while the dense model roughly works. Let me know if there is any information you need.

@greenrazer
Copy link
Collaborator Author

greenrazer commented Apr 30, 2025

I couldn't test the MoE model completely because it couldn't run on my computer. So if anyone has a beefier rig that'd be great :).

Will test!

@greenrazer seems that it is indeed broken for the MoE, while the dense model roughly works. Let me know if there is any information you need.

Thank you @EricLBuehler!

Since the MoE model isn’t currently working and I don’t have the resources to debug it efficiently, I’m planning to remove it from this PR and move it to a draft instead. That way, someone else can build on it if they’d like, or I can revisit it later, especially if smaller MoE variants are released.

Edit:

PR here #2934

@greenrazer greenrazer mentioned this pull request Apr 30, 2025
@LaurentMazare LaurentMazare merged commit 1fdfb58 into huggingface:main May 2, 2025
9 checks passed
@greenrazer greenrazer deleted the add-qwen branch May 6, 2025 20:16
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.

5 participants