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

[QUESTION] Getting tensor error when running phi-2 on Mac metal: Error: cannot find tensor transformer.embd.wte.weight #1570

Closed
lgemc opened this issue Jan 12, 2024 · 6 comments

Comments

@lgemc
Copy link

lgemc commented Jan 12, 2024

rustc version: rustc 1.75.0
candle repo current commit: 4191518
operative system version: 14.1.2 (23B92)
computer version: Mac Pro m1

command executed:

 cargo run --example phi --release -- --model 2 \
  --prompt "A skier slides down a frictionless slope of height 40m and length 80m. What's the skier speed at the bottom?"
@lgemc lgemc changed the title [QUESTION] Getting tensor error when running on Mac metal: Error: cannot find tensor transformer.embd.wte.weight [QUESTION] Getting tensor error when running phi-2 on Mac metal: Error: cannot find tensor transformer.embd.wte.weight Jan 12, 2024
@LaurentMazare
Copy link
Collaborator

This was caused by a recent change in the naming conventions in the phi-2 tensors and should be fixed in #1572 .

@ivarflakstad
Copy link
Member

Error seems to be fixed for me 👍

@lgemc
Copy link
Author

lgemc commented Jan 15, 2024

confirmed, it was fixed after #1572

@lgemc lgemc closed this as completed Jan 15, 2024
@RangerMauve
Copy link

Does this mean the candle library won't be updating to the new naming conventions? I was trying to run TheBloke's phi-2.Q4_K_S.gguf working, but I'm getting this same error.

@ivarflakstad
Copy link
Member

I think supporting new naming conventions is a very reasonable feature. Want to make an issue for that specifically?😊

@RangerMauve
Copy link

@ivarflakstad I would love to but sadly I don't think I understand the file format to be able to open a coherent issue for it. Checking the various from_gguf methods hasn't helped me identify what the problem is. I'm also not sure where the error is even coming from in the candle codebase since doing a grep for the message isn't yielding results. 😅

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

4 participants