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

Phi model does not produce output on M3 #55

Open
jorgeantonio21 opened this issue May 4, 2024 · 4 comments
Open

Phi model does not produce output on M3 #55

jorgeantonio21 opened this issue May 4, 2024 · 4 comments

Comments

@jorgeantonio21
Copy link

Currently, I can't extract an output by running the phi3 example:

 % cargo run --release --features metal

\    Finished release [optimized] target(s) in 0.27s
     Running `/Users/jorgeantonio/dev/luminal/target/release/phi`
Defining graph           - 75ms
Compiling graph          - 4799ms
Loading model            - 3544ms
Processing Prompt        - 183ms (71.04 tok/s, 13 prompt tokens)
<|user|>
Please write me a python implementation of merge sort<|end|>
<|assistant|>


Average token generated in 46.66ms       - (21.43 tok/s)
@jorgeantonio21
Copy link
Author

jorgeantonio21 commented May 4, 2024

This issue is related to #51

@jafioti
Copy link
Owner

jafioti commented May 5, 2024

Does this still happen if you pull main branch? I believe for others this has been fixed. It may be the same issue with M3 that llama is facing

@jafioti
Copy link
Owner

jafioti commented May 5, 2024

I'm fairly certian the problem is the softmax kernel producing inf on your machine, which makes the logits come out NaN, and triggers the blank token to be outputted, which is why you see no output at all. I will be revisiting the softmax kernel today or tomorrow to fix this

@jorgeantonio21
Copy link
Author

jorgeantonio21 commented May 6, 2024

I pulled the main branch right now, and the problem persists.

Thank you so much @jafioti !

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