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

Support Phi 3 model #3550

Open
iseeyuan opened this issue May 8, 2024 · 5 comments
Open

Support Phi 3 model #3550

iseeyuan opened this issue May 8, 2024 · 5 comments
Assignees
Labels
high priority triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@iseeyuan
Copy link
Contributor

iseeyuan commented May 8, 2024

With limited memory on most of phones, there's community requests on supporting a model with a smaller size like Phi-3 mini. It may be supported out of box, but need to verification, evaluation and profiling.

@iseeyuan iseeyuan assigned iseeyuan and helunwencser and unassigned iseeyuan May 9, 2024
@pytorch-bot pytorch-bot bot added the triage review Items require an triage review label May 9, 2024
@iseeyuan iseeyuan added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module and removed triage review Items require an triage review labels May 9, 2024
@mikekgfb
Copy link
Contributor

Exciting. Can we try this in torchchat?

I was also looking at how to run a model on watchOS because -- we have iOS and macOS with ET now, so looking for the next exciting platform. And then... Max size: 75 MB ?!

This might be an interesting experiment. It may also be an exciting item for a community member to prototype!

@salykova
Copy link
Contributor

salykova commented May 16, 2024

@iseeyuan

in addition to Phi3, here is a list of some of the most popular tiny llms used within the open-source community:

  1. OpenElm https://huggingface.co/apple/OpenELM
  2. TinyLlama 1.1B https://github.com/jzhang38/TinyLlama
  3. StableLM 1.6B and 3B https://huggingface.co/stabilityai/stablelm-2-zephyr-1_6b https://huggingface.co/stabilityai/stablelm-2-1_6b-chat https://huggingface.co/stabilityai/stablelm-zephyr-3b
  4. RWKV 1.6B and 3B models https://huggingface.co/RWKV/rwkv-5-world-3b https://huggingface.co/RWKV/rwkv-6-world-3b https://huggingface.co/RWKV/rwkv-6-world-1b6 https://huggingface.co/RWKV/rwkv-5-world-1b5
  5. Qwen 1.8B and 4B models https://huggingface.co/Qwen/Qwen1.5-1.8B-Chat https://huggingface.co/Qwen/Qwen1.5-4B-Chat

Tinyllama should work out of the box since the same model architecture and the same tokenizer. TinyLlama is of particular interest because almost every mobile phone can run it

@helunwencser
Copy link

I am working on getting Phi-3 enabled via ExecuTorch. Will post here once I finish it. After that, we can try it on TorchChat as well.

@iseeyuan
Copy link
Contributor Author

@salykova Thank you for the list! We may picked Phi3 as it's relatively new and popular, but are definitely considering enabling other models. The long term goal is that we improve our infrastructure during the first couple of models, and the community can contribute to enabling other models using the infrastructure. With that said, you are welcome to enable other models and feel free to submit your PR!

@devYonz
Copy link

devYonz commented May 25, 2024

Would love to see 27tokens/s on mobile with Executorch and phi silica https://learn.microsoft.com/en-us/windows/ai/apis/phi-silica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

5 participants