pub struct ParameterCounts {
pub total: usize,
pub active: usize,
}Expand description
Total and per-token-active weight counts.
For a MoE model these differ by a lot, and both matter: total sets the memory the model occupies, active sets what one forward pass costs.
Fields§
§total: usize§active: usizeImplementations§
Source§impl ParameterCounts
impl ParameterCounts
Sourcepub fn sparsity_ratio(&self) -> f32
pub fn sparsity_ratio(&self) -> f32
Total divided by active. One for a dense model, higher the sparser the routing.
Trait Implementations§
Source§impl Clone for ParameterCounts
impl Clone for ParameterCounts
impl Copy for ParameterCounts
Source§impl Debug for ParameterCounts
impl Debug for ParameterCounts
Source§impl Display for ParameterCounts
impl Display for ParameterCounts
impl Eq for ParameterCounts
Source§impl PartialEq for ParameterCounts
impl PartialEq for ParameterCounts
impl StructuralPartialEq for ParameterCounts
Auto Trait Implementations§
impl Forget for ParameterCounts
impl Freeze for ParameterCounts
impl Move for ParameterCounts
impl RefUnwindSafe for ParameterCounts
impl Send for ParameterCounts
impl Sync for ParameterCounts
impl Unpin for ParameterCounts
impl UnsafeUnpin for ParameterCounts
impl UnwindSafe for ParameterCounts
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