Skip to content
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

Error: "Failed: keyNotFound(base: "Linear", key: "weight")" for Qwen LLMs with mlx-swift 0.21.3 #210

Open
adrgrondin opened this issue Feb 21, 2025 · 1 comment

Comments

@adrgrondin
Copy link

I updated the project to use mlx-swift 0.21.3 and it broke the Qwen LLMs. It seems that is started with this commit on mlx-swift with the changes to MLXNN/Module.swift.

Here is the error I'm getting:
Failed: keyNotFound(base: "Linear", key: "weight")

And the model tested:
mlx-community/Qwen1.5-0.5B-Chat-4bit
mlx-community/Qwen2.5-7B-Instruct-4bit
mlx-community/Qwen2.5-1.5B-Instruct-4bit

Not sure if it can be fixed by updating the implementation in this repo or an update to mlx-swift is needed but thought I would create this issue if someone with more knowledge knows what's going on.

Thanks to all the maintainer of this project. It's amazing!

@rudrankriyam
Copy link
Contributor

Mentioned here: ml-explore/mlx-swift#195

For now, I downgraded to 0.21.2 in a fork of mlx-swift-example

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

No branches or pull requests

2 participants