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
//! `mlex`: a safe, idiomatic Rust runtime for running MLX language models —
//! including the full range of quantized checkpoints produced by the MLX
//! community (affine 2/3/4/5/6/8-bit, mxfp4, mxfp8, nvfp4, and mixed
//! per-layer precision such as OptiQ or Google QAT exports).
//!
//! Layering:
//! - [`array`] / [`ops`] / [`stream`]: thin safe wrappers over the private
//! `sys` module (raw `mlx-c` FFI bindings, built from vendored MLX/mlx-c
//! C++ sources via `build.rs`).
//! - [`quant`]: parses the `quantization` section of `config.json` and
//! resolves per-layer bit-widths, mirroring mlx-lm's loader semantics.
//! - [`nn`] / [`weights`]: generic building blocks (linear, embedding,
//! norm) that transparently load dense or quantized weights.
//! - [`models`]: concrete architectures (Qwen3, Qwen3.5 (+MoE), Gemma4).
//! - [`tokenizer`] / [`sampling`] / [`generate`]: text I/O and the
//! generation loop shared by every architecture.
pub use ;
pub use ;