CoolFace
Modelpublic

Infinigence/Megrez2-3x7B-A3B-GGUF

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
15likes544downloads
Model Card

<div align="center"> <img src="./assets/megrez-logo.png" alt="Megrez Logo" width="400" />

<br> <h1> Megrez2-3x7B-A3B </h1>

<a href="https://github.com/infinigence/Infini-Megrez"> <b>πŸ”— Github</b> </a> &nbsp;|&nbsp; <a href="https://github.com/infinigence/Infini-Megrez/blob/main/docs/tech_report.pdf"> <b>πŸ“„ Tech Report</b> </a> &nbsp;|&nbsp; <a href="https://huggingface.co/spaces/Infinigence/Megrez2-3x7B-A3B"> <b>πŸ’» Demo</b> </a> &nbsp;|&nbsp; <a href="https://huggingface.co/Infinigence/Megrez2-3x7B-A3B/blob/main/assets/wechat-official.jpg"> <b>πŸ’¬ WeChat Official</b> </a> &nbsp;

<br>

<strong>δΈ­ζ–‡ | English</strong>

</div>

Introduction

Megrez2-3x7B-A3B is a device native large language model. Megrez2 takes advantages of both the accuracy of Mixture-of-Experts (MoE) architecture and the compact size of Dense models. This release model was trained on 8T Tokens of data. In the future, we plan to improve the model's reasoning and agent capabilities.

Model Card

<div align="center">

ArchitectureMixture-of-Experts (MoE)
Total Parameters3x7B
Activated Parameters3B
Experts Shared Frequency3
Number of Layers (Dense layer included)31
Number of Dense Layers1
Attention Hidden Dimension2048
MoE Hidden Dimension (per Expert)1408
Number of Attention Heads16
Number of Experts64
Selected Experts per Token6
Number of Shared Experts4
Vocabulary Size128,880
Context Length32K
Base Frequency of RoPE5,000,000
Attention MechanismGQA
Activation FunctionSwiGLU

</div>

Performance

We evaluated Megrez2-3x7B-A3B using the open-source evaluation tool OpenCompass on several important benchmarks. Some of the evaluation results are shown in the table below.

<div align="center"> <table> <thead> <tr> <th align="center">Benchmark</th> <th align="center">Metric</th> <th align="center"><sup>Megrez2-3x7B<br>-A3B</sup></th> <th align="center"><sup>Megrez2-3x7B<br>-A3B-Preview</sup></th> <th align="center"><sup>SmallThinker-21B<br>-A3B-Instruct</sup></th> <th align="center"><sup>Qwen3-30B-A3B</sup></th> <th align="center"><sup>Qwen3-8B</sup></th> <th align="center"><sup>Qwen3-4B<br>-Instruct-2507</sup></th> <th align="center"><sup>Phi4-14B<br>(nothink)</sup></th> <th align="center"><sup>Gemma3-12B</sup></th> </tr> </thead> <tbody> <tr> <td align="center">Activate Params (B)</td> <td align="center"></td> <td align="center">3.0</td> <td align="center">3.0</td> <td align="center">3.0</td> <td align="center">3.3</td> <td align="center">8.2</td> <td align="center">4.0</td> <td align="center">14.7</td> <td align="center">12.2</td> </tr> <tr> <td align="center">Stored Params (B)</td> <td align="center"></td> <td align="center">7.5</td> <td align="center">7.5</td> <td align="center">21.5</td> <td align="center">30.5</td> <td align="center">8.2</td> <td align="center">4.0</td> <td align="center">14.7</td> <td align="center">12.2</td> </tr> <tr> <td align="center">MMLU</td> <td align="center">EM</td> <td align="center">85.4</td> <td align="center"><strong>87.5</strong></td> <td align="center">84.4</td> <td align="center">85.1</td> <td align="center">81.8</td> <td align="center">-</td> <td align="center">84.6</td> <td align="center">78.5</td> </tr> <tr> <td align="center">GPQA</td> <td align="center">EM</td> <td align="center"><strong>58.8</strong></td> <td align="center">28.8</td> <td align="center">55.0</td> <td align="center">44.4</td> <td align="center">38.9</td> <td align="center">62</td> <td align="center">55.5</td> <td align="center">34.9</td> </tr> <tr> <td align="center">IFEval</td> <td align="center">Inst<br>loose</td> <td align="center"><strong>87.7</strong></td> <td align="center">80.2</td> <td align="center">85.8</td> <td align="center">84.3</td> <td align="center">83.9</td> <td align="center">83.4</td> <td align="center">63.2</td> <td align="center">74.7</td> </tr> <tr> <td align="center">MATH-500</td> <td align="center">EM</td> <td align="center"><strong>87.2</strong></td> <td align="center">81.6</td> <td align="center">82.4</td> <td align="center">84.4</td> <td align="center">81.6</td> <td align="center">-</td> <td align="center">80.2</td> <td align="center">82.4</td> </tr> </tbody> </table> </div>

How to Run

llama.cpp

llama.cpp enables LLM inference with minimal setup and state-of-the-art performance on a wide range of hardware. Now supported, please refer to the support-megrez branch for details.

Under the FP16 floating-point precision configuration, the performance of the current model on code tasks has decreased compared to the original model. We have launched optimization efforts to address this issue and are currently exploring solutions.

Best Practice

To achieve optimal performance, we recommend the following settings:

  1. 1.Sampling Parameters: we suggest using Temperature=0.7 and TopP=0.9 .
  1. 1.Standardize Output Format: We recommend using prompts to standardize model outputs when benchmarking.
  2. 2.Math Problems: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
  3. 3.Multiple-Choice Questions: Add the following JSON structure to the prompt to standardize responses: "Please show your choice in the answer field with only the choice letter, e.g., "answer": "C"."

License Agreement

All our open-weight models are licensed under Apache 2.0.

Citation

If you find our work helpful, feel free to give us a cite.

bibtex
@misc{li2025megrez2technicalreport,
      title={Megrez2 Technical Report}, 
      author={Boxun Li and Yadong Li and Zhiyuan Li and Congyi Liu and Weilin Liu and Guowei Niu and Zheyue Tan and Haiyang Xu and Zhuyu Yao and Tao Yuan and Dong Zhou and Yueqing Zhuang and Bo Zhao and Guohao Dai and Yu Wang},
      year={2025},
      eprint={2507.17728},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2507.17728}, 
}

Contact

If you have any questions, please feel free to submit a GitHub issue or contact WeChat groups.