Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,55 +20,56 @@ experts, **no shared expert**. 62 layers, hidden 3072, vocab 200064.
|
|
| 20 |
These `.mq*` files run with the hipfire inference engine (HIP/ROCm-direct, no
|
| 21 |
Python in the hot path). They are **not** GGUF/safetensors and won't load in
|
| 22 |
llama.cpp / transformers. Attention, router, embedding, and lm_head are kept at
|
| 23 |
-
**Q8** throughout; only the routed-expert precision varies below
|
|
|
|
| 24 |
|
| 25 |
## Files
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
| `MiniMax-M2.7.mq4` | MQ4 · MQ4 | 123.6 GB | best quality |
|
| 30 |
-
| `MiniMax-M2.7.mq3-lloyd` | MQ3-Lloyd · MQ3-Lloyd | 102.6 GB | high quality |
|
| 31 |
-
| `MiniMax-M2.7.mq2-lloyd` | MQ2-Lloyd+AWQ · **MQ4** | 86.2 GB | **smallest coherent — fits 128 GB unified (Strix Halo / gfx1151)** |
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
##
|
| 36 |
|
| 37 |
MiniMax-M2 has **no shared expert**, so routed-expert quantization error has no
|
| 38 |
-
high-precision path to hide behind
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
3-bit build. Per-expert promotion does **not** work: MiniMax's router is
|
| 50 |
-
load-balanced (no dominant experts to anchor), so the lever is the projection,
|
| 51 |
-
not the expert.
|
| 52 |
|
| 53 |
## Validation
|
| 54 |
|
| 55 |
Forward pass validated against a PyTorch (`transformers` `MiniMaxM2`) reference
|
| 56 |
-
on a dimension-faithful tiny random-weight oracle (per-layer hidden-state cosine
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
production.)
|
| 63 |
|
| 64 |
## Quantization
|
| 65 |
|
| 66 |
Source: the official FP8 (E4M3 + F32 block-[128,128] `weight_scale_inv`)
|
| 67 |
checkpoint, dequantized to F32 then re-quantized. gate/up AWQ uses a shared
|
| 68 |
per-layer activation scale from an unsloth imatrix (math `W·s @ x/s = W·x` is
|
| 69 |
-
exact
|
| 70 |
-
|
| 71 |
-
|
|
|
|
| 72 |
|
| 73 |
## Usage (hipfire)
|
| 74 |
|
|
|
|
| 20 |
These `.mq*` files run with the hipfire inference engine (HIP/ROCm-direct, no
|
| 21 |
Python in the hot path). They are **not** GGUF/safetensors and won't load in
|
| 22 |
llama.cpp / transformers. Attention, router, embedding, and lm_head are kept at
|
| 23 |
+
**Q8** throughout; only the routed-expert precision varies below, and gate/up
|
| 24 |
+
AWQ is baked in on every quantized tier.
|
| 25 |
|
| 26 |
## Files
|
| 27 |
|
| 28 |
+
A 5-tier quality/size spectrum. Each routed expert is `gate/up · down`; the
|
| 29 |
+
**down projection is promoted independently** (see below).
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
| File | gate/up · down | Size | Notes |
|
| 32 |
+
|------|----------------|------|-------|
|
| 33 |
+
| `MiniMax-M2.7.mq4` | MQ4 · MQ4 | 123.6 GB | best quality |
|
| 34 |
+
| `MiniMax-M2.7.mq3-lloyd` | MQ3-Lloyd+AWQ · **MQ4** | 109.6 GB | high quality |
|
| 35 |
+
| `MiniMax-M2.7.mq3` | MQ3-Lloyd uniform | 102.6 GB | balanced 3-bit |
|
| 36 |
+
| `MiniMax-M2.7.mq2-lloyd` | MQ2-Lloyd+AWQ · **MQ4** | 86.2 GB | **fits 128 GB unified (Strix Halo / gfx1151)** |
|
| 37 |
+
| `MiniMax-M2.7.mq2` | MQ2-Lloyd+AWQ · **MQ3-Lloyd** | 79.2 GB | smallest coherent |
|
| 38 |
|
| 39 |
+
## Why the down projection is promoted
|
| 40 |
|
| 41 |
MiniMax-M2 has **no shared expert**, so routed-expert quantization error has no
|
| 42 |
+
high-precision path to hide behind, and uniform 2-bit experts collapse into
|
| 43 |
+
repetition loops. The cause is specific: the **down projection's** input (the
|
| 44 |
+
SwiGLU intermediate) carries **~588× the activation energy** of the gate/up
|
| 45 |
+
input, so a low-bit error in `w2` is amplified ~24× more at the block output. It
|
| 46 |
+
behaves like a precision-critical conv1d — it doesn't degrade gracefully.
|
| 47 |
+
|
| 48 |
+
The fix (in every sub-mq4 tier here): keep gate/up cheap (2- or 3-bit + AWQ) but
|
| 49 |
+
**promote only the down projection**. Promoting down to as little as 3-bit
|
| 50 |
+
restores coherence; 4-bit and 6-bit progressively add richness. Per-expert
|
| 51 |
+
promotion does **not** help — MiniMax's router is load-balanced (no dominant
|
| 52 |
+
experts to anchor), so the lever is the *projection*, not the expert.
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Validation
|
| 55 |
|
| 56 |
Forward pass validated against a PyTorch (`transformers` `MiniMaxM2`) reference
|
| 57 |
+
on a dimension-faithful tiny random-weight oracle (per-layer hidden-state cosine
|
| 58 |
+
**0.9996** mq4 / **0.9994** mq3-lloyd; attention isolated **0.99990**; routing
|
| 59 |
+
exact). Real 229B generation is coherent on all five tiers (greedy): *"why is the
|
| 60 |
+
sky blue"* → correct Rayleigh-scattering answer; *"factorial of n"* → correct
|
| 61 |
+
Python. Greedy decode can show mild repetition on open-ended prompts — use light
|
| 62 |
+
sampling + a repeat penalty + the chat template for production.
|
|
|
|
| 63 |
|
| 64 |
## Quantization
|
| 65 |
|
| 66 |
Source: the official FP8 (E4M3 + F32 block-[128,128] `weight_scale_inv`)
|
| 67 |
checkpoint, dequantized to F32 then re-quantized. gate/up AWQ uses a shared
|
| 68 |
per-layer activation scale from an unsloth imatrix (math `W·s @ x/s = W·x` is
|
| 69 |
+
exact). Weights are stored at the listed bit-width and **dequantized to f32 on
|
| 70 |
+
the fly inside the GEMV kernels** — the math is f32; the bit-width is a
|
| 71 |
+
storage/bandwidth dial. The MQ3-Lloyd indexed-decode MoE GEMV kernel and the
|
| 72 |
+
per-projection mixed-dtype dispatch were added to hipfire for this model.
|
| 73 |
|
| 74 |
## Usage (hipfire)
|
| 75 |
|