pub struct SpecOpts {
pub dynk: Option<DynKCfg>,
pub adapt_k_lo: Option<usize>,
pub pmin: f32,
pub defer: bool,
pub defer_guard_sync: bool,
pub prefill_chunk: Option<usize>,
pub wide_ring: Option<usize>,
}Expand description
Spec-round admission options (mtp10). Every knob defaults OFF; each is a bounded policy that can only shrink the drafted window — the committed output is the target rows’ argmax at every setting, so byte identity is untouched by construction.
Fields§
§dynk: Option<DynKCfg>Rolling-window K decay (the last-resort shape bound). See DynKCfg.
adapt_k_lo: Option<usize>Adaptive per-round window (the dflash MEMRA_DFLASH_ADAPT “accepted+1” recipe):
next round drafts clamp(last_accept + 1, k_lo, k). Some(k_lo) arms it.
pmin: f32p-min draft-confidence guard (the MEMRA_SPEC_PMIN mechanism, sub-threshold token DISCARDED UNCOUNTED — the reference engines’ normalization). Applies at j == 0 too (the MEMRA_SPEC_PMIN0 zero-draft-round semantics): a low-confidence round drafts NOTHING and its verify is a plain t == 1 step that still commits one token — unpredictable stretches never pay draft + verify-column overhead. 0.0 = off.
defer: boolDeferred round readback (mtp11, the spec.rs slice-2 structure ported): the
chain’s argmax feeds the next step ON DEVICE through the armed chain-embed
table (arm_spec_devchain required), the guard’s confidences land in device
slots, and the chain drains ONCE per round before the verify (the PLE host
n-gram gather needs the chunk’s token ids, so this family’s floor is a 2-drain
round, not spec.rs’s 1). t == 1 steps take the device-argmax fast path and the
prefill dtoh shrinks to one row. Committed bytes identical BY CONSTRUCTION
(same kernels, same picks; spec-gate arbitrates). Default OFF (flags law);
mutually exclusive with trace (trace reads per-step host rows).
defer_guard_sync: boolWith defer + pmin: keep the guard SEQUENTIAL — one 4-byte prob dtoh per
chain step, the chain stops exactly at the sub-threshold step (today’s cost
shape). Default OFF = the deferred guard: probabilities drain with the chain
and truncate at the FIRST sub-threshold step — same picks and counters
bit-for-bit, but the dispatched suffix past the stop is work the sequential
arm never paid. The guard-forces-a-readback A/B the owner asked to measure.
prefill_chunk: Option<usize>Long-context lane: chunked co-prefill (trunk chunk forward with the head
skipped, then the draft consumes that chunk’s wide rows) instead of the one-shot
prompt forward — the one-shot shape at 500k+ would materialize chunk-sized
transients per plane AND a [n, vocab] logits block. None = the historical
one-shot (byte-stable receipts).
wide_ring: Option<usize>Long-context lane: RING-bounded wide stash rows (spec_arm_ring) — at 1M
capacity the whole-history stash is ~41 GB/card. Requires prefill_chunk (the
co-prefill consumes each chunk before the ring overwrites it) and must be
= 2 * prefill_chunk.
None= whole-history (the historical layout).