DFlashLevers

Struct DFlashLevers 

Source
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: bool

2026-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: bool

2026-09-25: METRALE_DFLASH_DEBUG_DUMP=1: log the first 10 BF16 values of key forward_block intermediates.

§debug_dump_full: bool

2026-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: bool

2026-09-25: METRALE_DFLASH_LOG_DRAFTS=1: log the first propose’s drafts (one-shot per model).

§block_dump: bool

2026-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: usize

2026-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: bool

2026-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: bool

2026-09-25: METRALE_DFLASH_DEBUG_FORCE_PATTERN=1: overwrite the first ctx slot forward_block reads with a deterministic pattern.

§force_noise_pattern: bool

2026-09-25: METRALE_DFLASH_DEBUG_FORCE_NOISE_PATTERN=1: the same, for the noise rows.

§force_no_ctx: bool

2026-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: bool

2026-09-25: METRALE_DFLASH_PRECOMPUTE=1: also run the ctx K/V precompute from forward_block; propose_drafts runs it either way.

§precompute_commit: bool

2026-09-25: METRALE_DFLASH_PRECOMPUTE_COMMIT=1: let that diagnostic run write to the paged cache (its commit argument).

§propose_warmup_n: usize

2026-09-25: METRALE_DFLASH_PROPOSE_WARMUP_N=<n>: eager passes per block width before graph capture. Unset or unparseable is 2.

§option_b: bool

2026-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: bool

2026-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: bool

2026-09-25: The DFlash2 conv and selector path. Runs when the checkpoint carries its components, unless METRALE_DFLASH2=0.

§batch_propose_width: usize

2026-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: bool

2026-09-25: METRALE_DFLASH_VERIFY_TRACE=1: log every propose’s drafts before the row-0 drop and the cap.

§precompute_dump: bool

2026-09-25: METRALE_DFLASH_PRECOMPUTE_DUMP=1: one-shot /tmp dumps of the ctx K/V precompute intermediates.

§ctx_parity_dump: bool

2026-09-25: METRALE_DFLASH_CTX_PARITY_DUMP=1: one-shot /tmp dump of the accumulated ctx hidden rows.

§no_decode_append: bool

2026-09-25: METRALE_DFLASH_DEBUG_NO_DECODE_APPEND=1: skip the ctx append at the start of propose_drafts.

§full_precompute: bool

2026-09-25: METRALE_DFLASH_DEBUG_FULL_PRECOMPUTE=1: the non-batched propose recomputes the whole ctx prefix (committed = 0) each step.

§ctxlen_probe: bool

2026-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: bool

2026-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: f32

2026-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: bool

2026-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: bool

2026-09-25: METRALE_DSPARK_CONF_TRACE=1: log the confidence logits and sigmoids.

Implementations§

Source§

impl DFlashLevers

Source

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.

Source

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).

Source

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

Source§

fn clone(&self) -> DFlashLevers

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DFlashLevers

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DFlashLevers

Source§

fn default() -> DFlashLevers

Returns the “default value” for a type. Read more
Source§

impl PartialEq for DFlashLevers

Source§

fn eq(&self, other: &DFlashLevers) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DFlashLevers

Source§

impl StructuralPartialEq for DFlashLevers

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,