README.md 3.11 KB
Newer Older
raojy's avatar
first  
raojy committed
1
2
3
# Qwen3.6
## 论文
[Qwen3.6](https://qwen.ai/blog?id=qwen3.6)
raojy's avatar
raojy committed
4

raojy's avatar
first  
raojy committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
47
48
49
50
51
52
53
54
55
56
57
58
59
## 模型简介

Qwen3.6-35B-A3B 是一款采用混合专家 (MoE) 架构并包含视觉编码器的多模态因果语言模型。总参数量为 35B,推理时激活参数量为 3B。此版本重点优化了智能体编程 (Agentic Coding) 的准确率,并引入了思维保留 (Thinking Preservation) 机制,特别适合长上下文和复杂的代码仓库开发任务。

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

## 环境依赖
| 软件 |                    版本                     |
| :------: |:-----------------------------------------:|
| DTK |                   26.04                   |
| python |                  3.10.12                  |
| transformers |            5.2.0               |
| vllm |      0.15.1+das.opt1.alpha.dtk2604.torch290.2604081832.gbcb2ba     |
| triton |      3.3.0+das.opt2.dtk2604.torch290.20260331.g31542e      |
| torch |   2.9.0+das.opt1.dtk2604.20260331.g4e3c1e7   |

当前推荐使用镜像: harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm015-ubuntu22.04-dtk26.04-0409-modelzoo

- 挂载地址`-v` 根据实际模型情况修改
```bash
docker run -it \
    --shm-size 200g \
    --network=host \
    --name qwen3.6 \
    --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:vllm015-ubuntu22.04-dtk26.04-0409-modelzoo bash
```
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。

关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.sourcefind.cn/tool/)开发者社区下载安装。

## 数据集
暂无

## 训练
暂无

## 推理

### vllm

#### 单机推理
```bash
## serve启动
raojy's avatar
raojy committed
60
vllm serve Qwen/Qwen3.6-35B-A3B \
raojy's avatar
first  
raojy committed
61
62
63
64
    --port 8001 \
    --trust-remote-code \
    --dtype bfloat16 \
    --tensor-parallel-size 4 \
raojy's avatar
raojy committed
65
66
67
    --gpu-memory-utilization 0.925 \
    --enable-auto-tool-choice \
    --tool-call-parser qwen3_coder
raojy's avatar
first  
raojy committed
68
69

## client访问
raojy's avatar
raojy committed
70
 curl -X POST "http://localhost:8001/v1/chat/completions"   -H "Content-Type: application/json"   -d '{
raojy's avatar
raojy committed
71
    "model": "Qwen/Qwen3.6-35B-A3B",
raojy's avatar
first  
raojy committed
72
73
74
75
    "messages": [
      {"role": "system", "content": "你是一个有用的助手。"},
      {"role": "user", "content": "你好,请做一下简单的自我介绍。"}
    ],
raojy's avatar
raojy committed
76
77
    "max_tokens": 512,
    "temperature": 0.7,
raojy's avatar
first  
raojy committed
78
79
    "stream": false
  }'
raojy's avatar
raojy committed
80

raojy's avatar
first  
raojy committed
81
82
83
84
85
86
87
88
89
90
91
92
93
```

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

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

## 预训练权重
|  模型名称  | 权重大小 | DCU型号  | 最低卡数需求 |         下载地址          |
|:------:|:----:|:----------:|:------:|:---------------------:|
raojy's avatar
raojy committed
94
| Qwen3.6-35B-A3B | 35B | BW1000 |   4   | [Hugging Face](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) |
raojy's avatar
raojy committed
95

raojy's avatar
first  
raojy committed
96
97
98
99
100
101
102


## 源码仓库及问题反馈
- https://developer.sourcefind.cn/codes/modelzoo/qwen3.6_vllm

## 参考资料
- https://github.com/QwenLM/Qwen3.6