Instructions to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
Use Docker
docker model run hf.co/OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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": "OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
- Ollama
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with Ollama:
ollama run hf.co/OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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": "OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with Docker Model Runner:
docker model run hf.co/OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
- Lemonade
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-E2B-it-OnlyText-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OnlyTextLLMs/gemma-4-E2B-it-OnlyText-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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 "OnlyTextLLMs/gemma-4-E2B-it-OnlyText-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"
card: quantify quantization damage instead of listing the quants as equals
Browse files- README.md +17 -0
- benchmarks.json +22 -1
README.md
CHANGED
|
@@ -27,6 +27,23 @@ speculative decoding — plain decoding is what the numbers below measure.
|
|
| 27 |
| `gemma-4-E2B-it-OnlyText-Q6_K.gguf` | 3.8 GB |
|
| 28 |
| `gemma-4-E2B-it-OnlyText-Q8_0.gguf` | 5.0 GB |
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
## Benchmarks
|
| 31 |
|
| 32 |
Measured 2026-09-22 on a single AMD Radeon AI PRO R9700 (gfx1201, 34 GB) with
|
|
|
|
| 27 |
| `gemma-4-E2B-it-OnlyText-Q6_K.gguf` | 3.8 GB |
|
| 28 |
| `gemma-4-E2B-it-OnlyText-Q8_0.gguf` | 5.0 GB |
|
| 29 |
|
| 30 |
+
### Quantization damage (vs the F16 master)
|
| 31 |
+
|
| 32 |
+
llama-perplexity --kl-divergence against the F16 master's logits (ctx 1024, 40 windows, 20440 scored tokens). `Same top-1` is the share of positions where the quant keeps the F16
|
| 33 |
+
file's top token; `KLD` is the divergence of the full distribution, whose median is
|
| 34 |
+
the tail-free summary (a mean over a heavy-tailed loss says more about the tail than
|
| 35 |
+
about the quant).
|
| 36 |
+
|
| 37 |
+
| Quant | Mean KLD | Median KLD | Same top-1 | Max KLD |
|
| 38 |
+
|---|---|---|---|---|
|
| 39 |
+
| `Q4_K_M` | 0.3924 | 0.1044 | 78.43% | 16.77 |
|
| 40 |
+
| `Q6_K` | 0.0352 | 0.0074 | 93.30% | 7.70 |
|
| 41 |
+
| `Q8_0` | 0.0077 | 0.0016 | 96.68% | 1.66 |
|
| 42 |
+
|
| 43 |
+
**`Q4_K_M` is not interchangeable with the others here.** It changes the
|
| 44 |
+
top-1 token on 21.6% of positions, against 3.3% for `Q8_0`, so choose from the `Same top-1` column
|
| 45 |
+
rather than by size alone.
|
| 46 |
+
|
| 47 |
## Benchmarks
|
| 48 |
|
| 49 |
Measured 2026-09-22 on a single AMD Radeon AI PRO R9700 (gfx1201, 34 GB) with
|
benchmarks.json
CHANGED
|
@@ -9,7 +9,8 @@
|
|
| 9 |
},
|
| 10 |
"protocol": {
|
| 11 |
"baseline": "llama-bench -p 512,1024,2048 -n 128,256 -ngl 99 -fa on -r 3",
|
| 12 |
-
"chat_control": "llama-cli -n 256 -ngl 99 -fa on -np 1 --temp 0 -st, ~90-token fixed instruction prompt (the no-draft decode control)"
|
|
|
|
| 13 |
},
|
| 14 |
"results": {
|
| 15 |
"single": {
|
|
@@ -821,5 +822,25 @@
|
|
| 821 |
"dual": {}
|
| 822 |
},
|
| 823 |
"ppl": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 824 |
"ppl_withheld": "Perplexity is not reported for this family, but not because the measurement is broken: llama-perplexity adds the leading BOS this architecture needs (llama.cpp forces it for gemma4), and an independent HF implementation of the same protocol agrees to within 0.08 PPL (160.9418 vs 160.8636) with identical tokenization, so the number is a faithful property of the checkpoint. It is withheld because raw-wikitext perplexity is not a meaningful quality signal for an instruct-only model: the median token is predicted well (1.88 nats, 44% top-1) while the mean is dominated by a heavy tail where the chat-tuned model is out of distribution on plain text, and the result is not monotone in quantization width. Upstream guidance is to measure the base checkpoint or chat-formatted data. The raw ppl-*.log files are still on disk. See docs/gemma4-plan.md."
|
| 825 |
}
|
|
|
|
| 9 |
},
|
| 10 |
"protocol": {
|
| 11 |
"baseline": "llama-bench -p 512,1024,2048 -n 128,256 -ngl 99 -fa on -r 3",
|
| 12 |
+
"chat_control": "llama-cli -n 256 -ngl 99 -fa on -np 1 --temp 0 -st, ~90-token fixed instruction prompt (the no-draft decode control)",
|
| 13 |
+
"quant_damage": "llama-perplexity --kl-divergence against the F16 master's logits (ctx 1024, 40 windows, 20440 scored tokens)"
|
| 14 |
},
|
| 15 |
"results": {
|
| 16 |
"single": {
|
|
|
|
| 822 |
"dual": {}
|
| 823 |
},
|
| 824 |
"ppl": {},
|
| 825 |
+
"quant_kl": {
|
| 826 |
+
"Q4_K_M": {
|
| 827 |
+
"mean_kld": 0.392409,
|
| 828 |
+
"median_kld": 0.104361,
|
| 829 |
+
"max_kld": 16.77215,
|
| 830 |
+
"same_top_p": 78.43
|
| 831 |
+
},
|
| 832 |
+
"Q6_K": {
|
| 833 |
+
"mean_kld": 0.035236,
|
| 834 |
+
"median_kld": 0.007383,
|
| 835 |
+
"max_kld": 7.702833,
|
| 836 |
+
"same_top_p": 93.302
|
| 837 |
+
},
|
| 838 |
+
"Q8_0": {
|
| 839 |
+
"mean_kld": 0.007666,
|
| 840 |
+
"median_kld": 0.001566,
|
| 841 |
+
"max_kld": 1.66493,
|
| 842 |
+
"same_top_p": 96.683
|
| 843 |
+
}
|
| 844 |
+
},
|
| 845 |
"ppl_withheld": "Perplexity is not reported for this family, but not because the measurement is broken: llama-perplexity adds the leading BOS this architecture needs (llama.cpp forces it for gemma4), and an independent HF implementation of the same protocol agrees to within 0.08 PPL (160.9418 vs 160.8636) with identical tokenization, so the number is a faithful property of the checkpoint. It is withheld because raw-wikitext perplexity is not a meaningful quality signal for an instruct-only model: the median token is predicted well (1.88 nats, 44% top-1) while the mean is dominated by a heavy tail where the chat-tuned model is out of distribution on plain text, and the result is not monotone in quantization width. Upstream guidance is to measure the base checkpoint or chat-formatted data. The raw ppl-*.log files are still on disk. See docs/gemma4-plan.md."
|
| 846 |
}
|