pub enum ZeroKvLayer {
Linear,
ShortConv,
Mamba2,
Mamba1,
Plamo2,
Mamba2UnlessFfn,
Unserved(&'static str),
}Expand description
What head_count_kv == 0 with head_count > 0 MEANS for an
architecture, because two graphs spell two different blocks with the
same two counts and the counts alone cannot tell them apart.
Variants§
Linear
deci.cpp:115-118: attn_norm then wo.
ShortConv
lfm2.cpp:197: the short convolution (crate::shortconv).
Mamba2
granite-hybrid.cpp:163: the Mamba-2 block (crate::mamba2).
Mamba1
jamba.cpp:128: the Mamba-1 block (crate::mamba1).
Plamo2
plamo2.cpp:218: PLaMo-2’s own block (crate::plamo2_ssm).
Mamba2UnlessFfn
nemotron-h.cpp:9-11: the Mamba-2 block when the layer’s FFN
width is ALSO zero, and an FFN-only layer (no attention block at
all, AttnShape::Absent) when it is not – every Nemotron-H
layer is one block, and feed_forward_length is the second
array that says which.
Unserved(&'static str)
A recurrent block frink has no body for; the reason names it.
Implementations§
Source§impl ZeroKvLayer
impl ZeroKvLayer
Sourcepub fn for_arch(arch: &str) -> Self
pub fn for_arch(arch: &str) -> Self
The table. Every architecture in PER_LAYER_SHAPE_ARCHS whose
graph reads n_head_kv(il) == 0 as a layer kind has a row here;
anything else that reaches a zero is Linear, the reading the
generic path had before the table existed, which only deci’s
converter writes.
Trait Implementations§
Source§impl Clone for ZeroKvLayer
impl Clone for ZeroKvLayer
impl Copy for ZeroKvLayer
Source§impl Debug for ZeroKvLayer
impl Debug for ZeroKvLayer
impl Eq for ZeroKvLayer
Source§impl PartialEq for ZeroKvLayer
impl PartialEq for ZeroKvLayer
impl StructuralPartialEq for ZeroKvLayer
Auto Trait Implementations§
impl Freeze for ZeroKvLayer
impl RefUnwindSafe for ZeroKvLayer
impl Send for ZeroKvLayer
impl Sync for ZeroKvLayer
impl Unpin for ZeroKvLayer
impl UnsafeUnpin for ZeroKvLayer
impl UnwindSafe for ZeroKvLayer
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more