ModelLevers

Struct ModelLevers 

Source
pub struct ModelLevers {
Show 20 fields pub gdn_regresident: bool, pub gdn_batched_fla: bool, pub gdn_wy17: bool, pub gdn_wyn: bool, pub gemv_sw: bool, pub decode_ffn_via_gemm: bool, pub ffn_small_m: bool, pub holo_moe_down_fp4: bool, pub holo_moe_gateup_fp4: bool, pub moe_union_stats: bool, pub dflash_contig_attn: bool, pub lora_eager: bool, pub lora_rotate: bool, pub k4_diag: bool, pub gemma4_diag: bool, pub bf16_tc_proj: bool, pub max_decode_seqs: u32, pub shadow_topk: usize, pub kv_poison: bool, pub drafter: DrafterContext,
}
Expand description

Kernel-path levers for one loaded model.

Plain Copy data resolved from the environment at model construction. Group membership follows the subsystem the lever steers, so a reader can see at a glance which part of the forward pass a flag reaches.

Fields§

§gdn_regresident: bool

Keep GDN recurrent state in registers across the prefill chunk loop. Default ON (the fold that shipped in PR #369, −7.25 % wall); the env var is an opt-OUT, which is why the field is stored positively and the resolution inverts it.

§gdn_batched_fla: bool

Batched FLA path for multi-sequence GDN decode.

§gdn_wy17: bool

WY17 GDN recurrence variant. Ships ON; ATLAS_GDN_WY17=0 opts out.

§gdn_wyn: bool

WY-N GDN recurrence variant. Ships ON; ATLAS_GDN_WYN=0 opts out.

§gemv_sw: bool

Lossless single-warp decode GEMV (w4a16_gemv_sw, w4a16_gemv_dual_sw). Ships ON; ATLAS_NO_GEMV_SW=1 restores the 64-thread kernels.

§decode_ffn_via_gemm: bool

Route decode FFN through the tile GEMM rather than the scalar GEMV.

§ffn_small_m: bool

Small-M FFN GEMM tile shape. Ships ON; ATLAS_FFN_SMALLM=0 opts out.

§holo_moe_down_fp4: bool

FP4 holo layout for the MoE down projection.

§holo_moe_gateup_fp4: bool

FP4 holo layout for the MoE gate/up projections.

§moe_union_stats: bool

Collect per-layer MoE expert-union statistics. Diagnostic.

§dflash_contig_attn: bool

Contiguous-attention path for the DFlash head.

§lora_eager: bool

Apply LoRA eagerly at load instead of at each forward.

§lora_rotate: bool

Allow hot rotation of LoRA adapters.

§k4_diag: bool

K=4 chain-widening diagnostics.

§gemma4_diag: bool

Per-layer hidden-state norm dumps on the Gemma-4 decode path. Heavy — one device-to-host copy per layer.

§bf16_tc_proj: bool

BF16 tensor-core attention projections: dequant FP4 to BF16 and use a BF16 MMA instead of the default path, which crushes activations to FP8 E4M3. Removes the FP8 prefill perturbation on those projections.

§max_decode_seqs: u32

Configured max decode batch (--max-batch-size), the reference count the split-K attention split count is pinned to. Not from the environment: TransformerModel::new writes it from the serve arg.

It pins DETERMINISM — the online-softmax split-merge is non-associative, so a sequence decoded alone must see the same reduction tree as one co-batched with fifteen others. Held in a OnceLock it was also idempotent, so a second model with a different max batch would silently keep the first model’s split count.

§shadow_topk: usize

ATLAS_MTP_SHADOW_TOPK=k (0 = off, clamped to 8): the drafter D2Hs its logits and logs the top-k candidates. Observational only.

§kv_poison: bool

ATLAS_KV_POISON=1 — fill a fresh KV block with NaN instead of zero, the discriminator for the “unwritten fresh tail block read” hypothesis. A diagnostic that changes what the kernels READ, so it must not leak across a swap.

§drafter: DrafterContext

MTP drafter context policy (ATLAS_NO_DRAFTER_CONTEXT / ATLAS_DRAFTER_PREFILL_ONLY), resolved and logged once per model. The two halves are coupled — prefill without carry is a measured −927 ms/turn loss — so they travel as one value.

Implementations§

Source§

impl ModelLevers

Source

pub fn from_env() -> Self

Resolve from the environment. Called once, when the model is built.

Source

pub fn defaults() -> Self

What a build resolves to with no ATLAS_* set — every opt-in off, the one opt-out lever on. Tests construct a context with this instead of mutating the process environment.

Trait Implementations§

Source§

impl Clone for ModelLevers

Source§

fn clone(&self) -> ModelLevers

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 ModelLevers

Source§

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

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

impl Default for ModelLevers

Source§

fn default() -> ModelLevers

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

impl PartialEq for ModelLevers

Source§

fn eq(&self, other: &ModelLevers) -> 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 ModelLevers

Source§

impl Eq for ModelLevers

Source§

impl StructuralPartialEq for ModelLevers

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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