Instructions to use unsloth/gemma-4-26B-A4B-it-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 unsloth/gemma-4-26B-A4B-it-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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-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 unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-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 unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
Use Docker
docker model run hf.co/unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
- LM Studio
- Jan
- vLLM
How to use unsloth/gemma-4-26B-A4B-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/gemma-4-26B-A4B-it-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/gemma-4-26B-A4B-it-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
- Ollama
How to use unsloth/gemma-4-26B-A4B-it-GGUF with Ollama:
ollama run hf.co/unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
- Unsloth Studio
How to use unsloth/gemma-4-26B-A4B-it-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 unsloth/gemma-4-26B-A4B-it-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 unsloth/gemma-4-26B-A4B-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/gemma-4-26B-A4B-it-GGUF to start chatting
- Pi
How to use unsloth/gemma-4-26B-A4B-it-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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/gemma-4-26B-A4B-it-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
- Lemonade
How to use unsloth/gemma-4-26B-A4B-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-26B-A4B-it-GGUF-UD-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use unsloth/gemma-4-26B-A4B-it-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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/gemma-4-26B-A4B-it-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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M
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/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M" \ --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"
New uploads adds llama.cpp fixes
New uploads that add 2 new fixes. You will need to redownload.
- vocab: fix Gemma4 tokenizer (#21343) - https://github.com/ggml-org/llama.cpp/pull/21343

- fix: gemma 4 template (#21326) - https://github.com/ggml-org/llama.cpp/pull/21326

Hi @danielhanchen , thank you for your service.
The model finally started working in RooCode after those updates π¦Ύ
One request - the IQ3_S and IQ3_XXS are the same file size. But on my setup (12GB VRAM + 16GB RAM), a slightly smaller (around 10GB) for IQ3_XXS would be a perfect match. Could you π please upload a 10GBish model variant of Q3.
I'm having some issues. I'm not sure if they are related to the .gguf format or the model itself.
Sometimes I get an infinite repetition of the same phrase (like "me... me... me...") or tokens similar to what is described here: [link] but at the end of response. In my case, it shows different tags (I can't remember exactly which ones, <eos> or something similar).
Also sometimes, model write it's answer in <thinking> section.
These issues happen from time to time, but most of the time, the model works just fine.
Hi @danielhanchen , thank you for your service.
The model finally started working in RooCode after those updates π¦ΎOne request - the IQ3_S and IQ3_XXS are the same file size. But on my setup (12GB VRAM + 16GB RAM), a slightly smaller (around 10GB) for IQ3_XXS would be a perfect match. Could you π please upload a 10GBish model variant of Q3.
We'll see what we can do. For now the Q2 quants should be decent enough. Gemma 4 quantization doesnt have that much different between the bits.
I'm having some issues. I'm not sure if they are related to the .gguf format or the model itself.
Sometimes I get an infinite repetition of the same phrase (like "me... me... me...") or tokens similar to what is described here: [link] but at the end of response. In my case, it shows different tags (I can't remember exactly which ones, <eos> or something similar).
Also sometimes, model write it's answer in <thinking> section.
These issues happen from time to time, but most of the time, the model works just fine.
Could be related to the CUDA version you're using. Where are you using it? In unsloth studio you shouldn't experience the issue
Could be related to the CUDA version you're using. Where are you using it? In unsloth studio you shouldn't experience the issue
Cuda 12.8, latest version of llama.cpp server, Open WebUI. Maybe it's because I'm using complex system instructions? But I don't have similar issues on 31b model.
Could be related to the CUDA version you're using. Where are you using it? In unsloth studio you shouldn't experience the issue
Cuda 12.8, latest version of llama.cpp server, Open WebUI. Maybe it's because I'm using complex system instructions? But I don't have similar issues on 31b model.
I'm not entirely sure if this is related but I do know they started using Cuda 13+ in the latest llama.cpp server-cuda image. I had to update in order to run my llama.cpp containers.
I'm having some issues. I'm not sure if they are related to the .gguf format or the model itself.
Sometimes I get an infinite repetition of the same phrase (like "me... me... me...") or tokens similar to what is described here: [link] but at the end of response. In my case, it shows different tags (I can't remember exactly which ones, <eos> or something similar).
Also sometimes, model write it's answer in <thinking> section.
These issues happen from time to time, but most of the time, the model works just fine.
Getting the same thing. I just spun up a new strix halo, so had to rebuild my podman containers which meant a fresh recompile of llama.cpp. I copied over the models from my old strix halo (downloaded less than 8 hours from the original unsloth upload) and used the fresh llama containers - and gemma is losing it's mind. Trying a fresh download of these ggufs to see if it's any better.
https://github.com/ggml-org/llama.cpp/issues/21423
Post-b8660 llama.cpp builds have some issues with the IQ4_XS quant I tested. Does the quant need an update or does llama.cpp need a fix?
build : b8667-c08d28d08
model : gemma-4-26B-A4B-it-UD-IQ4_XS.gguf
Just knocked a hard problem out of the park for me, pulled the git repo three hours ago. April 05 8:44 CST.
Getting the same thing. I just spun up a new strix halo, so had to rebuild my podman containers which meant a fresh recompile of llama.cpp. I copied over the models from my old strix halo (downloaded less than 8 hours from the original unsloth upload) and used the fresh llama containers - and gemma is losing it's mind. Trying a fresh download of these ggufs to see if it's any better.
Did you get anything working? I'm building the latest llama.cpp from github, taking the latest ones gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf and get weird output like:
cellars-and-and-and-and-and... You'slosh-and-and-and-and and-and-and and-and-and-and and-and-and ... You slip on theness of lissness-and-and-and-and and and-and-and and-and and-and-and and-and and-and and-and... You stumble-and-and-and-and and-and and-and to the corner of support-and
It seems correct prompt fixes the problem. Just adding empty:
<|channel>thought
<channel|>
prefix to initial model output.
Full prompt:
<|turn>system
You are an assistant.
<turn|>
<|turn>user
Generate a story.
<turn|>
<|turn>model
<|channel>thought
<channel|>
I'm still getting gibberish or < unused49 > spam on Strix Halo with ROCm Version: 7.13.0a20260404 - Llama.cpp Commit Hash: c08d2 - Build Date: 2026-04-05 15:33:29 UTC
UD-IQ4_XS.gguf uploaded 2-3 days ago works perfectly, so i wonder if it makes sense to try recently updated quant.
I noticed, IQ4_XS quants keep surprising me in terms of generation results, being much smaller than q4km q5km. Hidden jem in real world usage. Benchmarks for some reason tell different story.
UD-IQ4_XS.gguf uploaded 2-3 days ago works perfectly, so i wonder if it makes sense to try recently updated quant.
I noticed, IQ4_XS quants keep surprising me in terms of generation results, being much smaller than q4km q5km. Hidden jem in real world usage. Benchmarks for some reason tell different story.
I think that was when we updated it. We will be updating it again later this week once llama.cpp fixes more bugs
I'm still getting gibberish or < unused49 > spam on Strix Halo with ROCm Version: 7.13.0a20260404 - Llama.cpp Commit Hash: c08d2 - Build Date: 2026-04-05 15:33:29 UTC
This seems to be related to https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/discussions/2
By trial and error, i found this bug to also be present on UD-Q4_K_XL and MXFP4_MOE, llama.cpp b8664. Unsloth UD-Q5_K_S doesn't have that problem, as well as other quants (bartowski, ggml, lmstudio), looking at other users seems like smaller quants work fine too. Looks like unsloth 4-bit specific bug.
I'm having some issues. I'm not sure if they are related to the .gguf format or the model itself.
Sometimes I get an infinite repetition of the same phrase (like "me... me... me...") or tokens similar to what is described here: [link] but at the end of response. In my case, it shows different tags (I can't remember exactly which ones, <eos> or something similar).
Also sometimes, model write it's answer in <thinking> section.
These issues happen from time to time, but most of the time, the model works just fine.
Try to increase temp to resolve it. Also you can increase TopK and use 0.01 for minP
I'm still getting gibberish or < unused49 > spam on Strix Halo with ROCm Version: 7.13.0a20260404 - Llama.cpp Commit Hash: c08d2 - Build Date: 2026-04-05 15:33:29 UTC
This seems to be related to https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/discussions/2
By trial and error, i found this bug to also be present on UD-Q4_K_XL and MXFP4_MOE, llama.cpp b8664. Unsloth UD-Q5_K_S doesn't have that problem, as well as other quants (bartowski, ggml, lmstudio), looking at other users seems like smaller quants work fine too. Looks like unsloth 4-bit specific bug.
Apparently it is now solved for you through the update?
