Instructions to use TheStageAI/gemma-4-E2B-it-qat-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use TheStageAI/gemma-4-E2B-it-qat-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="TheStageAI/gemma-4-E2B-it-qat-GGUF", filename="gemma-4-E2B-it-qat-GGUF-L.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheStageAI/gemma-4-E2B-it-qat-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 TheStageAI/gemma-4-E2B-it-qat-GGUF # Run inference directly in the terminal: llama cli -hf TheStageAI/gemma-4-E2B-it-qat-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TheStageAI/gemma-4-E2B-it-qat-GGUF # Run inference directly in the terminal: llama cli -hf TheStageAI/gemma-4-E2B-it-qat-GGUF
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 TheStageAI/gemma-4-E2B-it-qat-GGUF # Run inference directly in the terminal: ./llama-cli -hf TheStageAI/gemma-4-E2B-it-qat-GGUF
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 TheStageAI/gemma-4-E2B-it-qat-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheStageAI/gemma-4-E2B-it-qat-GGUF
Use Docker
docker model run hf.co/TheStageAI/gemma-4-E2B-it-qat-GGUF
- LM Studio
- Jan
- vLLM
How to use TheStageAI/gemma-4-E2B-it-qat-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheStageAI/gemma-4-E2B-it-qat-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheStageAI/gemma-4-E2B-it-qat-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheStageAI/gemma-4-E2B-it-qat-GGUF
- Ollama
How to use TheStageAI/gemma-4-E2B-it-qat-GGUF with Ollama:
ollama run hf.co/TheStageAI/gemma-4-E2B-it-qat-GGUF
- Unsloth Studio
How to use TheStageAI/gemma-4-E2B-it-qat-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 TheStageAI/gemma-4-E2B-it-qat-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 TheStageAI/gemma-4-E2B-it-qat-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TheStageAI/gemma-4-E2B-it-qat-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use TheStageAI/gemma-4-E2B-it-qat-GGUF with Docker Model Runner:
docker model run hf.co/TheStageAI/gemma-4-E2B-it-qat-GGUF
- Lemonade
How to use TheStageAI/gemma-4-E2B-it-qat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheStageAI/gemma-4-E2B-it-qat-GGUF
Run and chat with the model
lemonade run user.gemma-4-E2B-it-qat-GGUF-{{QUANT_TAG}}List all available models
lemonade list
TheStageAI/gemma-4-E2B-it-qat-GGUF
A portable GGUF release of Google's Gemma 4 E2B instruction model, compressed from Google's
QAT-trained BF16 weights and emitted as standard llama.cpp-compatible .gguf files.
- Run it with: llama.cpp or other GGUF-compatible runtimes
- Compression source:
google/gemma-4-E2B-it-qat-q4_0-unquantized - BF16 reference:
google/gemma-4-E2B-it - Smaller native release:
TheStageAI/gemma-4-E2B-it-qat
Use this repo when deployment portability matters most. If you can run our native MLX runtime and
want the smallest artifacts, use the edge-lm sibling release.
Why this exists
The native edge-lm checkpoints use custom codecs for both decoder weights and PLE tables, which is
why they are smaller at comparable quality. Many deployments, however, need standard GGUF files that
work with llama.cpp-compatible tooling.
This repo keeps the production bit-width schedules from our native compression pipeline, but maps the weights into GGUF-compatible quantization formats. The result is larger than the native release, but portable.
How it was compressed
We start from Google's QAT-trained BF16 checkpoint and reuse the production m and l schedules from
the native release.
- Transformer blocks - the
MandLfiles follow our RCO-selected production bit-width schedules, then emit the weights in GGUF-compatible K-quant layouts with the required group sizes and symmetric/asymmetric modes for each tensor family. - PLE tables - stored with GGUF-compatible Q4 scalar quantization instead of the native AQLM PLE codec, so the files stay portable across GGUF runtimes.
- Token embeddings / LM head - quantized through the same GGUF-compatible path as the rest of the model.
- W4-uniform - a conservative uniform 4-bit GGUF variant with the same Q4 PLE path.
Operating points
| File | Trade-off | Size | Compression vs BF16 | Transformer | PLE |
|---|---|---|---|---|---|
gemma-4-E2B-it-qat-GGUF-M.gguf |
Compact GGUF target | 2.47 GB | 4.1x | production m mapped to GGUF |
GGUF Q4 |
gemma-4-E2B-it-qat-GGUF-L.gguf |
Higher-quality GGUF target | 2.68 GB | 3.8x | production l mapped to GGUF |
GGUF Q4 |
gemma-4-E2B-it-qat-GGUF-W4-uniform.gguf |
Uniform W4 baseline | 2.69 GB | 3.8x | uniform W4 GGUF | GGUF Q4 |
Usage
Use a recent upstream llama.cpp build. Example:
llama-completion \
-m gemma-4-E2B-it-qat-GGUF-L.gguf \
-p "Explain gravity in one sentence." \
-n 64
Benchmarks
For quality evaluation, GGUF checkpoints are converted through the same dequantized BF16 evaluation
path used for the native release, so the backend is equalized. IFEval p/i means prompt strict /
instruction strict, using the corrected public recipe with max_gen_toks=1280.
| Model | Size | Compression | MMLU-Pro | IFEval p/i |
|---|---|---|---|---|
| BF16 reference | 10.21 GB | 1.0x | 61.85 | 75.23 / 82.37 |
GGUF M |
2.47 GB | 4.1x | 53.79 | 72.64 / 81.29 |
GGUF L |
2.68 GB | 3.8x | 57.12 | 73.38 / 81.65 |
GGUF W4-uniform |
2.69 GB | 3.8x | 56.91 | 74.68 / 82.61 |
MMLU-Pro is the official checkpoint-wise vLLM route with Gemma chat formatting and thinking enabled.
The .gguf files in this repo also passed generation smoke tests with upstream llama.cpp.
Files
| File | Contents |
|---|---|
gemma-4-E2B-it-qat-GGUF-M.gguf |
Compact GGUF target |
gemma-4-E2B-it-qat-GGUF-L.gguf |
Higher-quality GGUF target |
gemma-4-E2B-it-qat-GGUF-W4-uniform.gguf |
Uniform W4 GGUF baseline |
License
Released under the MIT License. As a derivative of Gemma, the weights are also subject to the Gemma Terms of Use.
Citation
If you use these checkpoints, please cite the Gemma 4 release and the methods we build on
(GPTQ, QEP, AQLM, RCO) - see the references in the
edge-lm write-up.
- Downloads last month
- 463
We're not able to determine the quantization variants.
Model tree for TheStageAI/gemma-4-E2B-it-qat-GGUF
Base model
google/gemma-4-E2B