huggingface / huggingface/candle

mlx-community/gemma-2-2b-it-4bit infer error

Open
#2,537 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
21.1k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

I am trying to infer mlx-community/gemma-2-2b-it-4bit using the candle-examples/gemma sample.
--------------------------
But the following error occurs:
Error: shape mismatch for model.embed_tokens.weight, expected: [256000, 2304], got: [256000, 288]

It's very difficult for me as I'm a beginner. Please help me.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the candle-examples/gemma sample and the mlx-community/gemma-2-2b-it-4bit model. Trace where model.embed_tokens.weight is loaded and compare the expected [256000, 2304] shape with the received [256000, 288] shape; done means establishing whether this model is supported and correcting the mismatch or documenting the incompatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.