pub enum ResidualStep {
SaveResidual,
HcPre(Site),
Norm(&'static str),
Mixer,
Mlp,
HcPost(Site),
}Expand description
2026-09-25: One step of a layer’s residual path, in execution order.
At each of its two sites a text layer runs hc_pre → norm → sublayer → hc_post; the
residual streams entering hc_pre are the ones hc_post mixes through comb.
Variants§
SaveResidual
2026-09-25: Snapshot the hc_mult streams as the residual for this site’s hc_post.
HcPre(Site)
2026-09-25: hc_pre: collapse the streams to one sequence, emit post/comb.
Norm(&'static str)
2026-09-25: RMSNorm on the collapsed sequence, named by its weight.
Mixer
2026-09-25: The attention mixer.
Mlp
2026-09-25: The MLP site.
HcPost(Site)
2026-09-25: hc_post: out[j] = post[j]*block_out + Σ_i comb[i][j]*residual[i].
Trait Implementations§
Source§impl Clone for ResidualStep
impl Clone for ResidualStep
Source§fn clone(&self) -> ResidualStep
fn clone(&self) -> ResidualStep
Returns a duplicate of the value. Read more
1.0.0 · 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 ResidualStep
impl Debug for ResidualStep
Source§impl PartialEq for ResidualStep
impl PartialEq for ResidualStep
impl Copy for ResidualStep
impl Eq for ResidualStep
impl StructuralPartialEq for ResidualStep
Auto Trait Implementations§
impl Freeze for ResidualStep
impl RefUnwindSafe for ResidualStep
impl Send for ResidualStep
impl Sync for ResidualStep
impl Unpin for ResidualStep
impl UnwindSafe for ResidualStep
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.