Instructions to use Xylolabs/phi-4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Xylolabs/phi-4-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Xylolabs/phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Xylolabs/phi-4-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Xylolabs/phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Xylolabs/phi-4-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Xylolabs/phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Xylolabs/phi-4-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Xylolabs/phi-4-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Xylolabs/phi-4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xylolabs/phi-4-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xylolabs/phi-4-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Xylolabs/phi-4-GGUF:Q4_K_M
- Ollama
How to use Xylolabs/phi-4-GGUF with Ollama:
ollama run hf.co/Xylolabs/phi-4-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Xylolabs/phi-4-GGUF with Docker Model Runner:
docker model run hf.co/Xylolabs/phi-4-GGUF:Q4_K_M
- Lemonade
How to use Xylolabs/phi-4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Xylolabs/phi-4-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.phi-4-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Card: remove filler sentences (a sentence about our publication process, table-reading notes, reference-logit bookkeeping)
Browse files58 unmodified lines596061626364656621 unmodified lines888990919293941 unmodified line9697989910010110210358 unmodified lines| `Q5_K_M` | F32: 81, Q5_K: 121, Q6_K: 41 |Average bits count all stored parameters, including higher-precision tables and float32 operands. Existingcalibration results and original relative metadata labels remain; no dataset is included. No new training,calibration or quantization was performed for publication.## Quickstart21 unmodified linesPlain IQ4 loses `en-translate-ko` in raw correctness; imatrix IQ4 loses that item and `en-reason-weekday`.They are excluded from counted loss because the original BF16 top-two gap is below 1.0 at the first divergenttoken. Q5 gains `en-reason-ball`. These raw differences remain visible above. No reasoning exemption pardons aloss.The seven thinking-format rechecks score 0/7 for BF16 and every choice. They are inapplicable for this model1 unmodified lineThe original 16 matched 1,024-token English/Korean plain/chat sequences cover 16,280 positions. All originalsequence IDs, tokens, first scored positions, 33+7 prompts, stop IDs and generation budgets match, as does thecomplete calibration/evaluation fingerprint. The existing raw teacher equals every original stored PT slicewithout a new BF16 forward. Current llama.cpp GPU checks use context 8,192. Each candidate KL ratio is below1.5×, and the answer rule permits at most one more counted loss than the Q4 reference.The exact public Q5 CLI completes one query. These checks cover retained texts and prompts; an integration58 unmodified lines5960616263646521 unmodified lines878889909192931 unmodified line959697989910010158 unmodified lines| `Q5_K_M` | F32: 81, Q5_K: 121, Q6_K: 41 |Average bits count all stored parameters, including higher-precision tables and float32 operands. Existingcalibration results and original relative metadata labels remain; no dataset is included.## Quickstart21 unmodified linesPlain IQ4 loses `en-translate-ko` in raw correctness; imatrix IQ4 loses that item and `en-reason-weekday`.They are excluded from counted loss because the original BF16 top-two gap is below 1.0 at the first divergenttoken. Q5 gains `en-reason-ball`. No reasoning exemption pardons aloss.The seven thinking-format rechecks score 0/7 for BF16 and every choice. They are inapplicable for this model1 unmodified lineThe original 16 matched 1,024-token English/Korean plain/chat sequences cover 16,280 positions. All originalsequence IDs, tokens, first scored positions, 33+7 prompts, stop IDs and generation budgets match, as does thecomplete calibration/evaluation fingerprint. Current llama.cpp GPU checks use context 8,192. Each candidate KL ratio is below1.5×, and the answer rule permits at most one more counted loss than the Q4 reference.The exact public Q5 CLI completes one query. These checks cover retained texts and prompts; an integration
README.md+3-5