Run this model with HF Jobs

Run microsoft/phi-1_5 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/microsoft/phi-1_5. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/microsoft/phi-1_5 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/microsoft/phi-1_5. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/microsoft/phi-1_5. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Inference time is much longer than reported

#25
by jeff-gao - opened

In the paper, it says the inference speed is < 3ms per token using a single A100-80G.
However when I test with the sample code on a single A100-80G, the inference speed is around 28ms per token. My torch version is 2.0.1.
May I know how to make the inference speed to be around 3ms?
Thank you very much!

jeff-gao changed discussion title from Inference speed is much longer than reported to Inference time is much longer than reported

Did you used DeepSpeed to run inference? I am not sure, but it seems that they used it as it is mentioned on the model card.

Microsoft org

Hello @jeff-gao !

This mismatch was caused by the absence of Flash-Attention in the model files. We opted to not add it at first to keep the implementation simple, but we plan in adding an option that uses such implementation to take advantage of faster inferences.

Hello @jeff-gao !

This mismatch was caused by the absence of Flash-Attention in the model files. We opted to not add it at first to keep the implementation simple, but we plan in adding an option that uses such implementation to take advantage of faster inferences.

Hello @gugarosa , thank you very much! Looking forward to your implementations !!!

Hey @jeff-gao - since at fp16 it takes only 3.16 GB VRAM, can we run 24 copies (approximately) of Phi 1.5 on an A100-80GB GPU?

If that is possible and 3ms per token is also achievable with flash attention - can we generate 7200 tokens (24 copies Γ— 300 tokens per second) per second on a A100-80GB GPU?

I'm a non-technical guy. Just asking out of curiosity. Thanks. πŸ™πŸΌ

gugarosa changed discussion status to closed

Sign up or log in to comment