ferrox_models/minimax_engine.rs
1//! MiniMax M2/M3 dedicated stack stub — not generic GQA.
2//!
3//! Real checkpoints tag `minimax-m2` / `minimax-m3` with 256-expert
4//! sigmoid MoE and MTP (multi-token prediction) draft heads. Required
5//! tensors (llama.cpp `minimax*.cpp` graph), not implemented here:
6//!
7//! - Standard emb/norm/output head
8//! - MoE: `ffn_gate_inp`, `ffn_gate_exps`, `ffn_up_exps`, `ffn_down_exps`,
9//! `ffn_exp_probs_b.bias` (sigmoid / `noaux_tc` routing)
10//! - MTP: `num_nextn_predict_layers` draft-head tensors (`nextn.*` in
11//! llama.cpp) — see `docs/CLI.md` `--mtp` (honest fail until loaded)
12//!
13//! Fail-closed via [`Self::reject`] until loader + engine land.
14
15use thiserror::Error;
16
17#[derive(Debug, Error)]
18#[error("MiniMax dedicated engine not implemented: {reason}")]
19pub struct MinimaxUnavailable {
20 pub reason: &'static str,
21}
22
23pub struct MinimaxEngine {
24 pub arch: String,
25}
26
27impl MinimaxEngine {
28 pub fn reject(_arch: &str) -> Result<(), MinimaxUnavailable> {
29 Err(MinimaxUnavailable {
30 reason:
31 "MiniMax 256-expert sigmoid MoE + MTP not yet implemented (see minimax_engine.rs)",
32 })
33 }
34}
35
36#[cfg(test)]
37mod tests {
38 use super::*;
39
40 #[test]
41 fn reject_is_fail_closed() {
42 assert!(MinimaxEngine::reject("minimax-m2").is_err());
43 }
44}