ZixiQi commited on
Commit
4a97a1b
·
0 Parent(s):

MiniMax-M3-EAGLE3-GQA draft model

Browse files
Files changed (5) hide show
  1. .gitattributes +35 -0
  2. MiniMax M3 LICENSE.txt +17 -0
  3. README.md +39 -0
  4. config.json +31 -0
  5. model.safetensors +3 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
MiniMax M3 LICENSE.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MINIMAX COMMUNITY LICENSE
2
+ Copyright (c) 2026 MiniMax
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software for non-commercial purposes, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or provide copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+ 1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ 2. If the Software (or any derivative works thereof) is used for any Commercial Use for your products or services:
6
+ 1. you shall prominently display “Built with MiniMax M3” on a related website, user interface, blogpost, about page or product documentation.
7
+ 2. you shall obtain a separate, prior written authorization from MiniMax by contacting api@minimax.io with the subject line “M3 licensing - authorization request”, if such products and services generate more than 20 million US dollars (or equivalent in other currencies) in yearly revenue; otherwise, you only need to send a one-time notice to api@minimax.io with the subject “M3 licensing — notice”.
8
+ 3. “Commercial Use” means any use of the Software or any derivative work thereof that is primarily intended for commercial advantage or monetary compensation, which includes, without limitation: (i) offering products or services to third parties for a fee, which utilize, incorporate, or rely on the Software or its derivatives, (ii) the commercial use of APIs provided by or for the Software or its derivatives, including to support or enable commercial products, services, or operations, whether in a cloud-based, hosted, or other similar environment, and (iii) the deployment or provision of the Software or its derivatives that have been subjected to post-training, fine-tuning, instruction-tuning, or any other form of modification, for any commercial purpose.
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
+
11
+ Appendix: Prohibited Uses
12
+ You agree you will not use, or allow others to use, the Software or any derivatives of the Software to:
13
+ 1. Generate or disseminate content prohibited by applicable laws or regulations.
14
+ 2. Assist with, engage in or otherwise support any military purpose.
15
+ 3. Exploit, harm, or attempt to exploit or harm minors.
16
+ 4. Generate or disseminate false or misleading information with the intent to cause harm.
17
+ 5. Promote discrimination, hate speech, or harmful behavior against individuals or groups based on race or ethnic origin, religion, disability, age, nationality and national origin, veteran status, sexual orientation, gender or gender identity, caste, immigration status, or any other characteristic that is associated with systemic discrimination or marginalization.
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ base_model: MiniMaxAI/Minimax-M3-preview
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - eagle3
8
+ - speculative-decoding
9
+ - draft-model
10
+ - gqa
11
+ - vllm
12
+ - torchspec
13
+ - minimax
14
+ ---
15
+
16
+ ## Model Overview
17
+
18
+ **Inferact/MiniMax-M3-EAGLE3-GQA** is a **grouped-query-attention (GQA)** EAGLE3 draft model for accelerating inference of [MiniMax-M3](https://huggingface.co/MiniMaxAI/MiniMax-M3), served with **[vLLM](https://github.com/vllm-project/vllm)** and trained with **[TorchSpec](https://github.com/lightseekorg/TorchSpec)**.
19
+
20
+ It is **retrained on the same datasets** as the multi-head-attention version [Inferact/MiniMax-M3-EAGLE3](https://huggingface.co/Inferact/MiniMax-M3-EAGLE3) — **kimi-mtp, OpenCodeInstruct, SWE-bench, and SWE-bench-Pro** — with the draft's attention changed from **MHA to GQA** (`num_key_value_heads: 64 → 4`) for **inference efficiency** (16× smaller draft KV cache) and **compatibility with the target model**.
21
+
22
+ The draft is a 1-layer dense Llama (`LlamaForCausalLMEagle3`) on MiniMax-M3's `hidden_size=6144` / `vocab_size=200064`; at serve time it shares the target's embedding and LM head (EAGLE3). See `config.json` for the full architecture.
23
+
24
+ ---
25
+
26
+ ## Performance
27
+
28
+ Mean accepted length measured end-to-end against `MiniMaxAI/MiniMax-M3-MXFP8` served with vLLM at `tensor-parallel-size=4`, `num_speculative_tokens=3`, `--enforce-eager`, greedy draft sampling (`topk=1`). The MHA version is shown for reference under identical conditions.
29
+
30
+ | Category | Dataset | n | GQA (this model) | MHA reference |
31
+ |---|---|---:|---:|---:|
32
+ | Dialogue | [MT-Bench](https://github.com/lm-sys/FastChat/tree/main/fastchat/llm_judge) | 80 | 2.689 | 2.698 |
33
+ | Math | [GSM8K](https://github.com/openai/grade-school-math) | 200 | 3.500 | 3.518 |
34
+ | Code | [HumanEval](https://huggingface.co/datasets/openai/openai_humaneval) | 164 | 3.489 | 3.499 |
35
+ | Math | [MATH500](https://huggingface.co/datasets/HuggingFaceH4/MATH-500) | 500 | 3.510 | 3.517 |
36
+ | Math | [AIME](https://huggingface.co/datasets/Maxwell-Jia/AIME_2024) | 30 | 3.282 | 3.291 |
37
+ | | **Mean** | | **3.294** | 3.305 |
38
+
39
+ GQA matches the MHA version's acceptance (**~99.7%** of mean accepted length) while using **16× fewer** key/value heads.
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLMEagle3"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "fc_norm": true,
8
+ "norm_output": true,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 6144,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 18432,
14
+ "max_position_embeddings": 1048576,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 64,
17
+ "num_hidden_layers": 1,
18
+ "num_key_value_heads": 4,
19
+ "rms_norm_eps": 1e-06,
20
+ "rope_scaling": null,
21
+ "rope_theta": 5000000,
22
+ "sliding_window": null,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.51.0",
26
+ "use_cache": true,
27
+ "use_sliding_window": false,
28
+ "vocab_size": 200064,
29
+ "draft_vocab_size": 200064,
30
+ "_torchspec_version": "0.1.0"
31
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c6d6430519dd498342ccf7c94db8f7e90ba678c8ffbad3d198b35d4a0ffc33f
3
+ size 6149986032