Expand description
Generic transformer model.
The model loop (embed -> layers -> norm -> lm_head) is architecture-
agnostic. Layer-specific logic lives in TransformerLayer implementations.
Wave 4b1 split: this module was originally a single 8,690 LoC model.rs.
Sub-modules now hold:
typesstruct TransformerModel + PinnedMetaStagingssm_poolSsmStatePoolssm_snapshotSsmSnapshotPoolblock_mgmtfree-fn helpers (apply_evicted_blocks etc.)impl_a1/2/3first inherentimpl TransformerModelblockimpl_b1/2/3second inherentimpl TransformerModelblocktrait_implsingleimpl Model for TransformerModelblock FLAGGED ≤500 LoC cap — Rust does NOT allow splitting one trait impl across files (E0119), and breaking it into inherent-helper delegation is a semantic refactor outside this wave’s scope.dropimpl Drop for TransformerModeltestsextracted unit tests
Modules§
- nllb
- Served NLLB-200 / M2M-100 encoder-decoder translation model.