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

Add phi3 support #481

Merged
merged 3 commits into from
Jun 8, 2024
Merged

Add phi3 support #481

merged 3 commits into from
Jun 8, 2024

Conversation

pprp
Copy link
Contributor

@pprp pprp commented May 13, 2024

@casper-hansen Thank you for your invitation.

This PR introduces the support for phi3 for autoawq.

Due to the fact that the phi3 hasn't been released to transformer package, I conducted experiments on the development branch, a.k.a 4.41.0.dev0

I conducted experiments on RTX4090 and evaluated the perpelexity of the quantized phi3 (microsoft/Phi-3-mini-128k-instruct).

image

@umangkeshri
Copy link

Hey @pprp, I was trying to use these code changes for Phi-3 quantization for my use case, and getting below warning is it expected?
Token indices sequence length is longer than the specified maximum sequence length for this model (8322 > 4096). Running this sequence through the model will result in indexing errors

@vackosar
Copy link

vackosar commented Jun 3, 2024

@pprp This pull request is waiting for a review?

@vackosar vackosar mentioned this pull request Jun 3, 2024
@pprp
Copy link
Contributor Author

pprp commented Jun 3, 2024

@vackosar Yes, or you can review until the phi-3 is formally supported by transformers library.

@stan-hua
Copy link

stan-hua commented Jun 7, 2024

Hey @pprp, great job with the implementation! Would it possible to also add support for Phi-3-small at this time?

Phi-3-Small isn't implemented in transformers yet, but it is available in the HF repo. For example, Phi-3-small-8k-instruct

https://huggingface.co/microsoft/Phi-3-small-128k-instruct/blob/main/modeling_phi3_small.py

@casper-hansen casper-hansen merged commit 6a46ad6 into casper-hansen:main Jun 8, 2024
@casper-hansen
Copy link
Owner

Sorry for taking so long. I was away for a month, but I'm back now.

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