phi-4

Microsoft Research

phi

The latest in the Phi model series: suitable for chats with a context of up to 16K tokens

Model info

Model

phi-4

Author

Microsoft Research

Arch

phi

Parameters

14B

Format

gguf

Size on disk

about 9.05 GB

Download and run phi-4

Open in LM Studio to view download options

Download phi-4 from the terminal

Download the model using lms — LM Studio's developer CLI.

lms get phi-4
If you don't have it yet, get it by running npx lmstudio install-cli

Call phi-4 from your code

curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phi-4",
    "messages": [
      { "role": "system", "content": "Always answer in rhymes." },
      { "role": "user", "content": "Introduce yourself." }
    ],
    "temperature": 0.7,
    "max_tokens": -1,
    "stream": true
  }'

Next Steps: Build! 🔨

Learn more