Views
No views yet
This is an NVFP4-quantized standalone Gemma 4 target model.It can run by itself. The speculative-decoding benchmark below pairs it with a compatible Gemma 4 31B Assistant/MTP draft model.
RedHatAI/gemma-4-31B-it-NVFP4google/gemma-4-31B-itgroup_size = 16--spec-type draft-mtpnvfp4 tensor type, load the Assistant architecture, or initialize the target and draft KV caches correctly.The benchmark below is text-only. Image input requires a compatible multimodal projector and llama.cpp multimodal support.
1llama-server \
2 -m gemma-4-31B-it-NVFP4.gguf \
3 -md gemma-4-31B-it-assistant.gguf \
4 --spec-type draft-mtp \
5 --spec-draft-n-max 5 \
6 --flash-attn on \
7 -ngl 991llama-cli \
2 -m gemma-4-31B-it-NVFP4.gguf \
3 -md gemma-4-31B-it-assistant.gguf \
4 --spec-type draft-mtp \
5 --spec-draft-n-max 5 \
6 --flash-attn on \
7 -ngl 991llama-server \
2 -m gemma-4-31B-it-NVFP4.gguf \
3 -md gemma-4-31B-it-assistant.gguf \
4 --spec-type draft-mtp \
5 --spec-draft-n-max 5 \
6 --split-mode layer \
7 --tensor-split 1,1 \
8 --flash-attn on \
9 -ngl 99n_max = 5 gave the highest aggregate throughput of the tested settings.n_max = 2 gave the highest aggregate acceptance rate and remained the best choice for creative writing and other high-entropy output.n_max = 3 was a strong balanced setting with substantially less draft work than n_max = 5.n_max = 4 improved most structured tasks and remained a reasonable general-purpose compromise.n_max = 5 was best for code, JSON, repeated patterns, mathematical reasoning, and long reasoning.--spec-draft-n-max 5--spec-draft-n-max 3--spec-draft-n-max 2convert_hf_to_gguf.py from llama.cpp:1python convert_hf_to_gguf.py \
2 /path/to/gemma-4-31B-it-NVFP4 \
3 --outfile gemma-4-31B-it-NVFP4.gguf \
4 --outtype auto \
5 --verboseq4_k_m when the goal is to preserve the original NVFP4 tensors.GB. The same file can therefore appear smaller in Windows than on Hugging Face.llama-gguf:.\llama-gguf.exe E:\HF_MODELS\gemma-4-31B-it-NVFP4.gguf r1tensor: name = blk.0.ffn_down.weight, type = nvfp4
2tensor: name = blk.0.ffn_down.scale, type = f32
3tensor: name = blk.0.ffn_down.input_scale, type = f32--spec-type draft-mtpn_max | Draft acceptance | Predicted tokens | Draft tokens | Accepted tokens | Wall time | Effective batch throughput |
|---|---|---|---|---|---|---|
| 2 | 78.2% | 1,979 | 1,534 | 1,199 | 37.27 s | 53.10 tok/s |
| 3 | 71.6% | 1,979 | 1,874 | 1,341 | 32.96 s | 60.04 tok/s |
| 4 | 65.6% | 2,016 | 2,206 | 1,447 | 31.35 s | 64.31 tok/s |
| 5 | 60.2% | 2,016 | 2,495 | 1,501 | 30.18 s | 66.80 tok/s |
tok/s can be higher because aggregate wall time may include prompt processing, request transitions, and benchmark overhead.n_max = 4 and n_max = 5 runs both generated 2,016 tokens and can be compared directly.n_max = 21code_python pred= 192 draft= 138 acc= 121 rate=0.877 tok/s=61.6
2code_cpp pred= 192 draft= 147 acc= 117 rate=0.796 tok/s=58.4
3explain_concept pred= 192 draft= 170 acc= 105 rate=0.618 tok/s=50.2
4summarize pred= 48 draft= 38 acc= 30 rate=0.789 tok/s=56.5
5qa_factual pred= 172 draft= 146 acc= 99 rate=0.678 tok/s=53.2
6translation pred= 16 draft= 12 acc= 10 rate=0.833 tok/s=57.5
7creative_short pred= 34 draft= 38 acc= 14 rate=0.368 tok/s=39.7
8stepwise_math pred= 192 draft= 138 acc= 122 rate=0.884 tok/s=62.8
9json_output pred= 192 draft= 129 acc= 126 rate=0.977 tok/s=65.7
10long_reasoning pred= 192 draft= 147 acc= 117 rate=0.796 tok/s=58.3
11repeat_pattern pred= 192 draft= 127 acc= 127 rate=1.000 tok/s=67.7
12code_completion pred= 173 draft= 126 acc= 110 rate=0.873 tok/s=61.7
13long_code_review pred= 192 draft= 178 acc= 101 rate=0.567 tok/s=46.4
14
15Aggregate:
16 requests: 13
17 predicted tokens: 1979
18 draft tokens: 1534
19 accepted tokens: 1199
20 acceptance rate: 0.7816
21 total wall time: 37.27 sn_max = 31code_python pred= 192 draft= 168 acc= 135 rate=0.804 tok/s=71.7
2code_cpp pred= 192 draft= 178 acc= 131 rate=0.736 tok/s=67.3
3explain_concept pred= 192 draft= 225 acc= 116 rate=0.516 tok/s=53.7
4summarize pred= 48 draft= 48 acc= 33 rate=0.688 tok/s=62.6
5qa_factual pred= 172 draft= 171 acc= 114 rate=0.667 tok/s=63.3
6translation pred= 16 draft= 15 acc= 11 rate=0.733 tok/s=64.1
7creative_short pred= 34 draft= 54 acc= 16 rate=0.296 tok/s=39.7
8stepwise_math pred= 192 draft= 168 acc= 134 rate=0.798 tok/s=70.5
9json_output pred= 192 draft= 144 acc= 142 rate=0.986 tok/s=80.7
10long_reasoning pred= 192 draft= 177 acc= 131 rate=0.740 tok/s=65.8
11repeat_pattern pred= 192 draft= 143 acc= 143 rate=1.000 tok/s=83.8
12code_completion pred= 173 draft= 147 acc= 124 rate=0.844 tok/s=73.5
13long_code_review pred= 192 draft= 236 acc= 111 rate=0.470 tok/s=48.6
14
15Aggregate:
16 requests: 13
17 predicted tokens: 1979
18 draft tokens: 1874
19 accepted tokens: 1341
20 acceptance rate: 0.7156
21 total wall time: 32.96 sn_max = 41code_python pred= 192 draft= 199 acc= 141 rate=0.709 tok/s=77.7
2code_cpp pred= 192 draft= 201 acc= 140 rate=0.697 tok/s=77.3
3explain_concept pred= 192 draft= 273 acc= 122 rate=0.447 tok/s=57.5
4summarize pred= 48 draft= 56 acc= 33 rate=0.589 tok/s=70.0
5qa_factual pred= 192 draft= 229 acc= 133 rate=0.581 tok/s=66.8
6translation pred= 16 draft= 16 acc= 11 rate=0.688 tok/s=71.3
7creative_short pred= 32 draft= 64 acc= 16 rate=0.250 tok/s=39.0
8stepwise_math pred= 192 draft= 189 acc= 143 rate=0.757 tok/s=77.1
9json_output pred= 192 draft= 157 acc= 151 rate=0.962 tok/s=91.2
10long_reasoning pred= 192 draft= 213 acc= 137 rate=0.643 tok/s=67.9
11repeat_pattern pred= 192 draft= 155 acc= 152 rate=0.981 tok/s=94.2
12code_completion pred= 192 draft= 168 acc= 149 rate=0.887 tok/s=86.5
13long_code_review pred= 192 draft= 286 acc= 119 rate=0.416 tok/s=49.0
14
15Aggregate:
16 requests: 13
17 predicted tokens: 2016
18 draft tokens: 2206
19 accepted tokens: 1447
20 acceptance rate: 0.6559
21 total wall time: 31.35 sn_max = 51code_python pred= 192 draft= 219 acc= 147 rate=0.671 tok/s=83.2
2code_cpp pred= 192 draft= 235 acc= 144 rate=0.613 tok/s=78.4
3explain_concept pred= 192 draft= 331 acc= 124 rate=0.375 tok/s=53.2
4summarize pred= 48 draft= 60 acc= 37 rate=0.617 tok/s=76.0
5qa_factual pred= 192 draft= 270 acc= 136 rate=0.504 tok/s=63.2
6translation pred= 16 draft= 20 acc= 12 rate=0.600 tok/s=66.7
7creative_short pred= 32 draft= 80 acc= 16 rate=0.200 tok/s=35.8
8stepwise_math pred= 192 draft= 200 acc= 150 rate=0.750 tok/s=83.1
9json_output pred= 192 draft= 169 acc= 157 rate=0.929 tok/s=100.6
10long_reasoning pred= 192 draft= 238 acc= 142 rate=0.597 tok/s=74.8
11repeat_pattern pred= 192 draft= 165 acc= 158 rate=0.958 tok/s=104.6
12code_completion pred= 192 draft= 183 acc= 154 rate=0.842 tok/s=97.9
13long_code_review pred= 192 draft= 325 acc= 124 rate=0.382 tok/s=52.8
14
15Aggregate:
16 requests: 13
17 predicted tokens: 2016
18 draft tokens: 2495
19 accepted tokens: 1501
20 acceptance rate: 0.6016
21 total wall time: 30.18 sn_max = 5 delivered the highest effective aggregate throughput at approximately 66.80 tok/s.n_max = 2, n_max = 5 improved aggregate throughput by approximately 25.8%.n_max = 2, the final Assistant pairing and n_max = 5 improved throughput from approximately 48.60 tok/s to 66.80 tok/s.n_max = 5 reached 104.6 tok/s on repeated-pattern generation.n_max = 2 to 35.8 tok/s at n_max = 5.n_max = 5.n_max = 4 to n_max = 5 improved aggregate throughput by approximately 3.9%, while aggregate acceptance fell from 65.6% to 60.2%.google/gemma-4-31B-it, including approximately:Q4_K_M, Q4_K_S, or an Unsloth dynamic quant.google/gemma-4-31B-itRedHatAI/gemma-4-31B-it-NVFP4RedHatAI/gemma-4-31B-it-NVFP4 and google/gemma-4-31B-it model cards and applicable terms before redistribution or commercial use.