Skip to main content

ZeroKvLayer

Enum ZeroKvLayer 

Source
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

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ZeroKvLayer

Source§

impl Debug for ZeroKvLayer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ZeroKvLayer

Source§

impl PartialEq for ZeroKvLayer

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ZeroKvLayer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.