Skip to page content
SAVRN
Search Plan a project

Open-weight model · Any to any

gemma-4-E4B-it-W8A16

by Kozhonv Bekten/gemma-4-E4B-it-W8A16

gemma-4-E4B-it-W8A16 is an open-weight model for any to any from Kozhonv, released under Apache License 2.0. It has 5.1B parameters and a 131,072-token context. At 16-bit it needs about 12.1 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

INT8 weight-only quantization of google/gemma-4-E4B-it in the compressed-tensors format, ready for vLLM. Text, image and audio inputs are supported as in the original: only the text decoder is quantized.

Parameters5.1B
Context131,072
Weights12.1 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve gemma-4-E4B-it-W8A16 (5.1B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 10.1 GB 12.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 5.1 GB 6.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 2.5 GB 3.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.

gemma-4-E4B-it-W8A16 on every accelerator the SAVRN Index prices, at every precision

Model Card

By Kozhonv, published under apache-2.0, revision 61449357d863.

INT8 weight-only quantization of google/gemma-4-E4B-it in the compressed-tensors format, ready for vLLM. Text, image and audio inputs are supported as in the original: only the text decoder is quantized. - Per-Layer Embeddings (embedtokensperlayer, perlayerinputgate, perlayerprojection, perlayermodelprojection) - Multimodal projections (embedvision, embedaudio) - Token embeddings and lmhead A large part of the E4B checkpoint is Per-Layer Embeddings, which stay in bf16, so the size reduction is smaller than the "8-bit" label suggests. The full recipe is in recipe.yaml. Perplexity and top-1 next-token agreement against the bf16 original on Wikipedia (wikimedia/wikipedia, dump 20231101)…

Read Kozhonv's full model card

INT8 weight-only quantization of google/gemma-4-E4B-it in the compressed-tensors format, ready for vLLM. Text, image and audio inputs are supported as in the original: only the text decoder is quantized.

Original (bf16) This model (W8A16)
Checkpoint size 16.0 GB 12.1 GB
Text decoder Linear weights bf16 INT8
Vision / audio encoders bf16 bf16
Activations bf16 bf16

The "Model size" shown by the Hub counts tensor elements, and INT8 weights are packed 4 per int32, so it shows ~5B. The real parameter count is the same as the original (~8B with Per-Layer Embeddings).

Quantization details

  • Method: round-to-nearest (RTN) with llm-compressor, no calibration data, so no language bias from a calibration set.
  • Scheme: W8A16, symmetric, per-channel INT8 weights, 16-bit activations.
  • Quantized: all Linear layers of the text decoder (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj), 258 layers in total.
  • Kept in bf16:
  • Per-Layer Embeddings (embed_tokens_per_layer, per_layer_input_gate, per_layer_projection, per_layer_model_projection)
  • Vision tower and audio tower
  • Multimodal projections (embed_vision, embed_audio)
  • Token embeddings and lm_head

A large part of the E4B checkpoint is Per-Layer Embeddings, which stay in bf16, so the size reduction is smaller than the "8-bit" label suggests.

The full recipe is in recipe.yaml.

Evaluation

Perplexity and top-1 next-token agreement against the bf16 original on Wikipedia (wikimedia/wikipedia, dump 20231101), 16,384 tokens per language, window 1024 tokens.

Language PPL bf16 PPL W8A16 Δ PPL Top-1 agreement
Russian (ru) 20.27 20.26 -0.07% 97.8%
Kyrgyz (ky) 24.44 24.41 -0.12% 97.9%
English (en) 48.91 48.87 -0.08% 97.6%

Perplexity differences are within noise for this sample size: no measurable degradation on any language, including low-resource Kyrgyz. Top-1 agreement of ~98% means the remaining disagreements are mostly near-ties in the original model's distribution.

Only the text path was evaluated. Vision and audio encoder weights are identical to the original.

Usage

vLLM

vllm serve Bekten/gemma-4-E4B-it-W8A16 --max-model-len 32768

No --quantization flag is needed: vLLM reads the compressed-tensors config from config.json.

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
    model="Bekten/gemma-4-E4B-it-W8A16",
    messages=[{"role": "user", "content": "Кыргызстандын борбору кайсы шаар?"}],
)
print(resp.choices[0].message.content)

Transformers

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "Bekten/gemma-4-E4B-it-W8A16"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")

messages = [{"role": "user", "content": [{"type": "text", "text": "Привет! Расскажи о себе."}]}]
inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
).to(model.device)
out = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Transformers decompresses the weights to bf16 on load, so memory savings apply to vLLM, not to Transformers. On small GPUs, load with device_map="cpu", run one forward pass to trigger decompression, then move the model to GPU.

License

Same as the base model: apache-2.0. Use of this model is subject to the terms of google/gemma-4-E4B-it.

Configuration

Architecture
Gemma4ForConditionalGeneration
Context length (tokens)
131,072
Layers
42
Hidden size
2,560
Feed-forward size
10,240
Attention heads
8
Key/value heads
2
Head dimension
256
Vocabulary size
262,144
Sliding window (tokens)
512
Model type
gemma4
Quantization
compressed-tensors

Identity and Version

Repository
Bekten/gemma-4-E4B-it-W8A16
Publisher
Kozhonv
Task
Any to any
Modality
Multimodal
Library
transformers
Parameters
5.1B parameters
Languages
ru, ky, en
Revision
61449357d86307a17dfeaba555a3f2c1b6a3c874
First published
2026-10-13
Last updated
2026-10-13

Files and Weights

16 files, 12.1 GB in total. The weights are 5 files totalling 12.1 GB in safetensors.

Weights5 files · 12.1 GB
Configuration5 files · 296.6 KB
Tokenizer2 files · 32.2 MB
Documentation1 file · 4.5 KB
Other2 files · 18.7 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model-00001-of-00005.safetensorsWeights2.0 GB ce24d15f313e
model-00002-of-00005.safetensorsWeights2.0 GB c24ec75aa3c5
model-00003-of-00005.safetensorsWeights5.6 GB aa3e9d1e0443
model-00004-of-00005.safetensorsWeights2.0 GB 2a7a9270d3c1
model-00005-of-00005.safetensorsWeights443.1 MB c6792a99fb44
config.jsonConfiguration27.5 KB —
generation_config.jsonConfiguration204 B —
model.safetensors.index.jsonConfiguration266.8 KB —
processor_config.jsonConfiguration1.7 KB —
recipe.yamlConfiguration347 B —
README.mdDocumentation4.5 KB —
chat_template.jinjaOther18.6 KB —
eval/w8a16_vs_bf16.csvOther149 B —
.gitattributesRepository1.6 KB —
tokenizer.jsonTokenizer32.2 MB cc8d3a0ce364
tokenizer_config.jsonTokenizer3.7 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
12.1 GB
Download from Kozhonv

Released by Kozhonv through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published12.1 GB
16-bit10.1 GB
8-bit5.1 GB
4-bit2.5 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About gemma-4-E4B-it-W8A16

How much GPU memory does gemma-4-E4B-it-W8A16 need?

About 12.1 GB at 16-bit and 3 GB at 4-bit: the weights (5.1B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run gemma-4-E4B-it-W8A16 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use gemma-4-E4B-it-W8A16 commercially?

Yes. gemma-4-E4B-it-W8A16 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is gemma-4-E4B-it-W8A16's context length?

131,072 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on E2B, E4B, and 12B) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages. Featuring both Dense and Mixture-of-Experts (MoE) architectures, Gemma 4 is well-suited for tasks like text generation, coding, and reasoning. The models are available in five distinct sizes: E2B, E4B, 12B, 26B A4B, and 31B. Their diverse sizes make them deployable in environments ranging from…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers

Model · Any to any

gemma-4-E2B-it

Google

Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on E2B, E4B, and 12B) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages. Featuring both Dense and Mixture-of-Experts (MoE) architectures, Gemma 4 is well-suited for tasks like text generation, coding, and reasoning. The models are available in five distinct sizes: E2B, E4B, 12B, 26B A4B, and 31B. Their diverse sizes make them deployable in environments ranging from…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 4-bit quantized version of gemma-4-E2B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 8-bit quantized version of gemma-4-E2B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 6-bit quantized version of gemma-4-E2B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers

LM Studio Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on Discord. 5-bit quantized version of gemma-4-E2B-it using MLX, optimized for Apple Silicon. Special thanks to the Apple Machine Learning Research team for creating MLX. LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful…

Open weights apache-2.0 5.1B parameters 131,072 tokens transformers