rasyosef / gemma-4-E2B-it-dflash2

huggingface.co
Total runs: 352
24-hour runs: 5
7-day runs: 65
30-day runs: 352
Model's Last Updated: October 13 2026

Introduction of gemma-4-E2B-it-dflash2

Model Details of gemma-4-E2B-it-dflash2

Gemma-4-E2B-it-DFlash2

A DFlash2 draft model for speculative decoding with google/gemma-4-E2B-it as the verifier, trained with speculators . The drafter proposes 7 tokens at a time and the verifier checks them in one forward pass, so output is identical to running the verifier alone. This makes it a lossless speedup. Mean acceptance length is 3.09 tokens committed per verification step, up to 5.41 on math_reasoning. that gives a throughput speedup over the verifier alone of 3.57× on math_reasoning and 3.06× on HumanEval.

Training code: rasyosef/train-dspark-draft-models .

Trained on 100,000 samples.

Usage

vLLM loads the verifier automatically from the config, so don't pass it separately.

vllm serve rasyosef/gemma-4-E2B-it-dflash2 --port 8000 --gpu-memory-utilization 0.8

Then query the OpenAI-compatible endpoint at http://localhost:8000/v1 .

Details

Architecture. A Qwen3-style decoder with 5 draft layers, ~0.32B params, bfloat16. It has hidden size 1536, MLP size 6144, and 12 query heads over 4 KV heads (GQA, head dim 128). The first four layers use sliding-window attention (window 2048) and the last uses full attention. Block size is 8. The draft vocabulary is the verifier's full 262,144 tokens, with no reduction. Aux hidden states come from verifier layers 3/13/23/33.

Training. 4 epochs at lr 4e-4 (AdamW, cosine schedule with 4% warmup). The data is 100,000 filtered Open PerfectBlend prompts regenerated by the verifier itself, split 96/4 into train and validation. Prompts were prepared at 2048 tokens. Training sequence length was 8192, with up to 512 anchors per sample. Verifier hidden states were pulled on demand from a running vLLM server during training and deleted after use, rather than staged to disk up front.

Evaluation

evaluate.py throughput across the nine RedHatAI/speculator_benchmarks subsets. acceptance_length is mean tokens committed per verification step, including the bonus token. Its floor is 1.0 and its ceiling is 8.0 at block size 8.

subset acceptance_length pos_0 pos_1 pos_2 pos_3 pos_4 pos_5 pos_6
math_reasoning 5.408 88.4% 78.2% 69.8% 61.4% 54.1% 47.6% 41.2%
HumanEval 4.200 79.4% 63.8% 51.3% 41.8% 34.2% 27.6% 21.9%
tool_call 2.916 65.2% 43.0% 29.4% 21.2% 15.4% 10.6% 6.9%
translation 2.840 64.6% 43.2% 29.2% 19.8% 13.1% 9.0% 5.1%
rag 2.792 68.1% 43.8% 28.1% 17.5% 10.9% 7.1% 3.6%
question 2.648 60.6% 36.1% 23.4% 16.6% 12.4% 9.0% 6.7%
writing 2.647 59.7% 36.1% 23.5% 16.8% 12.6% 9.3% 6.8%
qa 2.248 55.4% 29.9% 16.9% 10.4% 6.6% 3.7% 2.0%
summarization 2.111 56.0% 27.8% 13.7% 7.2% 3.9% 1.8% 0.7%

Weighted across all subsets: 3.094 over 108,043 verification steps.

Acceptance is highest where the verifier's next token is most predictable, and math_reasoning is in a class of its own. It leads HumanEval by about 1.2 tokens and still accepts more than two-thirds of pos_2 drafts (69.8%). Its last position (pos_6, 41.2%) sits above HumanEval's pos_4 (34.2%). math_reasoning is the one subset that makes real use of the full block. HumanEval is clearly second at 4.20, well ahead of everything else.

Comparison with MTP and DSpark

Acceptance length on the same nine subsets for Gemma's MTP drafter ( google/gemma-4-E2B-it-assistant ) and the DSpark drafter. The three propose different numbers of tokens per step, so their ceilings differ (9.0 for MTP, 9.0 for DSpark, 8.0 for DFlash2). A longer draft also costs more per step, so acceptance length alone doesn't determine speed. See the throughput section below for that.

subset MTP (8 draft tokens) DSpark (8 draft tokens) DFlash2 (7 draft tokens) best
math_reasoning 4.867 5.534 5.408 DSpark
HumanEval 4.680 3.842 4.200 MTP
tool_call 3.208 2.625 2.916 MTP
translation 3.793 2.427 2.840 MTP
rag 3.164 2.311 2.792 MTP
question 2.780 2.496 2.648 MTP
writing 2.785 2.572 2.647 MTP
qa 2.360 2.194 2.248 MTP
summarization 2.418 1.828 2.111 MTP
mean (unweighted) 3.339 2.870 3.090 MTP

MTP has the highest acceptance length on 8 of 9 subsets and on average. DSpark leads only on math_reasoning, where its longer block pays off. DFlash2 is second on every subset, ahead of DSpark everywhere except math_reasoning. The mean here is unweighted across subsets, so it differs slightly from the weighted 3.094 above.

Throughput (tokens/s)

Output throughput (tokens/s) on a single A100 at max concurrency 1, across the same nine subsets. Baseline is gemma-4-E2B-it with no speculative decoding. Speedup is the mean throughput relative to baseline, and the fastest drafter in each row is bolded.

subset baseline (no drafter) MTP DSpark DFlash2 (this model)
math_reasoning 167.6 520.2 626.5 597.7
HumanEval 164.9 478.5 399.3 505.1
tool_call 155.3 346.7 275.8 292.5
translation 168.2 417.4 298.5 332.4
rag 153.3 270.8 216.4 247.4
question 167.3 266.8 272.2 262.8
writing 166.7 265.2 268.3 267.7
qa 166.2 257.9 261.6 250.6
summarization 159.9 237.0 194.0 215.3
average speedup 1.00× 2.08× 1.90× 2.02×

MTP has the highest average speedup at 2.08× (unweighted mean of per-subset speedups), followed by DFlash2 at 2.02× and DSpark at 1.90×. MTP is fastest on tool_call, translation, rag, and summarization. DFlash2 is fastest on HumanEval, at 3.06× versus 2.90× for MTP, even though MTP accepts more tokens per step there. DSpark is fastest on math_reasoning (3.74× versus 3.57× for DFlash2) and narrowly on question, writing, and qa. Against DSpark alone, DFlash2 is ahead on HumanEval, translation, rag, summarization, and tool_call, and tied on writing.

Limitations

Works only with gemma-4-E2B-it and is not usable as a standalone model. Acceptance falls off steeply past the first two positions on prose-like traffic, most of all on summarization, so the gains concentrate in math and code. On prose-heavy workloads the tail of the block rarely gets accepted. Real-world speedup depends on your traffic mix. Because verification is lossless, the verifier's own behavior and biases carry through unchanged.

License

Apache 2.0, matching the verifier's license. The speculators training code is Apache-2.0.

Runs of rasyosef gemma-4-E2B-it-dflash2 on huggingface.co

352
Total runs
5
24-hour runs
21
3-day runs
65
7-day runs
352
30-day runs

More Information About gemma-4-E2B-it-dflash2 huggingface.co Model

More gemma-4-E2B-it-dflash2 license Visit here:

https://choosealicense.com/licenses/apache-2.0

gemma-4-E2B-it-dflash2 huggingface.co

gemma-4-E2B-it-dflash2 huggingface.co is an AI model on huggingface.co that provides gemma-4-E2B-it-dflash2's model effect (), which can be used instantly with this rasyosef gemma-4-E2B-it-dflash2 model. huggingface.co supports a free trial of the gemma-4-E2B-it-dflash2 model, and also provides paid use of the gemma-4-E2B-it-dflash2. Support call gemma-4-E2B-it-dflash2 model through api, including Node.js, Python, http.

gemma-4-E2B-it-dflash2 huggingface.co Url

https://huggingface.co/rasyosef/gemma-4-E2B-it-dflash2

rasyosef gemma-4-E2B-it-dflash2 online free

gemma-4-E2B-it-dflash2 huggingface.co is an online trial and call api platform, which integrates gemma-4-E2B-it-dflash2's modeling effects, including api services, and provides a free online trial of gemma-4-E2B-it-dflash2, you can try gemma-4-E2B-it-dflash2 online for free by clicking the link below.

rasyosef gemma-4-E2B-it-dflash2 online free url in huggingface.co:

https://huggingface.co/rasyosef/gemma-4-E2B-it-dflash2

gemma-4-E2B-it-dflash2 install

gemma-4-E2B-it-dflash2 is an open source model from GitHub that offers a free installation service, and any user can find gemma-4-E2B-it-dflash2 on GitHub to install. At the same time, huggingface.co provides the effect of gemma-4-E2B-it-dflash2 install, users can directly use gemma-4-E2B-it-dflash2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

gemma-4-E2B-it-dflash2 install url in huggingface.co:

https://huggingface.co/rasyosef/gemma-4-E2B-it-dflash2

Url of gemma-4-E2B-it-dflash2

gemma-4-E2B-it-dflash2 huggingface.co Url

Provider of gemma-4-E2B-it-dflash2 huggingface.co

rasyosef
ORGANIZATIONS

Other API from rasyosef

huggingface.co

Total runs: 5.1K
Run Growth: 794
Growth Rate: 15.69%
Updated:October 07 2025
huggingface.co

Total runs: 659
Run Growth: 598
Growth Rate: 90.74%
Updated:October 07 2025
huggingface.co

Total runs: 7
Run Growth: 0
Growth Rate: 0.00%
Updated:September 16 2024