pub struct ModelCost {
pub n_layers: usize,
pub per_layer_bytes: u64,
pub embed_bytes: u64,
pub head_bytes: u64,
pub per_layer_flops: f64,
}Expand description
Resident-memory + compute cost model for a layer-stack model. Bytes are the ACTUAL per-node resident footprint (packed weights + kept scales), so the planner’s budgets are meaningful.
Fields§
§n_layers: usize§per_layer_bytes: u64Average resident bytes per transformer layer.
embed_bytes: u64Extra bytes on the FIRST stage (token embedding).
head_bytes: u64Extra bytes on the LAST stage (final norm + LM head).
per_layer_flops: f64Relative FLOPs per layer (for the throughput policy; 1.0 = uniform).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelCost
impl RefUnwindSafe for ModelCost
impl Send for ModelCost
impl Sync for ModelCost
impl Unpin for ModelCost
impl UnsafeUnpin for ModelCost
impl UnwindSafe for ModelCost
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