---
title: Eagle3-Qwen3-4B-Instruct-2507-zh
canonical_url: "https://www.modelscope.cn/models/Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh"
md_url: "https://www.modelscope.cn/models/Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh.md"
repository: Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh
chinese_name: Eagle3-Qwen3-4B-Instruct-2507-zh
last_updated: 2025-10-24
license: "Apache License 2.0"
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - llama
architectures:
  - LlamaForCausalLMEagle3
parameters: 218.4M
tensor_type:
  - BOOL
  - I64
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text"
  - "sglang 0.5.2"
downloads: 64
stars: 3
---

# Eagle3-Qwen3-4B-Instruct-2507-zh

> Eagle3-Qwen3-4B-Instruct-2507-zh - Zjcxy-SmartAI 在 ModelScope 开源的模型。Eagle3-Qwen3-4B-Instruct-2507-zh

Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh 是 ModelScope 魔搭社区上的 218.4M 参数text-generation模型，采用 Apache License 2.0 许可，可用 deploy_task text、sglang 0.5.2 部署。

- **Repository**: Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh
- **License**: Apache License 2.0
- **Tasks**: text-generation
- **Parameters**: 218.4M
- **Inference backends**: deploy_task text, sglang 0.5.2
- **Downloads**: 64
- **Stars**: 3
- **Last updated**: 2025-10-24

Source: https://www.modelscope.cn/models/Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh

---

# Eagle3-Qwen3-4B-Instruct-2507-zh

### 介绍

**Eagle3-Qwen3-4B-Instruct-2507-zh** 基于开源的 [Qwen3-4B-Instruct-2507](https://www.modelscope.cn/models/Qwen/Qwen3-4B-Instruct-2507) 模型再训练所得，可用于 Eagle-3 投机解码算法，具备**中/英文本加速能力**，旨在加速语言大模型在解码阶段的推理速度。该模型使用中英文混合数据集进行训练，优化了中文接受率，适用于处理中/英文本的推理任务。

> 注：项目内配置文件基于 SGLang 框架进行配置，如若用于 vLLM 等其他框架，请自行修改相关配置。

### 训练配置

在 [Eagle](https://github.com/SafeAILab/EAGLE) 官方开源仓库的指导下，我们使用开源代码仓 [**SpecForge**](https://github.com/sgl-project/SpecForge) 来训练获取适用于 Qwen3-4B-Instruct-2507 非推理模型且具备中/英文本加速能力的 Eagle-3 权重。

- 数据集：分别从 ShareGPT-68K (英文)和 ShareGPT-Chinese-English-90k (中文)数据集中选取32K条样本来构造中英问题1:1的训练数据集(共68K数据)。训练数据集的 prompt 部分使用原数据集内容，output 部分则由 Qwen3-4B-Instruct-2507 模型重新生成。

- 训练环境：在2卡24G显存的 NVIDIA RTX 4090 显卡上开展训练，训练时长约3天


### 推理命令

sglang 启动 eagle-3 算法服务

```shell
python3 -m sglang.launch_server \
--model-path Qwen/Qwen3-4B-Instruct-2507 \
--speculative-algo EAGLE3 \
--speculative-draft Zjcxy-SmartAI/Eagle3-Qwen3-4B-Instruct-2507-zh \
--speculative-num-steps 5 \
--speculative-eagle-topk 4 \
--speculative-num-draft-tokens 16 \
--dtype float16 \
--port 30000 \
--mem-fraction 0.7 \
--cuda-graph-max-bs 16 \
--cuda-graph-bs {1,2,3,4}
```

sglang 启动原始模型服务(用于对比实验)

```shell
python -m sglang.launch_server \
--model-path Qwen/Qwen3-4B-Instruct-2507 \
--port 30000 \
--mem-fraction 0.7 \
--cuda-graph-max-bs 16 \
--cuda-graph-bs {1,2,3,4}
```

### 性能测评

我们在单卡 4090 环境下，基于多轮对话 MT-bench 数据集开展了性能测试。我们分别使用了中英文版本的 MT-bench 数据集。其中，中文版本的数据集是通过[通义千问](https://www.tongyi.com/qianwen/)官网的服务处理后，再经过人工修改得到的。测试结果如下所示：

| 数据集     |并发数(parallel)  | Throughput/parallel(tokens/s) | Accept length | 推理效率 (Inference Speedup) |
|------------|------------------|-------------------------------|---------------|------------------------------|
| MT-bench-zh|1                 |      211.18                   |   3.33        |      2.08x                   |
| MT-bench-zh|4                 |      171.92                   |   3.33        |      1.94x                   |

| 数据集     |并发数(parallel)  | Throughput/parallel(tokens/s) | Accept length | 推理效率 (Inference Speedup) |
|------------|------------------|-------------------------------|---------------|------------------------------|
| MT-bench-en|1                 |      208.06                   |   3.27        |      2.05x                   |
| MT-bench-en|4                 |      169.37                   |   3.27        |      1.91x                   |

其对应仅使用原始模型的效果如下：

| 数据集     |并发数(parallel)  |Throughput/parallel(tokens/s) |
|------------|------------------|------------------------------|
| MT-bench-zh|1                 |      101.3                   |
| MT-bench-zh|4                 |      88.62                   |
| MT-bench-en|1                 |      101.32                  |
| MT-bench-en|4                 |      88.51                   |


通过对比，我们获得如下结论

- 综合来看，在训练数据68k的前提下，模型在中英文数据集上的表现较为均衡，**推理效率的提升幅度都接近 2 倍**，充分展示了模型在处理中/英文文本任务时的优异性能和稳定性。

> 注：
>
> - `计算公式` 推理效率 = 优化后吞吐量（tokens/s）/ 基线吞吐量（tokens/s）
> - 通过前期的大量实践，我们所选定的服务参数配置虽然会牺牲部分`Accept length`，但在当前配置下运行推理速率相对最佳。

### 相关链接

Qwen3-4B-Instruct-2507开源权重: https://www.modelscope.cn/models/Qwen/Qwen3-4B-Instruct-2507

Eagle开源仓库：https://github.com/SafeAILab/EAGLE

SpecForce训练框架：https://github.com/sgl-project/SpecForge
