Gemma 4 31B IT FP8 Dynamic

Production-ready offline FP8 checkpoint for vLLM โ€” 47% less VRAM, 99% more KV cache, and 48% faster than BF16.

We searched for a usable offline FP8 checkpoint of Gemma 4 31B-it but couldn't find one that worked cleanly with vLLM. So we vibe-coded our own and are sharing it with the community.

This repository hosts an offline FP8 checkpoint derived from google/gemma-4-31B-it for vLLM serving. No on-the-fly quantization needed at startup.

Published by Largitdata Inc.

Note: This is a derived operational checkpoint, not an official Google release. The original model's license terms, safety guidance, and documentation remain authoritative.

๐Ÿ“– ไธญๆ–‡่ชชๆ˜Ž / Chinese Version


Model Details

  • Base model: google/gemma-4-31B-it
  • Derived format: offline FP8 checkpoint for vLLM
  • Quantization tool: llmcompressor
  • Quantization method: FP8_DYNAMIC
  • Calibration data: None required (dynamic quantization)
  • Excluded weights:
    • norm-class 1D tensors โ€” excluded to avoid expected 2D linear weight validation errors during quantization
    • re:.*router\.proj$ โ€” router weights excluded to maintain compatibility with the Gemma4 vLLM loading path
  • Output directory name: gemma-4-31B-it-FP8-DYNAMIC
  • Primary serving target: vllm/vllm-openai:gemma4
  • Organization: Largitdata Inc.

Test Environment

  • GPU: NVIDIA H200 NVL (143 GB VRAM)
  • Runtime: vllm/vllm-openai:gemma4
  • KV cache dtype: fp8
  • max_model_len: 32768
  • gpu_memory_utilization: 0.65

Observed vLLM startup characteristics:

  • model weight loading: 7.44 s
  • model loading total: 8.96 s
  • torch.compile: 66.23 s
  • engine init: 108.24 s
  • total time to /v1/models ready: about 147 s

Observed runtime capacity:

  • max_num_batched_tokens = 8192
  • available KV cache memory: 55.22 GiB
  • GPU KV cache size: 120,624 tokens
  • maximum concurrency at 32,768 tokens/request: 11.57x

Serving Capacity Comparison

Metric FP8 Dynamic BF16 Baseline
Model loading memory 31.49 GiB 58.9 GiB
GPU KV cache size 120,624 tokens 60,752 tokens
Max concurrency @ 32K tokens/req 11.57x 5.83x
VRAM savings 47% less โ€”
KV cache gain 99% more โ€”

Basic Benchmark

Single-request warm benchmark against the OpenAI-compatible vLLM endpoint:

  • prompt tokens: 38
  • completion tokens: 256
  • temperature: 0
Metric FP8 Dynamic BF16 Baseline
Avg end-to-end latency 3.404 s 5.041 s
Avg completion throughput 75.20 tok/s 50.79 tok/s
Avg total throughput 86.36 tok/s 58.32 tok/s

These numbers are single-request warm-path measurements, not multi-client throughput tests.

Unlike smaller MoE variants where FP8 trades single-request speed for memory savings, the 31B dense FP8 variant is faster across the board โ€” 48% higher completion throughput, 47% less VRAM, and nearly double the KV cache capacity.

Concurrent Throughput

Concurrency FP8 Aggregate TPS BF16 Aggregate TPS FP8 Avg Latency BF16 Avg Latency
2 148.59 tok/s 102.21 tok/s 3.444 s 5.008 s
4 292.35 tok/s 201.25 tok/s 3.493 s 5.087 s
8 571.22 tok/s 390.74 tok/s 3.580 s 5.233 s

The FP8 variant maintains its speed advantage under concurrent load, with ~46% higher aggregate throughput at all tested concurrency levels.

Accuracy Evaluation

Formal accuracy benchmarks (MMLU, MT-Bench, etc.) have not yet been conducted on this FP8 checkpoint. Based on prior community findings with FP8 dynamic quantization on similar architectures, accuracy degradation is typically negligible (<0.5% on MMLU). Community contributions with benchmark results are welcome โ€” please open a discussion or PR.

Usage

Example vLLM launch:

docker run -d \
  --name vllm-gemma4-31b-fp8 \
  --restart unless-stopped \
  --ipc=host \
  --shm-size 16G \
  --gpus all \
  -v /models \
  -p 8001:8000 \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  vllm/vllm-openai:gemma4 \
  --model /models/gemma-4-31B-it-FP8-DYNAMIC \
  --trust-remote-code \
  --kv-cache-dtype fp8 \
  --gpu-memory-utilization 0.65 \
  --max-model-len 32768 \
  --enable-auto-tool-choice \
  --tool-call-parser gemma4 \
  --host 0.0.0.0 \
  --port 8000

Known Limitations

  • No formal accuracy benchmarks (MMLU, MT-Bench, etc.) have been run yet. Community contributions are welcome.
  • Only tested on NVIDIA H200 NVL. Other GPUs (A100, H100) may require adjusting gpu-memory-utilization.
  • norm-class 1D tensors and router.proj weights are excluded from quantization for vLLM compatibility.

Intended Use

This artifact is intended for:

  • Operational vLLM deployment on H200-class hardware
  • Reproducible offline FP8 serving experiments
  • Environments where startup-time on-the-fly quantization is undesirable
  • Production inference with higher concurrency requirements

This artifact is not intended to replace the original base model documentation, safety guidance, or license terms.

License

This repository contains a derived checkpoint based on google/gemma-4-31B-it. Usage is subject to the Gemma Terms of Use.

Citation

If you use this artifact, please cite both the derived checkpoint and the upstream base model.

@misc{largitdata_gemma4_31b_it_fp8_dynamic_2026,
  title        = {Gemma 4 31B IT FP8 Dynamic},
  author       = {David Chiu},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/largitdata-inc/gemma-4-31b-it-fp8-dynamic}},
  note         = {Derived offline FP8 checkpoint from google/gemma-4-31B-it for vLLM serving, published by Largitdata Inc. \url{https://www.largitdata.com/}}
}

@misc{google_gemma4_31b_it,
  title        = {Gemma 4 31B IT},
  author       = {Google},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/google/gemma-4-31B-it}}
}

Disclaimer

Users are responsible for verifying license compatibility, downstream serving behavior, numerical quality, and safety characteristics for their own environment.


ไธญๆ–‡่ชชๆ˜Ž

็ตฆ vLLM ็”จ็š„้›ข็ทš FP8 checkpoint โ€” ๆฏ” BF16 ็œ 47% VRAM๏ผŒKV cache ๅคš 99%๏ผŒ้€Ÿๅบฆๅฟซ 48%ใ€‚

ๆˆ‘ๅ€‘ๅœจ็ถฒ่ทฏไธŠๆ‰พไบ†ไธ€่ผช๏ผŒๆฒ’ๆœ‰ๆ‰พๅˆฐๅ ช็”จ็š„ Gemma 4 31B ้›ข็ทš FP8 ็‰ˆๆœฌ๏ผŒ็ดขๆ€ง่‡ชๅทฑ vibe coding ๅšไบ†ไธ€็‰ˆ๏ผŒ่ฒข็ป็ตฆ็คพ็พคใ€‚

้€™ๅ€‹ Repo ๆไพ›ๅพž google/gemma-4-31B-it ่ก็”Ÿๅ‡บ็š„้›ข็ทš FP8 checkpoint๏ผŒ่ฎ“ vLLM ๅฏไปฅ็›ดๆŽฅ่ผ‰ๅ…ฅๆœๅ‹™๏ผŒไธ้œ€่ฆๅœจๅ•Ÿๅ‹•ๆ™‚ๅŸท่กŒ on-the-fly ้‡ๅŒ–ใ€‚

็”ฑ Largitdata Inc. ็™ผไฝˆใ€‚

ๆณจๆ„๏ผš ้€™ๆ˜ฏ่ก็”Ÿ็š„ๆ“ไฝœ็”จ checkpoint๏ผŒไธฆ้ž Google ๅฎ˜ๆ–น็™ผไฝˆใ€‚ๅŽŸๅง‹ๆจกๅž‹็š„ๆŽˆๆฌŠๆขๆฌพใ€ๅฎ‰ๅ…จๆŒ‡ๅผ•่ˆ‡ๆ–‡ไปถไปไปฅๅฎ˜ๆ–น็‚บๆบ–ใ€‚

ๆจกๅž‹็ดฐ็ฏ€

  • ๅŸบๅบ•ๆจกๅž‹๏ผš google/gemma-4-31B-it
  • ๆ ผๅผ๏ผš ้›ข็ทš FP8 checkpoint๏ผŒไพ› vLLM ไฝฟ็”จ
  • ้‡ๅŒ–ๅทฅๅ…ท๏ผš llmcompressor
  • ้‡ๅŒ–ๆ–นๅผ๏ผš FP8_DYNAMIC
  • ๆ กๆบ–่ณ‡ๆ–™๏ผš ไธ้œ€่ฆ๏ผˆๅ‹•ๆ…‹้‡ๅŒ–๏ผ‰
  • ๆŽ’้™ค็š„ๆฌŠ้‡๏ผš
    • norm ้กžไธ€็ถญ tensor โ€” ้ฟๅ…้‡ๅŒ–้ฉ—่ญ‰ๆ™‚็”ข็”Ÿ expected 2D linear weight ้กž้Œฏ่ชค
    • re:.*router\.proj$ โ€” router ๆฌŠ้‡๏ผŒ็ถญๆŒ่ˆ‡ Gemma4 vLLM ่ผ‰ๅ…ฅ่ทฏๅพ‘็š„็›ธๅฎนๆ€ง
  • ไธป่ฆ้ƒจ็ฝฒ็›ฎๆจ™๏ผš vllm/vllm-openai:gemma4

ๆธฌ่ฉฆ็’ฐๅขƒ

  • GPU๏ผš NVIDIA H200 NVL๏ผˆ143 GB VRAM๏ผ‰
  • Runtime๏ผš vllm/vllm-openai:gemma4
  • KV cache dtype๏ผš fp8
  • max_model_len๏ผš 32768
  • gpu_memory_utilization๏ผš 0.65

ๅ•Ÿๅ‹•ๅฏฆๆธฌๆ•ธๆ“š๏ผš

  • ๆจกๅž‹ๆฌŠ้‡่ผ‰ๅ…ฅ๏ผš7.44 s
  • ๆจกๅž‹่ผ‰ๅ…ฅ็ธฝ่จˆ๏ผš8.96 s
  • torch.compile๏ผš66.23 s
  • ๅผ•ๆ“Žๅˆๅง‹ๅŒ–๏ผš108.24 s
  • /v1/models ๅฐฑ็ท’็ธฝๆ™‚้–“๏ผš็ด„ 147 s

ๅŸท่กŒๆœŸๅฎน้‡๏ผš

  • max_num_batched_tokens = 8192
  • ๅฏ็”จ KV cache ่จ˜ๆ†ถ้ซ”๏ผš55.22 GiB
  • GPU KV cache ๅคงๅฐ๏ผš120,624 tokens
  • ๆœ€ๅคงๅนณ่กŒ่™•็†้‡๏ผˆ32,768 tokens/request๏ผ‰๏ผš11.57x

ๆœๅ‹™ๅฎน้‡ๆฏ”่ผƒ

ๆŒ‡ๆจ™ FP8 Dynamic BF16 ๅŽŸ็‰ˆ
ๆจกๅž‹่ผ‰ๅ…ฅ่จ˜ๆ†ถ้ซ” 31.49 GiB 58.9 GiB
GPU KV cache ๅคงๅฐ 120,624 tokens 60,752 tokens
ๆœ€ๅคงๅนณ่กŒ่™•็†้‡ @ 32K tokens/req 11.57x 5.83x
VRAM ็ฏ€็œ 47% โ€”
KV cache ๅขžๅŠ  99% โ€”

ๅŸบ็คŽๆ•ˆ่ƒฝๆธฌ่ฉฆ

ๅ–ฎ่ซ‹ๆฑ‚ๆš–ๆฉŸๆธฌ่ฉฆ๏ผˆOpenAI ็›ธๅฎน vLLM endpoint๏ผ‰๏ผš

  • prompt tokens๏ผš38
  • completion tokens๏ผš256
  • temperature๏ผš0
ๆŒ‡ๆจ™ FP8 Dynamic BF16 ๅŽŸ็‰ˆ
ๅนณๅ‡็ซฏๅˆฐ็ซฏๅปถ้ฒ 3.404 s 5.041 s
ๅนณๅ‡ completion ๅžๅ้‡ 75.20 tok/s 50.79 tok/s
ๅนณๅ‡็ธฝๅžๅ้‡ 86.36 tok/s 58.32 tok/s

่ˆ‡่ผƒๅฐ็š„ MoE ๆจกๅž‹ไธๅŒ๏ผŒ31B dense ๆจกๅž‹็š„ FP8 ็‰ˆๆœฌๅœจๆ‰€ๆœ‰ๆŒ‡ๆจ™ไธŠ้ƒฝๅ„ชๆ–ผ BF16 โ€” completion ๅžๅ้‡้ซ˜ 48%ใ€VRAM ็”จ้‡ๅฐ‘ 47%ใ€KV cache ๅฎน้‡่ฟ‘ไนŽ็ฟปๅ€ใ€‚

ไฝต็™ผๅžๅ้‡ๆธฌ่ฉฆ

ไฝต็™ผๆ•ธ FP8 ่šๅˆ TPS BF16 ่šๅˆ TPS FP8 ๅนณๅ‡ๅปถ้ฒ BF16 ๅนณๅ‡ๅปถ้ฒ
2 148.59 tok/s 102.21 tok/s 3.444 s 5.008 s
4 292.35 tok/s 201.25 tok/s 3.493 s 5.087 s
8 571.22 tok/s 390.74 tok/s 3.580 s 5.233 s

FP8 ็‰ˆๆœฌๅœจไฝต็™ผ่ฒ ่ผ‰ไธ‹ๆŒ็บŒไฟๆŒ้€Ÿๅบฆๅ„ชๅ‹ข๏ผŒๅ„ๆธฌ่ฉฆไฝต็™ผ็ญ‰็ดš็š„่šๅˆๅžๅ้‡ๅ‡้ซ˜ๅ‡บ็ด„ 46%ใ€‚

็ฒพๅบฆ่ฉ•ไผฐ

ๅฐšๆœชๅฐๆญค FP8 checkpoint ้€ฒ่กŒๆญฃๅผ็ฒพๅบฆ benchmark๏ผˆMMLUใ€MT-Bench ็ญ‰๏ผ‰ใ€‚ๆ นๆ“š็คพ็พคๅ…ˆๅ‰ๅœจ้กžไผผๆžถๆง‹ไธŠไฝฟ็”จ FP8 ๅ‹•ๆ…‹้‡ๅŒ–็š„็ถ“้ฉ—๏ผŒ็ฒพๅบฆไธ‹้™้€šๅธธๅฏๅฟฝ็•ฅ๏ผˆMMLU < 0.5%๏ผ‰ใ€‚ๆญก่ฟŽ็คพ็พค่ฒข็ป benchmark ็ตๆžœ๏ผŒ่ซ‹้–‹ discussion ๆˆ–ๆไบค PRใ€‚

ไฝฟ็”จๆ–นๅผ

vLLM ๅ•Ÿๅ‹•็ฏ„ไพ‹๏ผš

docker run -d \
  --name vllm-gemma4-31b-fp8 \
  --restart unless-stopped \
  --ipc=host \
  --shm-size 16G \
  --gpus all \
  -v /models \
  -p 8001:8000 \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  vllm/vllm-openai:gemma4 \
  --model /models/gemma-4-31B-it-FP8-DYNAMIC \
  --trust-remote-code \
  --kv-cache-dtype fp8 \
  --gpu-memory-utilization 0.65 \
  --max-model-len 32768 \
  --enable-auto-tool-choice \
  --tool-call-parser gemma4 \
  --host 0.0.0.0 \
  --port 8000

ๅทฒ็Ÿฅ้™ๅˆถ

  • ๅฐšๆœช้€ฒ่กŒ MMLU / MT-Bench ็ญ‰็ฒพๅบฆ benchmark๏ผˆๆญก่ฟŽ็คพ็พค่ฃœๅ……๏ผ‰
  • ๅƒ…ๅœจ H200 NVL ไธŠๅฏฆๆธฌ๏ผŒๅ…ถไป– GPU๏ผˆๅฆ‚ A100ใ€H100๏ผ‰ๅฏ่ƒฝ้œ€่ฆ่ชฟๆ•ด gpu-memory-utilization
  • norm ้กžไธ€็ถญ tensor ่ˆ‡ router.proj ๆฌŠ้‡่ขซๆŽ’้™คๅœจ้‡ๅŒ–็ฏ„ๅœๅค–ไปฅ็ถญๆŒ vLLM ็›ธๅฎนๆ€ง

ไฝฟ็”จๅ ดๆ™ฏ

ๆญค checkpoint ้ฉ็”จๆ–ผ๏ผš

  • ๅœจ H200 ็ญ‰็ดš็กฌ้ซ”ไธŠไปฅ vLLM ้€ฒ่กŒ็”Ÿ็”ข้ƒจ็ฝฒ
  • ๅฏ้‡็พ็š„้›ข็ทš FP8 ๆœๅ‹™ๅฏฆ้ฉ—
  • ไธๅธŒๆœ›ๅœจๅ•Ÿๅ‹•ๆ™‚ๅŸท่กŒ on-the-fly ้‡ๅŒ–็š„็’ฐๅขƒ
  • ้œ€่ฆๆ›ด้ซ˜ๅนณ่กŒ่™•็†่ƒฝๅŠ›็š„็”Ÿ็”ขๆŽจ่ซ–ๅ ดๆ™ฏ

ๆญค checkpoint ไธๅ–ไปฃๅŽŸๅง‹ๅŸบๅบ•ๆจกๅž‹็š„ๆ–‡ไปถใ€ๅฎ‰ๅ…จๆŒ‡ๅผ•ๆˆ–ๆŽˆๆฌŠๆขๆฌพใ€‚

ๆŽˆๆฌŠ

ๆญค Repo ๅŒ…ๅซๅŸบๆ–ผ google/gemma-4-31B-it ็š„่ก็”Ÿ checkpoint๏ผŒไฝฟ็”จ้ ˆ้ตๅฎˆ Gemma ไฝฟ็”จๆขๆฌพใ€‚

ๅ…่ฒฌ่ฒๆ˜Ž

ไฝฟ็”จ่€…้œ€่‡ช่กŒ้ฉ—่ญ‰ๆŽˆๆฌŠ็›ธๅฎนๆ€งใ€ไธ‹ๆธธๆœๅ‹™่กŒ็‚บใ€ๆ•ธๅ€ผๅ“่ณช่ˆ‡ๅฎ‰ๅ…จ็‰นๆ€งใ€‚

Downloads last month
483
Safetensors
Model size
31B params
Tensor type
BF16
ยท
F8_E4M3
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LargitData/gemma-4-31b-it-fp8

Quantized
(351)
this model