gemma-4-26B-A4B-it ยท AWQ INT4 (W4A16)
4-bit quantization of google/gemma-4-26B-A4B-it (commit 4d7ae49), produced for efficient vLLM serving. Quantized by axteam.
| Base model | google/gemma-4-26B-A4B-it (commit 4d7ae49) |
| Method | AWQ INT4 (W4A16) |
| Format | compressed-tensors pack-quantized |
| Weights / activations | W4A16 โ INT4 asymmetric weights, group size 32 (BF16 scale + INT4 zero-point), BF16 activations |
| Architecture | Gemma 4 ยท Mixture-of-Experts (8 active / 128 total + 1 shared) |
| Size on disk | ~17.6 GB |
| Calibration | 256 samples (Korean-heavy; -it includes 32 self-generated thinking-mode answers) |
| License | Gemma 4 / Apache-2.0 |
Quantization details
- Scheme โ W4A16 โ INT4 asymmetric weights, group size 32 (BF16 scale + INT4 zero-point), BF16 activations, stored as compressed-tensors
pack-quantized. - Kept in BF16 โ vision tower, vision projection, token embeddings (tied with lm_head), MoE router, and all norms, plus the shared MLP. These stay unquantized to preserve quality โ about 7% of all parameters in this build.
- Tokenizer /
chat_template/processor_config/generation_configare byte-identical to the original, including Google's July-2026 correctedchat_template.config.jsonis the original plus aquantization_configblock.
Quantization method โ PTQ (AWQ / RTN) vs QAT
This model is a post-training quantization (PTQ): the released BF16 weights are quantized after training, with no retraining. How close each build stays to BF16 is reported in the measured sections where available.
- RTN (round-to-nearest) โ weights are simply rounded to the quantization grid with per-group scales; no calibration data. Fastest, but outliers aren't compensated, so 4-bit fidelity is the lowest. Not used for this model's AWQ-8bit, AWQ-4bit, NVFP4A16 and NVFP4 builds, which all apply AWQ (see each repo's
recipe.yaml). - AWQ (activation-aware weight quantization) โ a small calibration set finds the weight channels that multiply the largest activations; those salient channels are protected by per-channel scaling (the scale is folded into adjacent layers, e.g. LayerNorm โ q/k/v) before rounding. Still PTQ (no gradient, secondsโminutes), and far better than RTN at 4-bit.
- QAT (quantization-aware training) โ the model is fine-tuned with quantization simulated in the forward pass, so the weights adapt to quantization error via gradient descent. Best low-bit fidelity, but needs the full training stack, data and GPU hours. Google ships separate Gemma QAT checkpoints; this repo is not one of them.
Rough low-bit fidelity: QAT โฅ AWQ > RTN. Cost: QAT โซ AWQ > RTN. This build: AWQ โ a calibration-based PTQ (256-sample calibration, no gradient).
Benchmarks (measured)
Every column was measured with the same harness and settings โ lm-evaluation-harness on vLLM, greedy, completion-style prompts without a chat template (0- or 5-shot, as listed in each row). MMLU here is lm-eval's generative variant (mmlu_generative: the model writes the answer letter and only an exact match on the first line counts), so it is not directly comparable with MMLU scores measured another way (e.g. log-likelihood scoring). Percentages are recovery vs. the BF16 original.
| Benchmark | BF16 (original) | FP8-dynamic | AWQ-8bit | NVFP4A16 | NVFP4 | AWQ-4bit (this repo) |
|---|---|---|---|---|---|---|
| MMLU (5-shot, generative) | 40.23 | 35.77 (88.9%) | 38.72 (96.2%) | 30.44 (75.7%) | 31.39 (78.0%) | 33.21 (82.5%) |
| GSM8K (5-shot, strict) | 66.19 | 67.70 (102.3%) | 67.10 (101.4%) | 50.42 (76.2%) | 60.88 (92.0%) | 55.12 (83.3%) |
| ARC-Challenge (0-shot) | 45.39 | 45.82 (100.9%) | 44.88 (98.9%) | 44.62 (98.3%) | 44.28 (97.6%) | 44.62 (98.3%) |
| Winogrande (5-shot) | 58.48 | 60.22 (103.0%) | 59.91 (102.4%) | 58.64 (100.3%) | 57.77 (98.8%) | 58.48 (100.0%) |
| KMMLU (5-shot, direct) | 36.52 | 34.81 (95.3%) | 35.84 (98.1%) | 33.42 (91.5%) | 34.37 (94.1%) | 33.91 (92.9%) |
| HAE-RAE (0-shot) | 76.17 | 75.62 (99.3%) | 75.99 (99.8%) | 73.60 (96.6%) | 72.87 (95.7%) | 70.76 (92.9%) |
| Average | 53.83 | 53.32 (99.1%) | 53.74 (99.8%) | 48.53 (90.1%) | 50.26 (93.4%) | 49.35 (91.7%) |
โ ๏ธ Note: average recovery is 91.7% โ noticeable degradation at this precision; prefer an 8-bit build if quality matters most.
Evaluation (measured)
Measured against the BF16 original on an internal mixed English/Korean set. Quantization variant: AWQ attention + per-expert (full).
| Metric | This model | BF16 original |
|---|---|---|
| Perplexity (lower is better) | 1.2161 | 1.1284 (+7.8%) |
| Top-1 next-token agreement | 93.0% | 98.7% |
These numbers measure fidelity to the base model, not absolute task scores.
Comparison with other public quantizations
Same eval set and harness for every row โ closer to the BF16 original is better.
| Model | Perplexity | Top-1 |
|---|---|---|
| BF16 original (upper bound) | 1.1284 | 98.7% |
This model (axteam) |
1.2161 | 93.0% |
| cyankiwi/gemma-4-26B-A4B-it-AWQ-4bit | 1.2308 | 92.5% |
On our harness this model is on par with or ahead of the public same-format quantizations above. It also ships Google's corrected July-2026 chat_template; some earlier community builds were based on the older template.
Requirements
| Runtime | vLLM โ the architecture is in vLLM โฅ 0.19.0; tested here with vLLM 0.32.0 (text: the benchmarks above; image: an image-description check on 2026-11-02). |
| vLLM install | vLLM 0.32 itself needs Python 3.11โ3.14, torch 2.13 (CUDA 13.0 build, so an NVIDIA driver with CUDA 13 support), transformers โฅ5.16.1,<5.20 and compressed-tensors 0.17.0 (both pinned by vLLM; 0.17.0 reads this checkpoint, which was saved with 0.19.0 โ do not upgrade it separately). |
| GPU | NVIDIA Turing (sm75) or newer โ weight-only INT, no special tensor cores needed. V100 (sm70) is not supported. (Kernel choice per GPU from vLLM 0.32's selection code; only B200 was run here.) |
| Memory | Weights: 17.6 GB. Add KV cache (grows with context length ร concurrent requests) and a few GB for activations / CUDA graphs; use --tensor-parallel-size N when the weights do not fit one GPU. |
| Transformers (without vLLM) | Not loadable by Transformers (checked up to 5.22.1: no conversion rule for per-expert checkpoints, the experts stay uninitialised) โ use vLLM. |
| trust_remote_code | not needed |
Usage (vLLM)
vllm serve axteam/gemma-4-26B-A4B-it-AWQ-4bit
from vllm import LLM, SamplingParams
llm = LLM(model="axteam/gemma-4-26B-A4B-it-AWQ-4bit")
params = SamplingParams(temperature=1.0, top_p=0.95, top_k=64, max_tokens=1024)
out = llm.chat(
[{"role": "user", "content": "Write a short joke about saving RAM."}],
params,
)
print(out[0].outputs[0].text)
Recommended sampling (per Google):
temperature=1.0,top_p=0.95,top_k=64. Thinking mode is off by default; turn it on withchat_template_kwargs={"enable_thinking": True}(Pythonllm.chat(..., chat_template_kwargs=...)or the request body), and add--reasoning-parser gemma4tovllm serveto return the reasoning separately.
Reducing KV-cache memory (optional, serve-time)
The KV cache is unquantized (BF16) here โ the standard for quantized checkpoints (RedHatAI, NVIDIA, etc. ship the same way). KV-cache precision is a runtime choice, independent of the weight quantization above. For long context or large batches you can roughly halve KV-cache memory with FP8:
vllm serve axteam/gemma-4-26B-A4B-it-AWQ-4bit --kv-cache-dtype fp8
--kv-cache-dtypeacceptsauto(default, BF16),fp8/fp8_e4m3,fp8_e5m2. For a GGUF build the llama.cpp equivalent is--cache-type-k q8_0 --cache-type-v q8_0.
License
This is a quantized derivative of Google's Gemma 4. Use is governed by the Gemma 4 license. All original weights, tokenizer, and chat template belong to Google DeepMind.
ํ๊ตญ์ด ์์ฝ
google/gemma-4-26B-A4B-it์ AWQ INT4 (W4A16) ์์ํ ๋น๋ ยท ์ ์ axteam
๊ฐ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ณธ ๋ชจ๋ธ | google/gemma-4-26B-A4B-it (์ปค๋ฐ 4d7ae49) |
| ์์ํ ๋ฐฉ์ | AWQ INT4 (W4A16) |
| ์ ์ฅ ํ์ | compressed-tensors pack-quantized |
| ๋ชจ๋ธ ๊ตฌ์กฐ | Gemma 4 ยท MoE (์ ๋ฌธ๊ฐ 128๊ฐ ์ค 8๊ฐ ํ์ฑ + ํญ์ ์ฐ๋ ๊ณต์ MLP) |
| ์ฉ๋ | ์ฝ 17.6 GB |
| ๋ณด์ ๋ฐ์ดํฐ | ์ํ 256๊ฐ (ํ๊ตญ์ด ์์ฃผ, ์๋ณธ ๋ชจ๋ธ์ด ์ค์ค๋ก ์์ฑํ thinking ๋ชจ๋ ๋ต๋ณ 32๊ฐ ํฌํจ) |
์์ํ ์์ธ
- ๊ฐ์ค์น: INT4 ๋น๋์นญ, ๊ทธ๋ฃน ํฌ๊ธฐ 32 (BF16 ์ค์ผ์ผ + INT4 ์์ )
- ํ์ฑํ: BF16 (์์ํํ์ง ์์)
- ์์ํ ์ ์ฐจ: PTQ(ํ์ต ํ ์์ํ, ์ฌํ์ต ์์), AWQ ๋ฐฉ์ โ ๋ณด์ ๋ฐ์ดํฐ๋ก ํ์ฑํ๊ฐ ํฐ ๊ฐ์ค์น ์ฑ๋์ ์ฐพ์ ์ฑ๋๋ณ ์ค์ผ์ผ๋ก ๋ณดํธํ ๋ค INT4๋ก ๋ฐ์ฌ๋ฆผ
- AWQ ์ ์ฉ ๋ฒ์: ์ดํ ์ ์ ๋ ฅยท์ ๋ฌธ๊ฐ๋ณ MLP ์ ์ฒด
- BF16 ์ ์ง: ๋น์ ํ์, ๋น์ ํฌ์์ธต, ํ ํฐ ์๋ฒ ๋ฉ(LM ํค๋์ ๊ณต์ ), MoE ๋ผ์ฐํฐ, ๋ชจ๋ ์ ๊ทํ์ธต, ๊ณต์ MLP โ ์ ์ฒด ํ๋ผ๋ฏธํฐ์ ์ฝ 7%
- ์๋ณธ ํ์ผ: ํ ํฌ๋์ด์ ยทchat template(Google์ 2026๋
7์ ์์ ๋ณธ)ยทprocessorยทgeneration config๋ฅผ ๋ฐ์ดํธ ๋จ์๋ก ๊ทธ๋๋ก ์ฌ์ฉ,
config.json์ ์๋ณธ์quantization_config๋ธ๋ก๋ง ์ถ๊ฐ
ํ์ง (์ค์ธก)
- ์๋ณธ ๋๋น ์ถฉ์ค๋: PPL 1.2161 (์๋ณธ 1.1284, +7.8%, ๋ฎ์์๋ก ์๋ณธ์ ๊ฐ๊น์), ๋ค์ ํ ํฐ top-1 ์ผ์น์จ 93.0% (์๋ณธ ์์ฒด ๊ธฐ์ค๊ฐ 98.7%) โ ๋ด๋ถ ์์ดยทํ๊ตญ์ด ํผํฉ ํ๊ฐ์ , ์๋ณธ(BF16)๊ณผ ๋น๊ต ์ธก์
- ๋ค๋ฅธ ๊ณต๊ฐ ๋น๋์ ๋น๊ต: ๊ฐ์ ํ์์ cyankiwi/gemma-4-26B-A4B-it-AWQ-4bit PPL 1.2308 ยท top-1 92.5%, ์ด ๋น๋ PPL 1.2161 ยท top-1 93.0% (๊ฐ์ ํ๊ฐ์ ยท๊ฐ์ ํ๊ฐ ์ฝ๋) โ ์ด ๋น๋๊ฐ ๋๋ฑ ์ด์, Google์ 2026๋ 7์ ์์ chat template ํฌํจ (์ผ๋ถ ์ด์ ์ปค๋ฎค๋ํฐ ๋น๋๋ ์์ ์ ํ ํ๋ฆฟ ๊ธฐ๋ฐ)
- ๋ฒค์น๋งํฌ ํ๊ท : 49.35 (์๋ณธ 53.83, 91.7%) โ MMLU(์์ฑํ)ยทGSM8KยทARC-ChallengeยทWinograndeยทKMMLUยทHAE-RAE 6์ข ํ๊ท , lm-evaluation-harness + vLLM, chat template ์๋ ์์ฑํ ํ๋กฌํํธ(๊ณผ์ ๋ณ 0ยท5-shot, ํ ์ฐธ๊ณ )ยทgreedy, ๋ชจ๋ ๋น๋๋ฅผ ๊ฐ์ ์ค์ ์ผ๋ก ์ธก์
- ํ๊ตญ์ด ๋ฒค์น๋งํฌ: KMMLU 33.91 (์๋ณธ 36.52, 92.9%) ยท HAE-RAE 70.76 (์๋ณธ 76.17, 92.9%)
- MMLU ๋ฐฉ์: lm-eval ์์ฑํ ๋ณํ(
mmlu_generative) โ ๋ชจ๋ธ์ด ๋ต ๊ธ์๋ฅผ ์์ฑํ๊ณ ์ฒซ ์ค์ด ์ ํํ ์ผ์นํด์ผ ์ ๋ต์ผ๋ก ์ฑ์ ํ๋ฏ๋ก, ๋ค๋ฅธ ๋ฐฉ์(์: log-likelihood ์ฑ์ )์ผ๋ก ์ฐ MMLU ์ ์์ ์ง์ ๋น๊ต ๋ถ๊ฐ - ์ฃผ์: โ ๏ธ ์ด ์ ๋ฐ๋์์ ํ์ง ์ ํ๊ฐ ๋๋ ทํจ (๋ฒค์น๋งํฌ ํ๊ท ์๋ณธ ๋๋น 91.7%) โ ํ์ง์ด ์ค์ํ๋ฉด 8๋นํธ(FP8ยทAWQ-8bit) ๋น๋ ๊ถ์ฅ
์๊ตฌ์ฌํญ
- ์คํ ์์ง: vLLM 0.19.0 ์ด์(์ด ๊ตฌ์กฐ๋ฅผ ์ง์ํ๋ ์ฒซ ๋ฒ์ ), ์ด ๋น๋๋ vLLM 0.32.0์์ ์คํ ํ์ธ (ํ ์คํธ โ ์ ๋ฒค์น๋งํฌ, ์ด๋ฏธ์ง โ 2026-11-02 ๊ทธ๋ฆผ ์ค๋ช ์ ๊ฒ)
- vLLM 0.32 ์ค์น ์กฐ๊ฑด: Python 3.11~3.14, torch 2.13(CUDA 13.0 ๋น๋, CUDA 13 ์ง์ ๋๋ผ์ด๋ฒ ํ์), transformers 5.16.1 ์ด์ 5.20 ๋ฏธ๋ง, compressed-tensors 0.17.0 โ transformersยทcompressed-tensors๋ vLLM์ด ๋ฒ์ ์ ๊ณ ์ ํ๋ฏ๋ก compressed-tensors๋ฅผ ๋ฐ๋ก ์ ๊ทธ๋ ์ด๋ํ์ง ๋ง ๊ฒ (์ด ์ฒดํฌํฌ์ธํธ๋ 0.19.0์ผ๋ก ์ ์ฅ๋์ง๋ง 0.17.0์์๋ ๋ก๋๋จ)
- GPU: NVIDIA Turing(sm75) ์ด์, V100(sm70) ๋ฏธ์ง์ โ ๊ฐ์ค์น ์ ์ฉ ์ ์ ํ์์ด๋ผ FP8ยทFP4 ์ ์ฉ ํ ์์ฝ์ด ๋ถํ์ (GPU๋ณ ์ง์ ์ฌ๋ถ๋ vLLM 0.32 ์ปค๋ ์ ํ ์ฝ๋ ๊ธฐ์ค, ์ค์ ์คํ์ B200์์๋ง ํ์ธ)
- ๋ฉ๋ชจ๋ฆฌ: ๊ฐ์ค์น 17.6 GB + KV ์บ์(์ปจํ
์คํธ ๊ธธ์ด ร ๋์ ์์ฒญ ์์ ๋น๋ก) + ํ์ฑํยทCUDA graph์ฉ ์ GB โ GPU ํ ์ฅ์ ๋ค ๋ค์ด๊ฐ์ง ์์ผ๋ฉด
--tensor-parallel-size N์ผ๋ก ๋ถ์ฐ - Transformers๋ก ์ง์ ์ฌ์ฉ: ๋ถ๊ฐ โ 5.22.1๊น์ง ๋ก๋๋์ง ์์ ํ์ธ (์ ๋ฌธ๊ฐ๋ณ ์ฒดํฌํฌ์ธํธ ๋ณํ ๊ท์น์ด ์์ด ์ ๋ฌธ๊ฐ๊ฐ ์ด๊ธฐํ๋์ง ์์), vLLM ์ฌ์ฉ
- trust_remote_code: ๋ถํ์
์ฌ์ฉ๋ฒ
- ์๋ฒ ์คํ:
vllm serve axteam/gemma-4-26B-A4B-it-AWQ-4bit - Python:
LLM(model="axteam/gemma-4-26B-A4B-it-AWQ-4bit").chat(...)โ ์ ์ฒด ์์๋ ์ ์์ด ๋ณธ๋ฌธ 'Usage (vLLM)' ์ ์ฐธ๊ณ - ๊ถ์ฅ ์ํ๋ง:
temperature=1.0,top_p=0.95,top_k=64(Google ๊ถ์ฅ๊ฐ) - thinking ๋ชจ๋: ๊ธฐ๋ณธ ๊บผ์ง โ ์ผ๋ ค๋ฉด
chat_template_kwargs={"enable_thinking": True}์ ๋ฌ(Python์llm.chat()์ธ์, HTTP๋ ์์ฒญ ๋ณธ๋ฌธ์"chat_template_kwargs": {"enable_thinking": true}), ์ถ๋ก ๊ณผ์ ์ ๋ต๋ณ๊ณผ ๋ถ๋ฆฌํด ๋ฐ์ผ๋ ค๋ฉดvllm serve์--reasoning-parser gemma4์ถ๊ฐ - KV ์บ์ ์ ๊ฐ(์ ํ):
vllm serve์--kv-cache-dtype fp8์ถ๊ฐ โ ๊ธฐ๋ณธ BF16์ธ KV ์บ์๋ฅผ FP8๋ก ์ ์ฅํด KV ์บ์ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฝ ์ ๋ฐ์ผ๋ก ์ค์ (๊ธด ์ปจํ ์คํธยท๋์ ์์ฒญ์ด ๋ง์ ๋ ์ ๋ฆฌ, ๊ฐ์ค์น ์์ํ์ ๋ณ๊ฐ์ธ ์คํ ์ต์ )
๋ผ์ด์ ์ค
- ๋ผ์ด์ ์ค: Apache-2.0 (Gemma 4 ๋ผ์ด์ ์ค ์๋ด) โ ์๋ณธ ๋ชจ๋ธ์ ๋ผ์ด์ ์ค๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฆ
- ๊ถ๋ฆฌ: ์๋ณธ ๊ฐ์ค์นยทํ ํฌ๋์ด์ ยทchat template์ Google DeepMind ์์ , ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ