Expand description
2026-09-25: DFlash block-diffusion draft head (arXiv 2602.06036),
implementing DraftProposer.
A small Qwen3-style transformer drafter that emits a block of draft tokens
in one forward pass with bidirectional in-block attention. It is
conditioned on target hidden states captured at target_layer_ids,
projected by one fc layer at the drafter’s input.
Owner: model-arch (DFlash drafter). Invariants:
block_g()stays in2..=gamma.max(2)(set_block_gclamps).
Modules§
- levers
- 2026-09-25: DFlash drafter levers, resolved from the environment once per head and carried on it.
Structs§
- Block
Diffusion Draft Head - 2026-09-25: Block-diffusion draft head; its public API is the
DraftProposertrait. It uses the target’s token embedding and LM head (embed_tokens_shared,lm_head_shared/lm_head_nvfp4) alongside the drafter checkpoint’s ownfc,hidden_norm,normand layers. The geometry fields come from the drafter’s config. - Dflash
Kernels - 2026-09-25: Kernel handles for the DFlash drafter, all resolved once in
BlockDiffusionDraftHead::from_weights. A handle resolved there withtry_kernelisKernelHandle(0)when the target’s build lacks the kernel. - Dflash
Layer - 2026-09-25: One drafter layer’s weights: the bf16 norms (with per-head Q/K
RMSNorm), projections and MLP; FP8 copies of the seven GEMM weights when
the head is
Fp8Weights(Noneotherwise); and the DFlash2 conv weights (attention_conv.*,mlp_conv.*),Nonewhen the checkpoint has none. - Dflash
Proposer State - 2026-09-25: Per-sequence DFlash drafter state. One block table serves every drafter layer: the paged cache has a pool per layer, addressed by the same slots.
- Dflash
Scratch - 2026-09-25: Device scratch for the γ-block forward, allocated once per head
in
from_weights.rs.nbbelow is the head’smax_batch. - Propose
Graphs - 2026-09-25: The propose graphs per block width (see
BlockDiffusionDraftHead::propose_graphs).warmupcounts the eager passes run at a width; its capture starts once the count reachesDFlashLevers::propose_warmup_n(METRALE_DFLASH_PROPOSE_WARMUP_N, default 2).
Enums§
- Dflash
Quantization - 2026-09-25: Drafter weight precision.
from_weightsbuilds the head asBf16and switches it toFp8WeightsunlessMETRALE_DFLASH_DRAFTER_FP8=0or thefp8_gemm_n128_row_scaledkernels are missing.
Functions§
- dflash_
ctx_ cap - 2026-09-25: The DFlash context-window bound, in tokens: the most recent
target positions the drafter may accumulate. Both the per-sequence ctx
accumulator (
proposer.rs) and the model’s whole-prompt hidden capture (metrale-model-engine’simpl_a1.rs) are sized from it.