pub struct V41Runtime {Show 38 fields
pub attn_cfg: AttnV41Cfg,
pub moe_cfg: MoeV41Cfg,
pub attn: Mutex<AttnV41>,
pub moe: Mutex<MoeV41>,
pub engram: Mutex<EngramV41>,
pub lru: Mutex<ExpertLru>,
pub arena: ExpertArena,
pub slices: Arc<ExpertSliceMap>,
pub rows: EngramRowReader,
pub tables: Arc<EngramHashTables>,
pub hasher: Mutex<EngramHasher>,
pub shared: Mutex<SharedV41>,
pub step_hashes: Mutex<Option<Vec<i64>>>,
pub pre_prev: DevicePtr,
pub mixes_s: DevicePtr,
pub reader_threads: usize,
pub n_layers: usize,
pub hc_mult: usize,
pub hidden: usize,
pub sinkhorn_iters: usize,
pub hc_eps: f32,
pub norm_eps: f32,
pub pre_a: DevicePtr,
pub pre_f: DevicePtr,
pub post_s: DevicePtr,
pub comb_s: DevicePtr,
pub attn_in: DevicePtr,
pub max_tokens: usize,
pub step_moe: Mutex<MoeV41Timing>,
pub step_attn_ms: Mutex<f64>,
pub step_engram_ms: Mutex<f64>,
pub step_start: Mutex<Option<Instant>>,
pub graph_disabled: AtomicBool,
pub seg: Mutex<SegState>,
pub roles: Mutex<Vec<Option<LayerRole>>>,
pub engram_layers: Mutex<Vec<(usize, usize)>>,
pub pred_x: DevicePtr,
pub pred_trace: Mutex<Option<BufWriter<File>>>,
}Expand description
2026-09-25: Everything the layers share for the one sequence in flight.
Fields§
§attn_cfg: AttnV41Cfg§moe_cfg: MoeV41Cfg§attn: Mutex<AttnV41>§moe: Mutex<MoeV41>§engram: Mutex<EngramV41>§lru: Mutex<ExpertLru>§arena: ExpertArena§slices: Arc<ExpertSliceMap>§rows: EngramRowReader§tables: Arc<EngramHashTables>§hasher: Mutex<EngramHasher>§step_hashes: Mutex<Option<Vec<i64>>>2026-09-25: The step’s engram hashes, computed by the first engram layer (hash index 0) or the segment-graph preload, and reused by the others.
pre_prev: DevicePtr2026-09-25: The delayed pre mix, f32 [max_tokens, hc].
mixes_s: DevicePtr2026-09-25: f32 [max_tokens, (2 + hc) * hc] scratch between
hc_v41_mixes_dot and hc_v41_finish_collapse.
reader_threads: usize§n_layers: usize§hc_mult: usize§sinkhorn_iters: usize§hc_eps: f32§norm_eps: f32§pre_a: DevicePtr§pre_f: DevicePtr§post_s: DevicePtr§comb_s: DevicePtr§attn_in: DevicePtr§max_tokens: usize§step_moe: Mutex<MoeV41Timing>2026-09-25: Per-step totals across layers, logged by the last layer when
METRALE_DS41_DIAG=1.
step_attn_ms: Mutex<f64>§step_engram_ms: Mutex<f64>§step_start: Mutex<Option<Instant>>§graph_disabled: AtomicBool2026-09-25: Set when a METRALE_DS41_GRAPH capture failed: segments
without a graph run eagerly from then on; captured graphs keep replaying.
seg: Mutex<SegState>2026-09-25: The multi-layer segment graphs (METRALE_DS41_STEP_GRAPH=1,
step_seg.rs).
roles: Mutex<Vec<Option<LayerRole>>>2026-09-25: Every layer’s role, filled as the layers are built; a segment owner reads the roles of the layers its graph spans.
engram_layers: Mutex<Vec<(usize, usize)>>2026-09-25: (layer, hash index) of the engram layers.
pred_x: DevicePtr2026-09-25: METRALE_DS41_PREDICT_TRACE: the last three layers’ MoE
inputs (bf16 [3, hidden], slot layer % 3) and the trace file.
pred_trace: Mutex<Option<BufWriter<File>>>