Instructions to use Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Anbeeld/gemma4-12B-it-DFlash-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": "Anbeeld/gemma4-12B-it-DFlash-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
- Ollama
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with Ollama:
ollama run hf.co/Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
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": "Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with Docker Model Runner:
docker model run hf.co/Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
- Lemonade
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma4-12B-it-DFlash-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Anbeeld/gemma4-12B-it-DFlash-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 Anbeeld/gemma4-12B-it-DFlash-GGUF: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 Anbeeld/gemma4-12B-it-DFlash-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Anbeeld/gemma4-12B-it-DFlash-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Anbeeld/gemma4-12B-it-DFlash-GGUF: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 "Anbeeld/gemma4-12B-it-DFlash-GGUF: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"
Gemma 4 12B IT DFlash GGUF
GGUF quantizations of z-lab DFlash draft model for Gemma 4 12B IT.
Use with BeeLlama.cpp, a llama.cpp fork with advanced quantization features.
gemma4-12B-it-DFlash
DFlash is a speculative decoding method that uses a lightweight block diffusion model to draft multiple tokens in parallel. This is the drafter model, which must be paired with google/gemma-4-12b-it. It is not a standalone Gemma 4 12B model.
The original z-lab checkpoint does not include a model card. The usage instructions below apply to these GGUF files in BeeLlama.cpp.
Quantizations
All quantizations are generated directly from a BF16 conversion of the original checkpoint using BeeLlama.cpp.
| Quantization | File |
|---|---|
| BF16 | gemma4-12B-it-DFlash-bf16.gguf |
| Q8_0 | gemma4-12B-it-DFlash-Q8_0.gguf |
| Q6_K | gemma4-12B-it-DFlash-Q6_K.gguf |
| Q5_K_M | gemma4-12B-it-DFlash-Q5_K_M.gguf |
| Q4_K_M | gemma4-12B-it-DFlash-Q4_K_M.gguf |
| Q3_K_M | gemma4-12B-it-DFlash-Q3_K_M.gguf |
| Q2_K | gemma4-12B-it-DFlash-Q2_K.gguf |
Quick Start
Installation
Build or download BeeLlama.cpp. Download a GGUF of the Gemma 4 12B IT target model separately, along with one draft quantization from this repository.
Launch Server
Run from the directory containing your model files, replacing target.gguf with the path to your Gemma 4 12B IT GGUF:
llama-server -m target.gguf \
--spec-type draft-dflash \
--spec-draft-model gemma4-12B-it-DFlash-Q8_0.gguf \
--spec-draft-n-max 16 \
--flash-attn on \
--port 8080
The draft checkpoint is trained with a block size of 16. Use draft-dflash, not the removed bare dflash alias, in current BeeLlama.cpp.
Usage
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="target.gguf",
messages=[{"role": "user", "content": "Write a quicksort in Python."}],
max_tokens=4096,
temperature=0.0,
)
print(response.choices[0].message.content)
Benchmark Results
No benchmark results for these Gemma 4 12B IT GGUF quantizations are published here. Results from other DFlash draft models are not measurements of this checkpoint.
Citation
If you find DFlash useful, please cite the original work. To share feedback on DFlash or request new model support, use DFlash Feedback.
@article{chen2026dflash,
title = {{DFlash: Block Diffusion for Flash Speculative Decoding}},
author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian},
journal = {arXiv preprint arXiv:2602.06036},
year = {2026}
}
- Downloads last month
- 581
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Anbeeld/gemma4-12B-it-DFlash-GGUF
Base model
z-lab/gemma4-12B-it-DFlash