Loading…
Loading…
LiquidAI/LFM3-1.7BMACaQ-R weight-only refinement of MLX's native MXFP4 quantization of LiquidAI/LFM3-1.7B, packed for MLX.
Unlike the standard MLX mxfp4 path, which is plain round-to-nearest, this
checkpoint has its E2M1 codes re-optimised against the BF16 teacher using
MACaQ's Flip-Refinement and Hessian-weighted exponent screening. It loads with
stock mlx-lm — no custom runtime, no custom kernels, no trust_remote_code.
from mlx_lm import load, generate
model, tokenizer = load("hermitdave/LFM3-1.7B-MLX-MACaQ-R-4.25bpw")
print(generate(model, tokenizer, prompt="The capital of France is", max_tokens=32))
Or from the CLI:
mlx_lm.generate --model hermitdave/LFM3-1.7B-MLX-MACaQ-R-4.25bpw \
--prompt "The capital of France is"
| Field | Value |
|---|---|
| Base model | LiquidAI/LFM3-1.7B |
| Parameters | 1.7B |
| Layers | 24 (hybrid conv / sliding / full attention) |
| Hidden size | 2048 |
| Intermediate size | 7680 |
| Vocabulary | 128,000 |
| Architecture | lfm3 (Lfm3ForCausalLM) |
| Quantization | MXFP4 (E2M1 codes + E8M0 scales), group_size=32 |
| Quantization mode | W4A16 — weights quantized, activations stay BF16 |
| Average bitwidth | 4.25 bpw |
| Format | MLX packed (mxfp4) |
| Custom code | None required |
WikiText-2 test, 130,816 tokens, sequence length 512, identical evaluation data for every row.
| Model | Perplexity ↓ | vs BF16 |
|---|---|---|
| BF16 | 30.84 ± 0.29 | — |
| affine-4 (group 64) | 42.38 ± 0.41 | +11.54 |
| mxfp4 RTN (MLX default) | 45.50 ± 0.45 | +14.66 |
| This model | 35.47 ± 0.34 | +4.63 |
| Artifact | Size |
|---|---|
| This model (packed MXFP4) | 876 MiB |
| BF16 base | 3.22 GiB |
| Compression | 3.8× |
This is the weight-only variant of MACaQ (the "MACaQ-R" strategy from the paper's Appendix). For each of the 153 quantized linear layers:
H = Σ xᵀx from the BF16 teacher on
200K WikiText-2 training tokens, using forward hooks.2Δg − Δ²H_jj, exponents held fixed (256 sweeps, with
early stopping).No neighbouring layer, normalization, or residual branch is modified, so the file layout, config, and runtime are unchanged. The output is a standard MLX quantized model.
Ablation on this checkpoint (all at 200K calibration tokens unless noted):
| Setting | Perplexity ↓ |
|---|---|
| flips=64 | 36.14 |
| flips=256 (shipped) | 35.47 |
| flips=512 | 35.38 |
| calibration 500K | 35.60 |
| calibration 1M | 35.41 |
| ridge λ=0.5 | 35.48 |
| ridge λ=2.0 | 36.27 |
qqmm W4A4 kernel is only faster than BF16 at batch ≤ 4
on Apple Silicon, so this checkpoint ships as weight-only.