pub struct AttentionWeights {
pub q_proj: DenseWeight,
pub k_proj: DenseWeight,
pub v_proj: DenseWeight,
pub o_proj: QuantizedWeight,
pub q_norm: DenseWeight,
pub k_norm: DenseWeight,
pub q_norm_full: Option<DenseWeight>,
pub k_norm_full: Option<DenseWeight>,
pub k_scale: f32,
pub v_scale: f32,
}Expand description
2026-09-25: Full-attention layer weights.
Fields§
§q_proj: DenseWeight§k_proj: DenseWeight§v_proj: DenseWeight§o_proj: QuantizedWeight§q_norm: DenseWeight2026-09-25: Per-head Q RMSNorm weight, [head_dim].
k_norm: DenseWeight2026-09-25: Per-head K RMSNorm weight, [head_dim].
q_norm_full: Option<DenseWeight>2026-09-25: Full-width Q RMSNorm weight, [num_heads * head_dim]: one
norm over the whole Q projection before RoPE. The MiniMax loader sets it;
when Some, the attention forward applies it instead of the per-head
q_norm.
k_norm_full: Option<DenseWeight>2026-09-25: Full-width K RMSNorm weight, [num_kv_heads * head_dim].
k_scale: f322026-09-25: K scale for the FP8 KV cache, used when no FP8 calibration is loaded.
v_scale: f322026-09-25: V scale for the FP8 KV cache, as k_scale.
Trait Implementations§
Source§impl Clone for AttentionWeights
impl Clone for AttentionWeights
Source§fn clone(&self) -> AttentionWeights
fn clone(&self) -> AttentionWeights
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttentionWeights
impl Debug for AttentionWeights
impl Copy for AttentionWeights
Auto Trait Implementations§
impl Freeze for AttentionWeights
impl RefUnwindSafe for AttentionWeights
impl Send for AttentionWeights
impl Sync for AttentionWeights
impl Unpin for AttentionWeights
impl UnwindSafe for AttentionWeights
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