Skip to main content

SpecOpts

Struct SpecOpts 

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

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

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

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

Trait Implementations§

Source§

impl Clone for SpecOpts

Source§

fn clone(&self) -> SpecOpts

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for SpecOpts

Source§

impl Debug for SpecOpts

Source§

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

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

impl Default for SpecOpts

Source§

fn default() -> SpecOpts

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

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.