Views
No views yet
| Property | Value |
|---|---|
| Base Model | google/gemma-4-31B-it |
| Quantization Method | NVFP4A16 (weight-only FP4) |
| Weight Precision | FP4 (4-bit floating point) |
| Activation Precision | BF16 (weight-only quantization) |
| Group Size | 16 |
| Quantization Library | llm-compressor 0.10.0.1 |
| Format | compressed-tensors (nvfp4-pack-quantized) |
| Architecture | Gemma4ForConditionalGeneration |
| Layers | 60 decoder layers |
| Hidden Size | 5376 |
| Context Window | 256K tokens |
| Vision Tower | SigLIP (27 layers, preserved in BF16) |
| Quantized Components | Text decoder + projector (vision tower preserved in BF16) |
gpu_memory_utilization: 0.4 (full 256K context)1default_stage:
2 default_modifiers:
3 GPTQModifier:
4 targets: [Linear]
5 ignore:
6 - lm_head
7 - model.vision_tower.*
8 - model.embed_vision.*
9 - model.multi_modal_projector.*
10 scheme: NVFP4A16
11 block_size: 128
12 dampening_frac: 0.01
13 actorder: static
14 offload_hessians: false
15 sequential_targets: [Gemma4TextDecoderLayer]1from transformers import AutoModelForMultimodalLM, AutoTokenizer
2
3model_id = "ebircak/gemma-4-31B-it-4bit-NVFP4A16-GPTQ"
4
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForMultimodalLM.from_pretrained(
7 model_id,
8 device_map="auto",
9 torch_dtype="auto"
10)1# vllm_config.yaml
2model: ebircak/gemma-4-31B-it-4bit-NVFP4A16-GPTQ
3quantization: compressed-tensors # NVFP4A16 weights
4kv_cache_dtype: fp8_e4m3 # FP8 KV cache
5gpu_memory_utilization: 0.4 # ~35GB VRAM usage on RTX PRO 6000; can be increased up to 0.95 if needed
6max_model_len: 262144 # 256K context
7tensor_parallel_size: 1 # Single GPU
8enable_prefix_caching: true
9enable_chunked_prefill: true
10
11# Gemma4-specific (REQUIRED for tool calling)
12enable_auto_tool_choice: true
13tool_call_parser: gemma4
14reasoning_parser: gemma41docker run --rm -it \
2 --runtime=nvidia \
3 --gpus '"device=0"' \
4 --ipc=host \
5 --network=host \
6 --privileged \
7 --shm-size=16g \
8 -v /root/.cache/huggingface/hub:/root/.cache/huggingface/hub \
9 -v /path/to/vllm_config.yaml:/vllm_config.yaml \
10 -e CUDA_DEVICE_ORDER=PCI_BUS_ID \
11 -e CUDA_VISIBLE_DEVICES=0 \
12 -e HF_HOME=/root/.cache/huggingface \
13 -e HUGGINGFACE_HUB_CACHE=/root/.cache/huggingface/hub \
14 -e VLLM_WORKER_MULTIPROC_METHOD=spawn \
15 -e SAFETENSORS_FAST_GPU=1 \
16 -e VLLM_TARGET_DEVICE=cuda \
17 -e VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \
18 -e TOKENIZERS_PARALLELISM=true \
19 vllm/vllm-openai:gemma4-cu130 \
20 --config /vllm_config.yaml| File | Description |
|---|---|
model.safetensors | Quantized model weights (~20GB, single file) |
config.json | Model configuration with quantization_config |
tokenizer.json | Tokenizer vocabulary |
tokenizer_config.json | Tokenizer config with chat template |
chat_template.jinja | Gemma4 native chat template |
generation_config.json | Generation parameters |
processor_config.json | Processor configuration |
recipe.yaml | Quantization recipe |
LICENSE | Apache 2.0 License |
LICENSE for the full text.1@misc{gemma4-31b-nvfp4-quantization,
2 title = {Gemma-4-31B-it NVFP4A16 Quantization},
3 author = {ebircak},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/ebircak/gemma-4-31B-it-4bit-NVFP4A16-GPTQ}},
6 note = {Quantized with llm-compressor 0.10.0.1}
7}