Instructions to use unsloth/Phi-4-mini-reasoning-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Phi-4-mini-reasoning-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/Phi-4-mini-reasoning-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/Phi-4-mini-reasoning-GGUF") model = AutoModelForCausalLM.from_pretrained("unsloth/Phi-4-mini-reasoning-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/Phi-4-mini-reasoning-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 unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/Phi-4-mini-reasoning-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Phi-4-mini-reasoning-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": "unsloth/Phi-4-mini-reasoning-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/Phi-4-mini-reasoning-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "unsloth/Phi-4-mini-reasoning-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Phi-4-mini-reasoning-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "unsloth/Phi-4-mini-reasoning-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Phi-4-mini-reasoning-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/Phi-4-mini-reasoning-GGUF with Ollama:
ollama run hf.co/unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Pi
How to use unsloth/Phi-4-mini-reasoning-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/Phi-4-mini-reasoning-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Phi-4-mini-reasoning-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Phi-4-mini-reasoning-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use unsloth/Phi-4-mini-reasoning-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/Phi-4-mini-reasoning-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "unsloth/Phi-4-mini-reasoning-GGUF:UD-Q4_K_XL" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add files using upload-large-folder tool
Browse files
.gitattributes
CHANGED
|
@@ -45,3 +45,9 @@ Phi-4-mini-reasoning-UD-Q3_K_XL.gguf filter=lfs diff=lfs merge=lfs -text
|
|
| 45 |
Phi-4-mini-reasoning-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
Phi-4-mini-reasoning-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
Phi-4-mini-reasoning-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
Phi-4-mini-reasoning-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
Phi-4-mini-reasoning-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
Phi-4-mini-reasoning-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
Phi-4-mini-reasoning-Q2_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
Phi-4-mini-reasoning-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
Phi-4-mini-reasoning-IQ4_NL.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
Phi-4-mini-reasoning-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
Phi-4-mini-reasoning-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
Phi-4-mini-reasoning-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
Phi-4-mini-reasoning-IQ4_NL.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99911890d0ad6ce44c2ab5593a110bd853837952bc0b1514a0784ef2a49d0825
|
| 3 |
+
size 2325151648
|
Phi-4-mini-reasoning-IQ4_XS.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5eff458459acb798ef3ef7121606d466a5eb95a459c0e0b19a89b92d894be260
|
| 3 |
+
size 2224488352
|
Phi-4-mini-reasoning-Q2_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:076ff295a9cdf104d63c9ad3ce13ed4902188a3b8480226cf8b5ae157c77e358
|
| 3 |
+
size 1682636704
|
Phi-4-mini-reasoning-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a99247cb8b96396558cdb7ed0c6120882a7e20c2a8a0c0d38c144e98e923878a
|
| 3 |
+
size 2331443104
|
Phi-4-mini-reasoning-Q4_1.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6c1e6e3b0bd0a22904edf154fb8452d63560127137a721ee3025e2bde778cc4
|
| 3 |
+
size 2526478240
|
Phi-4-mini-reasoning-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:036c6d0d06bcc08c4a3bcfe8ba2693e3485389c1ca1b1d81d7f7c6451d0c5e48
|
| 3 |
+
size 2848128928
|