pub enum TensorRole {
Show 21 variants
Embedding,
LmHead,
FinalNorm,
KdaProjection,
KdaConv,
KdaDecay,
KdaGate,
KdaNorm,
MlaProjection,
MlaNorm,
Indexer,
IndexerNorm,
MoeRouter,
MoeExpert,
MoeShared,
DenseFfn,
LayerNorm,
HyperConnection,
MtpProjection,
MtpNorm,
Vision,
}Expand description
What a tensor is for. Deliberately coarse — Slice 1 proves coverage, not placement.
Variants§
Embedding
Token embedding / final norm / lm_head.
LmHead
FinalNorm
KdaProjection
KDA linear-attention mixer (34 of the 45 text layers).
KdaConv
KdaDecay
KdaGate
KdaNorm
MlaProjection
NoPE sparse MLA (11 text layers + the MTP layer).
MlaNorm
Indexer
DSA top-k indexer that fronts each sparse-MLA layer.
IndexerNorm
MoeRouter
MoE router + experts + shared expert.
MoeExpert
DenseFfn
Dense FFN (layers 0..2, first_k_dense_replace = 3).
LayerNorm
Per-layer norms and mHC (hyper-connection) parameters.
HyperConnection
MtpProjection
MTP head at layer 45. 🪤 GLM does NOT use mtp.0.*.
MtpNorm
Vision
Vision tower — present in the checkpoint, out of scope for the text port.
Implementations§
Source§impl TensorRole
impl TensorRole
Sourcepub fn is_norm(self) -> bool
pub fn is_norm(self) -> bool
Norm-family roles. Used by the RMSNorm sanity pass: a tensor whose name
says “norm” must land in one of these, or the classifier is lying about
something. (Hazard carried from notavault-atlas: RMSNorm weights have
silently corrupted Atlas numbers before.)
Sourcepub fn is_text_model(self) -> bool
pub fn is_text_model(self) -> bool
Text-model roles Atlas must eventually implement. Vision is excluded.
Trait Implementations§
Source§impl Clone for TensorRole
impl Clone for TensorRole
Source§fn clone(&self) -> TensorRole
fn clone(&self) -> TensorRole
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TensorRole
impl Debug for TensorRole
Source§impl Ord for TensorRole
impl Ord for TensorRole
Source§fn cmp(&self, other: &TensorRole) -> Ordering
fn cmp(&self, other: &TensorRole) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TensorRole
impl PartialEq for TensorRole
Source§impl PartialOrd for TensorRole
impl PartialOrd for TensorRole
impl Copy for TensorRole
impl Eq for TensorRole
impl StructuralPartialEq for TensorRole
Auto Trait Implementations§
impl Freeze for TensorRole
impl RefUnwindSafe for TensorRole
impl Send for TensorRole
impl Sync for TensorRole
impl Unpin for TensorRole
impl UnwindSafe for TensorRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.