Instructions to use ipihq/Phi-3-medium-128k-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ipihq/Phi-3-medium-128k-instruct with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ipihq/Phi-3-medium-128k-instruct") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use ipihq/Phi-3-medium-128k-instruct with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ipihq/Phi-3-medium-128k-instruct"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ipihq/Phi-3-medium-128k-instruct" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ipihq/Phi-3-medium-128k-instruct", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Commit History
-
Upload folder using huggingface_hub (#1)
Verified signature- 5e883ebbe7b8a86f352c33ab02daa44ba6c9a4852873045e41371d6352306046 (4723569c5eb01a7821a2412e40c6604c326cfc88) - ad9848b8da93e54e7e0cfc6b2d10ce3e567215a59d3dd05efcb84b19f68e2a2f (c2171607b62b50ed2366f2a47785d2fa28d3e4b5) - f8854bacf8f268fff7e4addf04ce7c60a6514c0380089736799ac966061d080d (9ad3a2e936a454510e0ba644928a1bd7a6fcf3b1) - f8203e9921f0b2217fdfff99a7601bb4749b2ef8f451f7599da5932573b2399f (23961157a8a3a30acc83aaa4a586c6a9422366f9) - bce33c2b6e699f8b30e130d1a711f9b540780e0c83462d9e5589d9bd1f5642ff (76056a26106afdda46532a75e4883fe1f1676a66) - 10e69e8e3805bb3679d28d894035854d3172aea04a6478b9adea7f42ca918f56 (0a9fda5eafda37100ee144f87793bb8896cd3604)df54019