pub struct SlotGeometry {
pub num_layers: usize,
pub slots: usize,
pub row_bytes: Vec<usize>,
}Expand description
The shape of one pool: how many slots, how many banks, and how wide a row is in each bank.
row_bytes is per bank because the banks are not interchangeable:
gate and up are [ffn_dim, hidden] while down is [hidden, ffn_dim], and a checkpoint may quantize them differently, so one
row width for all three would be wrong for at least one of them.
Fields§
§num_layers: usize§slots: usizeSlots in the pool. This is the cache_size the
ExpertCache was built
with; the two must agree or a slot the planner names will not
exist here.
row_bytes: Vec<usize>Bytes per expert row, one entry per bank, in the bank order the caller uses everywhere else (conventionally gate, up, down).
Implementations§
Trait Implementations§
Source§impl Clone for SlotGeometry
impl Clone for SlotGeometry
Source§fn clone(&self) -> SlotGeometry
fn clone(&self) -> SlotGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SlotGeometry
impl Debug for SlotGeometry
impl Eq for SlotGeometry
Source§impl PartialEq for SlotGeometry
impl PartialEq for SlotGeometry
impl StructuralPartialEq for SlotGeometry
Auto Trait Implementations§
impl Freeze for SlotGeometry
impl RefUnwindSafe for SlotGeometry
impl Send for SlotGeometry
impl Sync for SlotGeometry
impl Unpin for SlotGeometry
impl UnsafeUnpin for SlotGeometry
impl UnwindSafe for SlotGeometry
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