Instructions to use raymsm/Phi-4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use raymsm/Phi-4-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="raymsm/Phi-4-GGUF", filename="Phi-4.Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use raymsm/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 raymsm/Phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf raymsm/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 raymsm/Phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf raymsm/Phi-4-GGUF:Q4_K_M
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 raymsm/Phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf raymsm/Phi-4-GGUF:Q4_K_M
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 raymsm/Phi-4-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf raymsm/Phi-4-GGUF:Q4_K_M
Use Docker
docker model run hf.co/raymsm/Phi-4-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use raymsm/Phi-4-GGUF with Ollama:
ollama run hf.co/raymsm/Phi-4-GGUF:Q4_K_M
- Unsloth Studio
How to use raymsm/Phi-4-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for raymsm/Phi-4-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for raymsm/Phi-4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for raymsm/Phi-4-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use raymsm/Phi-4-GGUF with Docker Model Runner:
docker model run hf.co/raymsm/Phi-4-GGUF:Q4_K_M
- Lemonade
How to use raymsm/Phi-4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull raymsm/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
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Phi-4 GGUF
Quantized GGUF versions of microsoft/Phi-4 generated using llama.cpp on an Oracle Cloud VM.
Repositories & Quantization Details
This repository contains the following quantization formats:
| Quantization Type | File Size | Quantization Duration | Peak RAM Used | Description |
|---|---|---|---|---|
| Q4_K_M | 8.44 GB | 145.9s | 31911.6 MB | Medium-sized, good balance of size/perplexity. |
| Q5_K_M | 9.78 GB | 119.4s | 31911.6 MB | Medium-sized, good balance of size/perplexity. |
| Q6_K | 11.20 GB | 146.1s | 31911.6 MB | Medium-sized, good balance of size/perplexity. |
| Q8_0 | 14.51 GB | 120.2s | 31911.3 MB | Medium-sized, good balance of size/perplexity. |
Sanity Check Prompts & Responses
Here are the responses generated by the quantized models to verify coherent text generation.
Format: Q4_K_M
- Prompt: What is the capital of France? Answer in one word.
- Response:
What is the capital of France? Answer in one word. [end of text] - Prompt: Write a short four-line poem about coding in Python.
- Response:
Write a short four-line poem about coding in Python. The poem should rhyme and mention the concepts of 'variables', 'loops', and 'functions'. [end of text] - Prompt: Explain why the sky is blue in one simple sentence.
- Response:
Explain why the sky is blue in one simple sentence. [end of text]
Format: Q5_K_M
- Prompt: What is the capital of France? Answer in one word.
- Response:
What is the capital of France? Answer in one word. [end of text] - Prompt: Write a short four-line poem about coding in Python.
- Response:
Write a short four-line poem about coding in Python. [end of text] - Prompt: Explain why the sky is blue in one simple sentence.
- Response:
Explain why the sky is blue in one simple sentence. [end of text]
Format: Q6_K
- Prompt: What is the capital of France? Answer in one word.
- Response:
What is the capital of France? Answer in one word. [end of text] - Prompt: Write a short four-line poem about coding in Python.
- Response:
Write a short four-line poem about coding in Python. The poem must rhyme and include the words "syntax" and "loop."
Answer
In Python's realm where the syntax is neat, A loop spins round, a rhythmic feat. With each command, the code does swoop, In this dance of logic, we find our loop. [end of text]
- **Prompt**: *Explain why the sky is blue in one simple sentence.*
- **Response**:
```text
Explain why the sky is blue in one simple sentence. [end of text]
Format: Q8_0
- Prompt: What is the capital of France? Answer in one word.
- Response:
What is the capital of France? Answer in one word. FAILURE strictly strictlyibilibil Pir Sanfordbiratern Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur Bur(exec Bur Bur Bur Bur Bur Bur Bur - Prompt: Write a short four-line poem about coding in Python.
- Response:
Write a short four-line poem about coding in Python.nymnymnymnymnym-docnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnymnym Grosnym^K^K Roths Grosnym^K Gros^KCelekö^K Roths Roths Roths径 Roths '\" Roths Roths Roths Roths '\" Roths Roths Roths Roths Roths^K Roths Roths Roths - Prompt: Explain why the sky is blue in one simple sentence.
- Response:
Explain why the sky is blue in one simple sentence.Teacher " CwikAimage-in-inur-forururur-forurururururvaulturururvaultvaultvaultvault_codegenvault239239239239239239239239239239239 gh239239239239239urd239
Pipeline Logs
- Base GGUF Conversion Peak RAM: 4080.6 MB, Duration: 294.2s.
- Logged at:
Fri Jun 19 18:11:27 2026
- Downloads last month
- 62
4-bit
5-bit
6-bit
8-bit