pub struct ArchSpec {
pub activation: Activation,
pub norm_flavor: NormFlavor,
pub qk_norm: bool,
pub sandwich_norms: bool,
pub embed_scale_sqrt_hidden: bool,
pub attn_logit_softcap: Option<f64>,
pub final_logit_softcap: Option<f64>,
pub query_pre_attn_scalar: Option<f64>,
pub rope_theta: f64,
pub rope_scaling: RopeScaling,
pub rope_local_theta: Option<f64>,
pub layers: Vec<LayerKind>,
}Expand description
Resolved architecture description consumed by the decoder.
Fields§
§activation: Activation§norm_flavor: NormFlavor§qk_norm: boolPer-head RMSNorm on Q and K after projection (gemma-3, qwen-3).
sandwich_norms: boolExtra post-attention / post-MLP norms around the residual adds (gemma-3 “sandwich” norms).
Multiply embeddings by sqrt(hidden_size) (gemma; computed in f32).
attn_logit_softcap: Option<f64>Soft-capping of attention logits / final logits (gemma-2 family).
final_logit_softcap: Option<f64>§query_pre_attn_scalar: Option<f64>Attention scale divisor override (1/sqrt(query_pre_attn_scalar)
instead of 1/sqrt(head_dim)).
rope_theta: f64Global-layer RoPE base + scaling.
rope_scaling: RopeScaling§rope_local_theta: Option<f64>Sliding layers rotate with this base instead (gemma dual-RoPE).
layers: Vec<LayerKind>One entry per transformer layer.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArchSpec
impl RefUnwindSafe for ArchSpec
impl Send for ArchSpec
impl Sync for ArchSpec
impl Unpin for ArchSpec
impl UnsafeUnpin for ArchSpec
impl UnwindSafe for ArchSpec
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