README.md 3.66 KB
Newer Older
luopl's avatar
luopl committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Step-3.7-Flash

## 论文
[Step-3.7-Flash](https://static.stepfun.com/blog/step-3.7-flash/)

## 模型简介
Step 3.7 Flash 是一个拥有 1980 亿参数的稀疏混合专家(MoE)视觉语言模型,它将一个 1960 亿参数的语言主干网络与一个 18 亿参数的视觉编码器相结合,以实现原生图像理解。该模型专为高频生产工作负载设计,每个 token 激活约 110 亿参数,吞吐量最高可达每秒 400 个 token。Step 3.7 Flash 支持 256k 的上下文窗口,并提供三种可选的推理级别(低、中、高),使开发者能够轻松平衡速度、成本和认知深度。

它专为处理高强度任务而设计,例如一次性解析庞大的财务报告、运行带跨源验证的多步骤搜索循环,或在高吞吐流水线中同时操作多个编码智能体。模型能力与性能如下图所示。

<div align=center>
    <img src="./doc/benchmarks.png"/>
</div>

## 环境依赖
|      软件      |                       版本                        |
|:------------:|:-----------------------------------------------:|
|     DTK      |                      26.04                      |
|    python    |                     3.10.12                     |
luopl's avatar
luopl committed
20
21
|     vLLM     | 0.18.1+das.dtk2604.torch2100.2605072017.gfa7180 |
| Transformers |                      5.2.0                      |
luopl's avatar
luopl committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

当前仅支持定制镜像: harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm0.18.1-ubuntu22.04-dtk26.04-py3.10-20260529-step3p7

```bash
docker run -it \
    --shm-size 200g \
    --network=host \
    --name step3p7 \
    --privileged \
    --device=/dev/kfd \
    --device=/dev/dri \
    --device=/dev/mkfd \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    -u root \
    -v /opt/hyhal/:/opt/hyhal/:ro \
    -v /path/your_code_data/:/path/your_code_data/ \
    harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm0.18.1-ubuntu22.04-dtk26.04-py3.10-20260529-step3p7 bash
```

更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。

## 预训练权重
**请根据`支持的DCU型号`选择对应模型下载,FP8模型仅在BW1100/BW1101上支持,其他型号请勿使用!**
luopl's avatar
luopl committed
47
| 模型名称  | 权重大小  | 数据类型 | 支持的DCU型号  | 最低卡数需求 | 下载地址 |
luopl's avatar
luopl committed
48
|:-----:|:----------:|:----------:|:----------:|:---------------------:|:----------:|
luopl's avatar
luopl committed
49
| Step-3.7-Flash | 201B | BF16 | BW1100 | 8 | [ModelScope](https://www.modelscope.cn/collections/stepfun-ai/Step-37-Flash) |
luopl's avatar
luopl committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
| Step-3.7-Flash-FP8 | 201B | FP8 | BW1100 | 4 | [ModelScope](https://www.modelscope.cn/models/stepfun-ai/Step-3.7-Flash-FP8) |


## 数据集
`暂无`

## 训练
`暂无`

## 推理
### vLLM
#### 单机推理
```bash
## serve启动
vllm serve stepfun-ai/Step-3.7-Flash \
    --served-model-name Step-3.7-Flash \
    --tensor-parallel-size 8 \
    --enable-expert-parallel \
    --disable-cascade-attn \
    --reasoning-parser step3p5 \
    --enable-auto-tool-choice \
    --tool-call-parser step3p5 \
    --trust-remote-code \
    --hf-overrides '{"num_nextn_predict_layers": 1}' \
    --port 8002

## client访问
curl http://localhost:8002/v1/chat/completions   \
    -H "Content-Type: application/json"  \
    -d '{
        "model": "Step-3.7-Flash",
        "messages": [
          {"role": "user", "content": "which one is bigger, 9.11 or 9.9? "}
        ],
        "temperature": 0.6
    }'
```

## 效果展示
<div align=center>
    <img src="./doc/result.png"/>
</div>

### 精度
`DCU与GPU精度一致,推理框架:vllm。`

## 源码仓库及问题反馈
- https://developer.sourcefind.cn/codes/modelzoo/step-3.7-flash

## 参考资料
-  https://github.com/stepfun-ai/Step-3.7-Flash