pub struct TrunkLayers {
pub block_count: usize,
pub n_layers: usize,
pub n_mtp_blocks: usize,
}Expand description
How many of a file’s blocks are decoder layers.
block_count is llama.cpp’s n_layer_all; n_layers its
n_layer(); n_mtp_blocks its n_layer_nextn. The three are
carried together because two of them are what every array-length
check and every layer loop must NOT be handed interchangeably.
Fields§
§block_count: usize{arch}.block_count, every block in the file.
n_layers: usizeThe blocks that are decoder layers: block_count - n_mtp_blocks.
n_mtp_blocks: usize{arch}.nextn_predict_layers where the architecture reads it,
else 0.
Implementations§
Trait Implementations§
Source§impl Clone for TrunkLayers
impl Clone for TrunkLayers
impl Copy for TrunkLayers
Source§impl Debug for TrunkLayers
impl Debug for TrunkLayers
impl Eq for TrunkLayers
Source§impl PartialEq for TrunkLayers
impl PartialEq for TrunkLayers
impl StructuralPartialEq for TrunkLayers
Auto Trait Implementations§
impl Freeze for TrunkLayers
impl RefUnwindSafe for TrunkLayers
impl Send for TrunkLayers
impl Sync for TrunkLayers
impl Unpin for TrunkLayers
impl UnsafeUnpin for TrunkLayers
impl UnwindSafe for TrunkLayers
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,
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> ⓘ
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 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> ⓘ
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