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
2026-09-25: What a tensor is for.
Variants§
Embedding
LmHead
FinalNorm
KdaProjection
2026-09-25: KDA linear-attention projections. The reference checkpoint has 34 KDA layers.
KdaConv
KdaDecay
KdaGate
KdaNorm
MlaProjection
2026-09-25: Sparse-MLA projections, plus every mixer’s o_proj. The
reference checkpoint has 12 sparse-MLA layers.
MlaNorm
Indexer
2026-09-25: The DSA top-k indexer of a sparse-MLA layer
(self_attn.indexer.*, its k_norm excepted).
IndexerNorm
MoeRouter
MoeExpert
DenseFfn
2026-09-25: Dense FFN: mlp.gate_proj/up_proj/down_proj with no expert
index. The reference checkpoint has 3 dense-FFN layers.
LayerNorm
2026-09-25: input_layernorm and post_attention_layernorm.
HyperConnection
MtpProjection
2026-09-25: The MTP layer’s eh_proj. The MTP layer is a numbered
layers.# layer; the reference checkpoint has no mtp.0.* tensor.
MtpNorm
Vision
2026-09-25: The vision tower (model.visual.*, model.vision*), not part
of the text model.
Implementations§
Source§impl TensorRole
impl TensorRole
Trait Implementations§
Source§impl Clone for TensorRole
impl Clone for TensorRole
Source§fn clone(&self) -> TensorRole
fn clone(&self) -> TensorRole
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 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,
Compares and returns the maximum of two values. Read more
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
Mutably borrows from an owned value. Read more
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.