1 versions
Phi-4 is a 14B parameter, state-of-the-art open model from Microsoft.
Install our magic
package manager:
curl -ssL https://magic.modular.com/ | bash
Then run the source
command that's printed in your terminal.
Install Max Pipelines in order to run this model.
magic global install max-pipelines
Start a local endpoint for phi4/14b:
max-serve serve --huggingface-repo-id unsloth/phi-4-GGUF
The endpoint is ready when you see the URI printed in your terminal:
Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Now open another terminal to send a request using curl
:
curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "phi4/14b",
"stream": true,
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the World Series in 2020?"}
]
}' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
' | sed 's/\n/
/g'
🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.
Phi-4 is a 14B parameter state-of-the-art open model built using synthetic datasets, filtered public domain website data, and acquired academic and Q&A datasets. It has been rigorously enhanced and aligned through supervised fine-tuning and direct preference optimization to ensure robust instruction adherence and safety.
Context length: 16k tokens
Phi-4 accelerates research on language models and serves as a foundation for generative AI applications. It is ideal for general-purpose systems requiring:
Phi-4 is not explicitly designed for all downstream applications. Developers should:
DETAILS
MODULAR GITHUB
ModularCREATED BY
unsloth
MODEL
unsloth/phi-4-GGUF
TAGS
@ Copyright - Modular Inc - 2024