Module dflash_loader

Module dflash_loader 

Source
Expand description

2026-09-25: DFlash drafter loader: parses the drafter’s config.json and loads its weights into DflashWeights for crate::dflash_head::BlockDiffusionDraftHead.

The loader reads no embedding or LM head: BlockDiffusionDraftHead::from_weights takes the target model’s. Tensor names may be bare or model.-prefixed.

Owner: model-arch weight loader. Invariants: none beyond the types.

Structs§

DflashConfig
2026-09-25: The fields of a drafter’s config.json that the engine reads, under their config.json names. Unknown keys are ignored.
DflashLayerWeights
2026-09-25: One drafter layer’s weights. The projections go through dense_bf16_or_nvfp4; the norms and conv tensors are the store’s pointers.
DflashRopeScaling
2026-09-25: The rope_scaling fields the drafter head reads.
DflashSubConfig
2026-09-25: The nested dflash_config block of the drafter’s config.json.
DflashWeights
2026-09-25: The drafter weights load_dflash_weights returns. It holds no embedding or LM head.

Functions§

load_dflash_weights
2026-09-25: Load the drafter’s weights from the drafter’s own WeightStore.
parse_dflash_config
2026-09-25: Parse a drafter’s config.json into a DflashConfig. The error is “Parsing DFlash drafter config.json” with the serde error as its cause.
store_has_dflash_weights
2026-09-25: True when the store has fc.weight or model.fc.weight. Loads nothing.