metrale_model_engine/model/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3//! 2026-09-25: The generic transformer model, [`TransformerModel`], and the served NLLB model.
4//!
5//! Layer-specific logic lives behind the `TransformerLayer` trait objects in
6//! `TransformerModel::layers`; `trait_impl` implements `Model` for it.
7//!
8//! Owner: model-engine.
9//! Invariants: none beyond the types.
10
11#![allow(unused_imports, dead_code)]
12
13pub(crate) mod block_mgmt;
14pub(crate) mod drop;
15mod gdn_carry;
16pub(crate) mod impl_a1;
17pub(crate) mod impl_a1_init;
18pub(crate) mod impl_a2;
19mod impl_a2_ep_broadcast;
20pub(crate) mod impl_a3;
21mod impl_a3_embed;
22mod impl_a3_lm_head;
23mod impl_a3_norm;
24pub(crate) mod impl_b1;
25mod impl_b1_decode;
26pub(crate) mod impl_b2;
27pub(crate) mod impl_b3;
28pub(crate) mod impl_b3_accessors;
29pub(crate) mod impl_lora;
30mod impl_lora_rotate;
31pub(crate) mod impl_lora_swap;
32mod impl_ngram;
33pub(crate) mod lm_head_fp8_rows;
34pub(crate) mod lm_head_nvfp4_rows;
35pub(crate) mod lm_head_q6k;
36pub(crate) mod pinned_pack;
37pub(crate) mod prefix_reclaim;
38pub(crate) mod seq_memtrace;
39pub(crate) mod ssm_batched_copy;
40pub(crate) mod ssm_pool;
41mod ssm_pool_slots;
42pub(crate) mod ssm_snapshot;
43mod ssm_snapshot_decode;
44pub(crate) mod ssm_snapshot_faultin;
45mod ssm_snapshot_init;
46pub(crate) mod ssm_snapshot_spill;
47mod ssm_snapshot_teardown;
48pub(crate) mod ssm_spill_gate;
49pub(crate) mod ssm_spill_staging;
50pub(crate) mod ssm_tier;
51pub(crate) mod token_overlay;
52pub(crate) mod trait_impl;
53pub(crate) mod types;
54
55// 2026-09-25: Served NLLB-200 / M2M-100 encoder-decoder model (cuda feature only).
56#[cfg(feature = "cuda")]
57pub mod nllb;
58#[cfg(all(test, not(feature = "cuda")))]
59#[path = "nllb/host_tests.rs"]
60mod nllb_host_tests;
61
62pub use types::TransformerModel;