Gemma4-E4B-it-MMFlash
MMFlash draft model for speculative decoding of google/gemma-4-E4B-it on image and text inputs. It is not a standalone language model; it is paired with the target model in a speculative-decoding server (SGLang DFLASH).
MMFlash builds on DFlash block-diffusion drafting: the draft reads hidden states from five layers of the target and proposes a block of 16 tokens in one forward pass, and the target verifies the block in one forward pass. MMFlash keeps the DFlash architecture and is trained on multimodal data with a loss weighted by per-token visual-grounding (visual-KL) scores.
Qwen3.5-9B on a MathVista question, recorded in real time on one NVIDIA H200 with SGLang (greedy decoding).
Need a drafter for another model? Email us at fscnkucs@gmail.com and we can help train one. We will keep updating these releases, and a Qwen4 checkpoint is planned.
Model details
| Target model | google/gemma-4-E4B-it |
| Parameters | 537M (bf16) |
| Block size | 16 |
| Target hidden states | layers 1, 10, 20, 30, 39 (of 42) |
Usage
SGLang
SGLANG_GEMMA_OUT_OF_PLACE_POSITION_MUTATION=1 \
SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1 \
python -m sglang.launch_server \
--model-path google/gemma-4-E4B-it \
--speculative-algorithm DFLASH \
--speculative-draft-model-path FSCCS/Gemma4-E4B-it-MMFlash \
--speculative-dflash-block-size 16 \
--attention-backend triton \
--mm-attention-backend sdpa \
--mem-fraction-static 0.7 \
--reasoning-parser gemma4 \
--trust-remote-code
vLLM
vllm serve google/gemma-4-E4B-it \
--dtype bfloat16 \
--max-model-len 32768 \
--reasoning-parser gemma4 \
--speculative-config '{"method": "dflash", "model": "FSCCS/Gemma4-E4B-it-MMFlash", "num_speculative_tokens": 15}'
Tested with vLLM 0.32.0, which serves DFlash drafts natively. num_speculative_tokens is the block size minus one. vLLM does not have the gemma4-spec changes, so ฯ is lower than in the results below (ChartQA: 5.71 vs 6.39).
Results
Each cell is ฯ / speedup: ฯ is the average acceptance length (tokens accepted per verification step), and the speedup is the decoding throughput over Gemma 4 E4B-it without speculative decoding.
Temperature 0
| Method | ChartQA | MMStar | DynaMath |
|---|---|---|---|
| MTP (5, official) | 3.81 / 1.78ร | 3.19 / 1.48ร | 4.04 / 1.89ร |
| MTP (15) | 4.73 / 1.66ร | 3.74 / 1.33ร | 5.17 / 1.75ร |
| EAGLE-3 (16) | 4.87 / 2.27ร | 4.04 / 1.50ร | 6.23 / 1.90ร |
| MMFlash (16) | 6.39 / 2.87ร | 4.83 / 2.10ร | 7.15 / 3.02ร |
Values in parentheses are the number of draft steps for MTP, the draft tree size for EAGLE-3, and the block size for MMFlash. MTP (5, official) is Google's released drafter, google/gemma-4-E4B-it-assistant, run for 5 steps; MTP (15) runs it for 15 steps.
Concurrency (temperature 0)
MMFlash at 1, 8 and 32 requests in flight, on a single NVIDIA H200. Each cell is the decode throughput in tokens/s, with the speedup over Gemma 4 E4B-it alone at the same concurrency in parentheses.
| Concurrency | ChartQA | CharXiv | MMStar | MMBench | DynaMath | MathVista | MathVerse | Avg. |
|---|---|---|---|---|---|---|---|---|
| 1 | 521 (2.87ร) | 448 (2.50ร) | 377 (2.10ร) | 363 (1.99ร) | 543 (3.02ร) | 454 (2.53ร) | 436 (2.45ร) | 449 (2.49ร) |
| 8 | 2,819 (2.42ร) | 2,491 (2.16ร) | 2,129 (1.89ร) | 1,986 (1.75ร) | 3,068 (2.60ร) | 2,391 (2.25ร) | 2,484 (2.12ร) | 2,481 (2.17ร) |
| 32 | 5,230 (1.68ร) | 4,957 (1.64ร) | 4,011 (1.49ร) | 3,948 (1.25ร) | 5,199 (1.52ร) | 4,332 (1.52ร) | 5,122 (1.46ร) | 4,686 (1.51ร) |
Citation
Coming soon.
- Downloads last month
- 6