Views
No views yet
| Architecture | Mixture-of-Experts (MoE) |
| Total Parameters | 3x7B |
| Activated Parameters | 3B |
| Experts Shared Frequency | 3 |
| Number of Layers (Dense layer included) | 31 |
| Number of Dense Layers | 1 |
| Attention Hidden Dimension | 2048 |
| MoE Hidden Dimension (per Expert) | 1408 |
| Number of Attention Heads | 16 |
| Number of Experts | 64 |
| Selected Experts per Token | 6 |
| Number of Shared Experts | 4 |
| Vocabulary Size | 128,880 |
| Context Length | 32K |
| Base Frequency of RoPE | 5,000,000 |
| Attention Mechanism | GQA |
| Activation Function | SwiGLU |
| Benchmark | Metric | InnoMegrez2 | InnoMegrez2 -Preview | SmallThinker-21B -A3B-Instruct | Qwen3-30B-A3B | Qwen3-8B | Qwen3-4B -Instruct-2507 | Phi4-14B (nothink) | Gemma3-12B |
|---|---|---|---|---|---|---|---|---|---|
| Activate Params (B) | 3.0 | 3.0 | 3.0 | 3.3 | 8.2 | 4.0 | 14.7 | 12.2 | |
| Stored Params (B) | 7.5 | 7.5 | 21.5 | 30.5 | 8.2 | 4.0 | 14.7 | 12.2 | |
| MMLU | EM | 85.4 | 87.5 | 84.4 | 85.1 | 81.8 | - | 84.6 | 78.5 |
| GPQA | EM | 58.8 | 28.8 | 55.0 | 44.4 | 38.9 | 62 | 55.5 | 34.9 |
| IFEval | Inst loose | 87.7 | 80.2 | 85.8 | 84.3 | 83.9 | 83.4 | 63.2 | 74.7 |
| MATH-500 | EM | 87.2 | 81.6 | 82.4 | 84.4 | 81.6 | - | 80.2 | 82.4 |
transformers is recommended or transformers>=4.52.4 is required.
The following contains a code snippet illustrating how to use the model generate content based on given inputs.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4path = "sii-research/InnoMegrez2"
5device = "cuda"
6
7tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
8model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)
9
10messages = [
11 {"role": "user", "content": "世界上最高的山峰是哪座?"},
12]
13model_inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(device)
14
15model_outputs = model.generate(
16 model_inputs,
17 do_sample=True,
18 max_new_tokens=1024
19)
20
21output_token_ids = [
22 model_outputs[i][len(model_inputs[i]):] for i in range(len(model_inputs))
23]
24
25responses = tokenizer.batch_decode(output_token_ids, skip_special_tokens=True)[0]
26print(responses)
27
28# 世界上最高的山峰是珠穆朗玛峰(Mount Everest),位于喜马拉雅山脉的中尼边境。珠穆朗玛峰的海拔高度为8,848.86米(29,031.7英尺),这一数据是由中国和尼泊尔在2020年共同宣布的最新测量结果。珠穆朗玛峰不仅是登山爱好者的圣地,也是地理和科学研究的重要对象。ModelScope adopts Python API similar to (though not entirely identical to) Transformers. For basic usage, simply modify the first line of the above code as follows:from modelscope import AutoModelForCausalLM, AutoTokenizervLLM and SGLang as inference backends. For more information, please visit the gitHub repository.