pub struct LayerRoutingSkew {
pub layer: u32,
pub routed: u64,
pub working_set: usize,
pub experts_for_90pct: usize,
pub norm_entropy: f64,
pub oracle_hit_at_slots: f64,
}Expand description
One MoE layer’s routing concentration over the observed decode histogram.
Every field is derived from that layer’s histogram row alone, so a layer that was never routed to has no entry at all rather than a row of zeros – a zero working set and a zero oracle hit rate would read as “this layer is unservable” when the truth is “no data”.
Fields§
§layer: u32§routed: u64Total routes observed for this layer, counting duplicates.
working_set: usizeDistinct experts that were routed to at least once.
experts_for_90pct: usizeHow many of the hottest experts it takes to cover 90% of this layer’s routing mass.
norm_entropy: f64Routing entropy over ln(num_experts). 1.0 is a perfectly
flat router, 0.0 a layer that always picks the same expert.
oracle_hit_at_slots: f64The top-oracle_slots share of this layer’s routing mass: the
best hit rate any per-layer policy could reach on the observed
distribution, with no LRU/LFU dynamics in it at all.
This is the number that separates the two diagnoses. A high
oracle hit rate next to a low realized one
(ExpertCacheStats::miss_rate) means the policy is losing
residency it could have kept; a low oracle hit rate means the
layer’s routing is flat and no cache size will help it.
Trait Implementations§
Source§impl Clone for LayerRoutingSkew
impl Clone for LayerRoutingSkew
Source§fn clone(&self) -> LayerRoutingSkew
fn clone(&self) -> LayerRoutingSkew
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LayerRoutingSkew
Source§impl Debug for LayerRoutingSkew
impl Debug for LayerRoutingSkew
Source§impl PartialEq for LayerRoutingSkew
impl PartialEq for LayerRoutingSkew
impl StructuralPartialEq for LayerRoutingSkew
Auto Trait Implementations§
impl Freeze for LayerRoutingSkew
impl RefUnwindSafe for LayerRoutingSkew
impl Send for LayerRoutingSkew
impl Sync for LayerRoutingSkew
impl Unpin for LayerRoutingSkew
impl UnsafeUnpin for LayerRoutingSkew
impl UnwindSafe for LayerRoutingSkew
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
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> ⓘ
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> ⓘ
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