pub struct DFlashLevers {Show 30 fields
pub any_diagnostic_armed: bool,
pub debug_dump: bool,
pub debug_dump_full: bool,
pub log_drafts: bool,
pub block_dump: bool,
pub block_dump_at_pos: usize,
pub option_b_diag: bool,
pub force_pattern: bool,
pub force_noise_pattern: bool,
pub force_no_ctx: bool,
pub force_ctx_used: Option<usize>,
pub precompute: bool,
pub precompute_commit: bool,
pub propose_warmup_n: usize,
pub option_b: bool,
pub option_b_no_ctx: bool,
pub dflash2: bool,
pub batch_propose_width: usize,
pub draft_cap: Option<usize>,
pub verify_trace: bool,
pub precompute_dump: bool,
pub ctx_parity_dump: bool,
pub no_decode_append: bool,
pub full_precompute: bool,
pub ctxlen_probe: bool,
pub dspark_markov: bool,
pub conf_tau: f32,
pub dspark_shift: Option<bool>,
pub dspark_anchor_bias: bool,
pub dspark_conf_trace: bool,
}Expand description
2026-09-25: Diagnostic and A/B levers for one loaded DFlash drafter.
Fields§
§any_diagnostic_armed: bool2026-09-25: A variable in GRAPH_SUPPRESSING_DIAGNOSTICS is set, at any
value. forward_block then runs eagerly, without CUDA graphs. This is
presence, not truth: METRALE_DFLASH_BLOCK_DUMP=0 suppresses graphs and
arms no dump.
debug_dump: bool2026-09-25: METRALE_DFLASH_DEBUG_DUMP=1: log the first 10 BF16 values
of key forward_block intermediates.
debug_dump_full: bool2026-09-25: METRALE_DFLASH_DEBUG_DUMP_FULL=1: one-shot whole-tensor dumps
to /tmp, and the first propose’s drafts to the log.
log_drafts: bool2026-09-25: METRALE_DFLASH_LOG_DRAFTS=1: log the first propose’s drafts
(one-shot per model).
block_dump: bool2026-09-25: METRALE_DFLASH_BLOCK_DUMP=1: one-shot /tmp dumps of the
block logits and per-layer intermediates, gated by block_dump_armed_at.
block_dump_at_pos: usize2026-09-25: METRALE_DFLASH_BLOCK_DUMP_AT_POS=<n>: arm the block dump only
at decode position >= n. Unset or unparseable is 0.
option_b_diag: bool2026-09-25: METRALE_DFLASH_OPTION_B_DIAG=1: one-shot read-back of the
K row layer 0 just wrote to the paged drafter cache, compared with its
source.
force_pattern: bool2026-09-25: METRALE_DFLASH_DEBUG_FORCE_PATTERN=1: overwrite the first ctx
slot forward_block reads with a deterministic pattern.
force_noise_pattern: bool2026-09-25: METRALE_DFLASH_DEBUG_FORCE_NOISE_PATTERN=1: the same, for the
noise rows.
force_no_ctx: bool2026-09-25: METRALE_DFLASH_DEBUG_CTX_OFF=1: drop ctx conditioning
(eff_ctx = 0).
force_ctx_used: Option<usize>2026-09-25: METRALE_DFLASH_DEBUG_CTX_USED=<n>: cap eff_ctx at n (it
stays bounded by the ctx rows present and ctx_window).
precompute: bool2026-09-25: METRALE_DFLASH_PRECOMPUTE=1: also run the ctx K/V precompute
from forward_block; propose_drafts runs it either way.
precompute_commit: bool2026-09-25: METRALE_DFLASH_PRECOMPUTE_COMMIT=1: let that diagnostic run
write to the paged cache (its commit argument).
propose_warmup_n: usize2026-09-25: METRALE_DFLASH_PROPOSE_WARMUP_N=<n>: eager passes per block
width before graph capture. Unset or unparseable is 2.
option_b: bool2026-09-25: The paged drafter cache for ctx K/V (“Option B”). On unless
METRALE_DFLASH_OPTION_B=0; resolved by option_b_from in dflash_head.rs.
option_b_no_ctx: bool2026-09-25: METRALE_DFLASH_OPTION_B_NO_CTX=1: pass ctx_count = 0, so
paged attention sees only the γ K/V written in-layer.
dflash2: bool2026-09-25: The DFlash2 conv and selector path. Runs when the checkpoint
carries its components, unless METRALE_DFLASH2=0.
batch_propose_width: usize2026-09-25: METRALE_DFLASH_BATCH_PROPOSE=<width> caps the cross-sequence
batch. Unset is usize::MAX (as wide as the scratch bands allow); 0 or
1 makes propose_batch_max return 1.
draft_cap: Option<usize>2026-09-25: METRALE_DFLASH_DRAFT_CAP=<n>: return at most n drafts per
propose. None caps at the block width in flight (block_g).
verify_trace: bool2026-09-25: METRALE_DFLASH_VERIFY_TRACE=1: log every propose’s drafts
before the row-0 drop and the cap.
precompute_dump: bool2026-09-25: METRALE_DFLASH_PRECOMPUTE_DUMP=1: one-shot /tmp dumps of
the ctx K/V precompute intermediates.
ctx_parity_dump: bool2026-09-25: METRALE_DFLASH_CTX_PARITY_DUMP=1: one-shot /tmp dump of the
accumulated ctx hidden rows.
no_decode_append: bool2026-09-25: METRALE_DFLASH_DEBUG_NO_DECODE_APPEND=1: skip the ctx append
at the start of propose_drafts.
full_precompute: bool2026-09-25: METRALE_DFLASH_DEBUG_FULL_PRECOMPUTE=1: the non-batched
propose recomputes the whole ctx prefix (committed = 0) each step.
ctxlen_probe: bool2026-09-25: METRALE_DFLASH_CTXLEN_PROBE=1: warn when ctx_positions is
not strictly increasing, and log ctx_len against the position when the
position is a multiple of 16.
dspark_markov: bool2026-09-25: The sequential Markov fixup. Runs when the drafter carries
the head, unless METRALE_DSPARK_MARKOV=0, which takes the plain
per-row argmax loop.
conf_tau: f322026-09-25: METRALE_DSPARK_CONF_TAU=<t>: sigmoid-space acceptance
threshold for the confidence head. Unset or unparseable is 0.0, which
leaves the head off.
dspark_shift: Option<bool>2026-09-25: METRALE_DSPARK_SHIFT=1|0 forces the shifted-row convention
on or off; any other value (None) defers to the drafter config.
dspark_anchor_bias: bool2026-09-25: Row 0 carries the Markov bias. On unless
METRALE_DSPARK_ANCHOR_BIAS=0. Confidence truncation also requires it:
an unbiased row never writes its confidence slot.
dspark_conf_trace: bool2026-09-25: METRALE_DSPARK_CONF_TRACE=1: log the confidence logits and
sigmoids.
Implementations§
Source§impl DFlashLevers
impl DFlashLevers
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
2026-09-25: Resolve from the environment. The head calls it once, in
from_weights.rs; per-step code reads the head’s levers field.
Sourcepub fn defaults() -> Self
pub fn defaults() -> Self
2026-09-25: What from_env resolves to with none of these variables set
(checked by nothing_set_resolves_to_defaults).
Sourcepub fn block_dump_armed_at(&self, position: usize) -> bool
pub fn block_dump_armed_at(&self, position: usize) -> bool
2026-09-25: The block dump is armed for this decode position.
Trait Implementations§
Source§impl Clone for DFlashLevers
impl Clone for DFlashLevers
Source§fn clone(&self) -> DFlashLevers
fn clone(&self) -> DFlashLevers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more