Run this model with HF Jobs

Run microsoft/phi-2 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-2. 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-2 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-2. 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-2. 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.

"Instruct: <prompt>\nOutput:" or "Instruction: <prompt>\nOutput:"

#60
by J22 - opened

The latter one seems better because Phi-2 likes to generate "Instruction: ...... ".

Or rather: Instruction: <prompt>\nOutput:\n.

J22 changed discussion status to closed
J22 changed discussion status to open
Microsoft org

Hello @J22 !

Thanks for providing the prompt. We will update the model card accordingly.

Regards,
Gustavo.

On a more specific use-case, I found this prompt worked when incorporating some context for RAG (Retrieval-Augmented Generation):
"Instruction: With this context\n\n{context}\n\nQuestion: {input}\nOutput:"

Where {context} is the set of excerpts and {input} is the question being asked.

Note: "Instruct" or "Instruction" worked the same.

On a more specific use-case, I found this prompt worked when incorporating some context for RAG (Retrieval-Augmented Generation):
"Instruction: With this context\n\n{context}\n\nQuestion: {input}\nOutput:"

Where {context} is the set of excerpts and {input} is the question being asked.

Note: "Instruct" or "Instruction" worked the same.

This works like a charm. TYSM. I thought I have to fine-tune it.

Glad it helped ardinursyamsu!

Sign up or log in to comment