pub struct Stage {
pub layer: Option<u32>,
pub kind: StageKind,
pub tensors: Vec<String>,
pub weight_bytes: f64,
pub weight_class: HeldClass,
pub state_read: f64,
pub state_write: f64,
pub ops: f64,
pub split: Split,
pub reduces: bool,
pub reduce_bytes: f64,
}Expand description
One dependent stage of the decode chain.
Fields§
§layer: Option<u32>The block, or None for the embedding and the head.
kind: StageKind§tensors: Vec<String>§weight_bytes: f64Weight bytes the stage reads per token.
weight_class: HeldClassThe held bytes those weight bytes are read from, and so the tiers they stream from: the embedding table for the embedding row and for a head tied to the table, the weights for every other stage.
state_read: f64Carried-state bytes read per token: the KV cache, a recurrent state.
state_write: f64Carried-state bytes written per token.
ops: f64Matrix-engine operations per token (a multiply-add counts two).
split: Split§reduces: boolWhether the stage’s output is summed across the chips it is split over (Megatron’s row-split projections) or reduced to one answer (the head’s arg-max).
reduce_bytes: f64Bytes that reduction carries.
Trait Implementations§
impl StructuralPartialEq for Stage
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnsafeUnpin for Stage
impl UnwindSafe for Stage
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.