schuttdev commited on
Commit
a9a15dc
·
verified ·
1 Parent(s): dd3f4d4

add model card

Browse files
Files changed (1) hide show
  1. README.md +68 -0
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: MiniMaxAI/MiniMax-M2.7
4
+ tags:
5
+ - hipfire
6
+ - moe
7
+ - minimax
8
+ - quantized
9
+ library_name: hipfire
10
+ ---
11
+
12
+ # hipfire-MiniMax-M2.7
13
+
14
+ [hipfire](https://github.com/Kaden-Schutt/hipfire)-native quantizations of
15
+ [MiniMax-M2.7](https://huggingface.co/MiniMaxAI/MiniMax-M2.7) — a 229B-parameter
16
+ (≈10B active) Mixtral-style MoE: GQA attention with per-layer QK-norm, partial
17
+ rotate_half RoPE, and a 256-expert top-8 sigmoid+bias router (DeepSeek-V3-style),
18
+ SwiGLU experts, no shared expert. 62 layers, hidden 3072, vocab 200064.
19
+
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.
23
+
24
+ ## Files
25
+
26
+ | File | Expert format | Size | Target |
27
+ |------|---------------|------|--------|
28
+ | `MiniMax-M2.7.mq4` | MQ4G256 (4-bit FWHT) experts, Q8 attn/router/head | 123.6 GB | high quality |
29
+ | `MiniMax-M2.7.mq2-lloyd` | MQ2G256-Lloyd (2-bit + codebook) experts, Q8 attn/router/head | ≈72 GB | fits 128 GB unified (e.g. Strix Halo / gfx1151) |
30
+
31
+ ## Validation
32
+
33
+ The hipfire MiniMax-M2 forward pass was validated against a PyTorch
34
+ (`transformers`) reference on a dimension-faithful tiny random-weight oracle
35
+ (per-layer post-residual hidden states):
36
+
37
+ - **mq4 experts**: cosine **0.9996** vs reference (residual = 4-bit quant noise)
38
+ - **mq2-lloyd experts**: cosine **0.9987** vs reference (residual = 2-bit-Lloyd noise)
39
+
40
+ Attention isolated to cosine 0.99990; routing (sigmoid + bias top-8) matches the
41
+ reference selection and weights exactly.
42
+
43
+ The real 229B `mq4` build was confirmed end-to-end: it loads (123.6 GB) and
44
+ generates coherent, factually-correct text (e.g. completes "The capital of
45
+ France is" → "Paris. The capital of Germany is Berlin. ...") at ~72 tok/s decode
46
+ on a single MI300X.
47
+
48
+ ## Quantization
49
+
50
+ Source: the official FP8 (E4M3 + F32 block-[128,128] `weight_scale_inv`)
51
+ checkpoint, dequantized to F32 then re-quantized. Attention projections, router,
52
+ embedding, and lm_head are kept at Q8; routed experts are MQ4G256 (mq4) or
53
+ MQ2G256-Lloyd (mq2-lloyd).
54
+
55
+ ## Usage (hipfire)
56
+
57
+ ```
58
+ hipfire serve --model MiniMax-M2.7.mq2-lloyd
59
+ # or a single forward:
60
+ # examples/infer_minimax --model MiniMax-M2.7.mq4 --prompt "..."
61
+ ```
62
+
63
+ ## Notes
64
+
65
+ - MQ3 / MQ2 / MQ3-Lloyd expert variants are not yet published: hipfire does not
66
+ currently ship indexed-decode MoE GEMV kernels for those formats (only
67
+ MQ4G256, MQ6G256, and MQ2G256-Lloyd have complete decode+prefill MoE kernels).
68
+ - arch_id 10 in the hipfire HFQ header.