Run this model with HF Jobs
Run NoemaAI-labs/gemma-4-E2B-QuantReady on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/NoemaAI-labs/gemma-4-E2B-QuantReady. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NoemaAI-labs/gemma-4-E2B-QuantReady on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/NoemaAI-labs/gemma-4-E2B-QuantReady. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/NoemaAI-labs/gemma-4-E2B-QuantReady. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use NoemaAI-labs/gemma-4-E2B-QuantReady with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NoemaAI-labs/gemma-4-E2B-QuantReady with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="NoemaAI-labs/gemma-4-E2B-QuantReady")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("NoemaAI-labs/gemma-4-E2B-QuantReady") model = AutoModelForMultimodalLM.from_pretrained("NoemaAI-labs/gemma-4-E2B-QuantReady", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NoemaAI-labs/gemma-4-E2B-QuantReady with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NoemaAI-labs/gemma-4-E2B-QuantReady" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/gemma-4-E2B-QuantReady", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NoemaAI-labs/gemma-4-E2B-QuantReady
- SGLang
How to use NoemaAI-labs/gemma-4-E2B-QuantReady with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NoemaAI-labs/gemma-4-E2B-QuantReady" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/gemma-4-E2B-QuantReady", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NoemaAI-labs/gemma-4-E2B-QuantReady" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoemaAI-labs/gemma-4-E2B-QuantReady", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NoemaAI-labs/gemma-4-E2B-QuantReady with Docker Model Runner:
docker model run hf.co/NoemaAI-labs/gemma-4-E2B-QuantReady
Gemma 4 E2B · Noema QuantReady
google/gemma-4-E2B, prepared with Noema QuantReady. In full precision it computes the same function as the original. When you quantize it, the result stays closer to the original model than quantizing the original does: across 30 real exporters it is closer under 30 of 30, with 1.47× lower KL divergence from the original in geometric mean.
Results
KL divergence of each quantized model from the original full-precision model (nats per token, lower is better), for the original quantized directly and for QuantReady quantized the same way:
| Quantized with | Original | QuantReady | Improvement |
|---|---|---|---|
| llama.cpp Q8_0 | 0.0018 | 0.0011 | 1.57× lower |
| llama.cpp Q5_K_M | 0.0282 | 0.0198 | 1.42× lower |
| llama.cpp Q4_K_M | 0.1053 | 0.0657 | 1.60× lower |
| llama.cpp Q3_K_M | 0.4107 | 0.2135 | 1.92× lower |
| MLX 4-bit | 0.2030 | 0.1525 | 1.33× lower |
| bitsandbytes NF4 | 0.1229 | 0.0855 | 1.44× lower |
| HQQ 4-bit | 0.1398 | 0.0988 | 1.41× lower |
| All 30 exporters (geometric mean) | 1.47× lower |
Gains are smallest under llama.cpp's importance-matrix (imatrix) formats, whose calibration already captures part of the same effect (1.21× in geometric mean).
What changes, and what doesn't
- The architecture, size, data type, tokenizer and chat template are the original's. Load it with the same code as the original, changing only the model id.
- QuantReady learns per-channel rescalings that cancel exactly inside each transformer block (between the two halves of each gated MLP, and between each normalization layer and the projections that read it) and folds them into the weights. The function is unchanged in exact arithmetic; after folding into bf16 its measured drift from the original is 0.00008 nats per token.
- What changes is how evenly the weights fill each quantization block, so quantizers round them more faithfully. The vision and audio encoders are unchanged.
Ready-made GGUF files are at NoemaAI-labs/gemma-4-E2B-QuantReady-GGUF.
How it was measured
Thirty exporters: 12 plain llama.cpp formats and 10 with an importance matrix, bitsandbytes NF4 and FP4 with and without double quantization, HQQ and MLX at 4 and 3 bits. Each quantized model is compared with the original quantized the same way, scored on the same GPU type, by KL divergence from the original full-precision model (100 WikiText-2 windows of 512 tokens for llama.cpp, held-out FineWeb-Edu for the libraries), with llama.cpp at commit 19ff817f.
Technical report
One Checkpoint for Every Quantizer: Format Lock-In and Zero-Drift Preparation of Open-Weight Releases (Armin Stamate and Jacob Aronow, NoemaAI, 2026). QuantReady is the method called zero-drift format-randomized distillation (ZD-FRD) in the report.
The evaluation code, the results behind these numbers and a tool that rebuilds this release from the original and checks it against these weights are at github.com/noemaai-labs/quantready.
License
Apache 2.0, as the original model google/gemma-4-E2B.
- Downloads last month
- 42