pub struct V2Config {
pub vocab_size: usize,
pub d_model: usize,
pub num_heads: usize,
pub num_kv_heads: usize,
pub num_layers: usize,
pub head_dim: usize,
pub max_seq_len: usize,
pub hada_n: usize,
pub mhc_lanes: usize,
pub rope_theta: f32,
pub kv_window: usize,
pub engram: EngramGeometry,
}Expand description
Full v2 model geometry.
Fields§
§vocab_size: usize§d_model: usize§num_heads: usize§num_kv_heads: usize§num_layers: usize§head_dim: usize§max_seq_len: usize§hada_n: usizeHadamard width in HadamardMLP: d_model rounded up to a power of two.
mhc_lanes: usize§rope_theta: f32§kv_window: usizeSliding attention window. 0 disables it (full causal).
engram: EngramGeometryImplementations§
Source§impl V2Config
impl V2Config
Sourcepub fn active_lane(&self, layer: usize) -> usize
pub fn active_lane(&self, layer: usize) -> usize
The lane layer i is “assigned” to — eye(n)[i % n] in
architecture.Stack, which drives the pre_off / post_off biases.
Sourcepub fn pre_off(&self, layer: usize, lane: usize) -> f32
pub fn pre_off(&self, layer: usize, lane: usize) -> f32
pre_off[layer][lane] — 8 * lane_onehot - 4.
Sourcepub fn post_off(&self, layer: usize, lane: usize) -> f32
pub fn post_off(&self, layer: usize, lane: usize) -> f32
post_off[layer][lane] — -4 * (1 - lane_onehot).
pub fn validate(&self) -> Result<(), &'static str>
Trait Implementations§
impl StructuralPartialEq for V2Config
Auto Trait Implementations§
impl Freeze for V2Config
impl RefUnwindSafe for V2Config
impl Send for V2Config
impl Sync for V2Config
impl Unpin for V2Config
impl UnsafeUnpin for V2Config
impl UnwindSafe for V2Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more