1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! ADR-033 Pa — `ApexPolicy` pure-Rust port of `mudler/apex-quant`.
//!
//! Vendored upstream reference at `/opt/hf2q/vendor/apex-quant/` @
//! pinned SHA `63c5048b7dc9ff230f2397d7bc445ca28894b769`. The
//! authoritative algorithmic source is
//! `vendor/apex-quant/scripts/generate_config.sh:69-143` (per-tier
//! rule table) and `:147-193` (per-tensor emission loop).
//!
//! v1 surface (per ADR-033 Decision §6):
//! - 7 algorithmic tiers: `quality, i-quality, balanced, i-balanced,
//! compact, i-compact, mini`. Mudler's `nano / i-nano / micro /
//! i-micro` (experimental) are out of v1 scope; reachable only via
//! `--quant apex-custom --tensor-type-file <file>`.
//! - 3 supported MoE arches: `Qwen35Moe, Gemma4 (MoE only),
//! MiniMaxM2`.
//! - Per-model fingerprint override (Decision §9): handled at the
//! CLI-driver layer, not here. This module is the **algorithmic
//! generator** path only.
//!
//! Module layout:
//! - `rules` — per-tier 7-tuples + layer-region partitioning
//! - `arches` — MoE tensor-name classifier + supported-arch gate
//! - `policy` — `ApexPolicy::target_for` (the QuantPolicy entry point)
//! - `error` — `ApexError` typed error taxonomy
//! - `fingerprint` — ADR §9 per-model manifest + SHA-256 dispatch
//! - `mudler_config` — ADR §9 mudler tensor-type-file parser
//!
//! Per [[feedback-no-loop-suppression-2026-05-17]]: every failure path
//! returns a typed `ApexError` — no silent F16 escape, no implicit
//! dense-policy fallback. Vision/audio tensor F16 emission is handled
//! UPSTREAM at the convert dispatcher; ApexPolicy is not even called
//! for those tensors.
// Re-exports — the public Pa surface.
pub use ;
pub use ApexError;
pub use ;
pub use ;
pub use ApexPolicy;
pub use ;