Instructions to use OnlyTextLLMs/gemma-4-E4B-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-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OnlyTextLLMs/gemma-4-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OnlyTextLLMs/gemma-4-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf OnlyTextLLMs/gemma-4-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
Use Docker
docker model run hf.co/OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use OnlyTextLLMs/gemma-4-E4B-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-E4B-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-E4B-it-OnlyText-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
- Ollama
How to use OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF with Ollama:
ollama run hf.co/OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use OnlyTextLLMs/gemma-4-E4B-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-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF with Docker Model Runner:
docker model run hf.co/OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
- Lemonade
How to use OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OnlyTextLLMs/gemma-4-E4B-it-OnlyText-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-E4B-it-OnlyText-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use OnlyTextLLMs/gemma-4-E4B-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-E4B-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-E4B-it-OnlyText-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OnlyTextLLMs/gemma-4-E4B-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-E4B-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-E4B-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"
gemma-4-E4B-it-OnlyText-GGUF
GGUF quants of OnlyTextLLMs/gemma-4-E4B-it-OnlyText — the text-only derivative of google/gemma-4-E4B-it. The file is the text backbone alone: no draft head is embedded, so there is no in-file speculative decoding — plain decoding is what the numbers below measure.
Quant files
| File | Size |
|---|---|
gemma-4-E4B-it-OnlyText-Q4_K_M.gguf |
5.3 GB |
gemma-4-E4B-it-OnlyText-Q6_K.gguf |
6.2 GB |
gemma-4-E4B-it-OnlyText-Q8_0.gguf |
8.0 GB |
Quantization damage (vs the F16 master)
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
file's top token; KLD is the divergence of the full distribution, whose median is
the tail-free summary (a mean over a heavy-tailed loss says more about the tail than
about the quant).
| Quant | Mean KLD | Median KLD | Same top-1 | Max KLD |
|---|---|---|---|---|
Q4_K_M |
0.2801 | 0.1173 | 79.77% | 12.29 |
Q6_K |
0.0254 | 0.0085 | 93.48% | 4.59 |
Q8_0 |
0.0052 | 0.0015 | 97.08% | 3.94 |
Q4_K_M is not interchangeable with the others here. It changes the
top-1 token on 20.2% of positions, against 2.9% for Q8_0, so choose from the Same top-1 column
rather than by size alone.
Benchmarks
Measured 2026-09-22 on a single AMD Radeon AI PRO R9700 (gfx1201, 34 GB) with
llama.cpp f280b26983ad (HIP/ROCm build, ROCm 7.14, -c 32768 -fa on). Baseline =
llama-bench PP512/1024/2048 + TG128/256; chat decode = llama-cli single-turn,
256 generated tokens, median conditions, -np 1.
| Quant | Device | Prefill t/s (PP512) | Gen t/s chat | Gen t/s llama-bench TG128 |
|---|---|---|---|---|
| Q4_K_M | single R9700 | 3171 | 79.7 | 89.7 |
| Q6_K | single R9700 | 1788 | 78.6 | 86.0 |
| Q8_0 | single R9700 | 4035 | 71.2 | 76.4 |
The two decode columns are different measurements (chat runs use the chat template and a ~90-token prompt; TG128 is a bare 128-token generation) — do not compare them against each other.
No published baselines are cited for this size — the numbers above are ours.
Usage
Requires a llama.cpp build that knows the gemma4 architecture.
# llama-server (OpenAI-compatible)
llama-server -m gemma-4-E4B-it-OnlyText-Q4_K_M.gguf -ngl 99 -c 32768 -fa on
# llama-cli single-turn chat
llama-cli -m gemma-4-E4B-it-OnlyText-Q4_K_M.gguf -ngl 99 -c 32768 -fa on \
-st -p "Your prompt"
Notes:
- The chat template supports Gemma's thinking channel but defaults
enable_thinkingto false, so plain chat answers directly. Pass"chat_template_kwargs": {"enable_thinking": true}(server API) to let it reason first. - Dual-GPU: unset
*_VISIBLE_DEVICESenv pins; llama.cpp auto layer-splits (--split-mode layeris the default).
Details
- Base: google/gemma-4-E4B-it (apache-2.0): 7.52B params, 42 layers (35 sliding-attention + 7 full-attention), hidden 2560, vocab 262137,
Gemma4ForCausalLM,gemma4GGUF architecture. - Tokenizer: 17 text-only special tokens at ids 0–106 (EOS 1 =
<eos>, turn end 106 =<turn|>); image/audio/video tokens removed. - Conversion:
convert_hf_to_gguf.py(llama.cppf280b26983ad) thenllama-quantizewith the file's named type; no draft head is embedded (the family ships none). - Weights are untouched derivatives — no additional training.
Attribution
This model is a derivative of google/gemma-4-E4B-it by the Google team, released under the apache-2.0 license. All credit for the underlying weights and capabilities belongs to the original authors; this repository only removes modalities and quantizes, it does not add new training.
- Downloads last month
- 103
4-bit
6-bit
8-bit