Expand description
2026-09-25: ModelStats: diagnostic counters and one-shot latches owned by one model.
Owner: model-layers ops. Invariants:
- A new
ModelStatsstarts with zero counters and every latch unfired, so a second model neither inherits the first one’s counts nor finds its dumps already spent.
TransformerModel owns one next to its ModelLevers and lends it to
each ForwardContext as stats. The counters are atomics because they are updated through that
shared reference.
Structs§
- Dump
Latches - 2026-09-25: One-shot latches for one model, keyed by a
&'static str(keyed). - Model
Stats - 2026-09-25: Per-model diagnostic state.
- MoeUnion
Stats - 2026-09-25: Expert-union sampling counters for one model: calls seen, calls sampled, and the running unique-expert and slot totals.