gemma-4-E2B-it-dflash2 is an open-weight model from Yosef Worku Alemneh, released under Apache License 2.0. It has 323M parameters. At 16-bit it needs about 0.8 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.
A DFlash2 draft model for speculative decoding with google/gemma-4-E2B-it as the verifier, trained with speculators.
Runs On
What it takes to serve gemma-4-E2B-it-dflash2 (323M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.6 GB | 0.8 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.3 GB | 0.4 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.2 GB | 0.2 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 12, 2026.
gemma-4-E2B-it-dflash2 on every accelerator the SAVRN Index prices, at every precision
Model Card
By Yosef Worku Alemneh, published under apache-2.0, revision 6e12646d4e8c.
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 mathreasoning. that gives a throughput speedup over the verifier alone of 3.57× on mathreasoning and 3.06× on HumanEval. vLLM loads the verifier automatically from the config, so don't pass it separately. Then query the OpenAI-compatible endpoint at http://localhost:8000/v1. Architecture. A Qwen3-style decoder with 5…
Read Yosef Worku Alemneh's full model card
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.
Configuration
- Architecture
- DFlash2DraftModel
Identity and Version
- Repository
- rasyosef/gemma-4-E2B-it-dflash2
- Publisher
- Yosef Worku Alemneh
- Task
- Not stated by the source
- Modality
- Other
- Library
- transformers
- Parameters
- 323M parameters
- Languages
- Not stated by the source
- Revision
- 6e12646d4e8cc58650fcf736e137110e75607cee
- First published
- 2026-09-25
- Last updated
- 2026-09-26
Files and Weights
8 files, 646.1 MB in total. The weights are 1 file totalling 646.1 MB in safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 646.1 MB | 569200992be1 |
| config.json | Configuration | 2.0 KB | — |
| config.py | Configuration | 1.4 KB | — |
| training_state.json | Configuration | 51 B | — |
| val_metrics.json | Configuration | 821 B | — |
| README.md | Documentation | 7.4 KB | — |
| train_command.txt | Other | 701 B | — |
| .gitattributes | Repository | 1.5 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 646.1 MB
Released by Yosef Worku Alemneh through its official repository on Hugging Face. Read the license.
Built From
- Derived from google/gemma-4-E2B-it
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 646.1 MB |
| 16-bit | 0.6 GB |
| 8-bit | 0.3 GB |
| 4-bit | 0.2 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About gemma-4-E2B-it-dflash2
How much GPU memory does gemma-4-E2B-it-dflash2 need?
About 0.8 GB at 16-bit and 0.2 GB at 4-bit: the weights (323M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run gemma-4-E2B-it-dflash2 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-E2B-it-dflash2 commercially?
Yes. gemma-4-E2B-it-dflash2 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.