Commit 382547dd authored by zzg_666's avatar zzg_666
Browse files

first modified

parents
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
# GLM-4.5-Air-Derestricted
## 论文
[GLM-4.5-Air-Derestricted](https://arxiv.org/abs/2508.06471)
## 模型简介
GLM-4.5系列模型是为智能代理设计的基础模型。GLM-4.5具有355亿个总参数,其中32亿个激活参数,而GLM-4.5-Air采用更紧凑的设计,具有106亿个总参数和12亿个活动参数。GLM-4.5模型统一了推理、编码和智能代理能力,以满足智能代理应用的复杂需求。GLM-4.5和GLM-4.5-Air都是混合推理模型,提供两种模式:用于复杂推理和工具使用的思考模式,以及用于即时响应的非思考模式。在12个行业标准基准测试中,GLM-4.5以63.2的得分在所有闭源和开源模型中位列第3。GLM-4.5-Air在保持卓越效率的同时,取得了59.8的结果。
<div align=center>
<img src="./doc/perf.png"/>
</div>
## 环境依赖
| 软件 | 版本 |
| :------: | :------: |
| DTK | 25.04.2 |
| python | 3.10.12 |
| transformers | >=4.57.1 |
| vllm | 0.9.2+das.opt1.dtk25042 |
| torch | 2.5.1+das.opt1.dtk25042 |
| triton | 3.1+das.opt1.3c5d12d.dtk25041 |
| flash_attn | 2.6.1+das.opt1.dtk2504 |
| flash_mla | 1.0.0+das.opt1.dtk25042 |
当前仅支持镜像:
- 挂载地址`-v`根据实际模型情况修改
```bash
docker run -it --shm-size 60g --network=host --name GLM-4.5-Air-Derestricted --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_path/:/path/your_code_path/ image.sourcefind.cn:5000/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.2-py3.10 bash
```
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.sourcefind.cn/tool/)开发者社区下载安装。
## 数据集
暂无
## 训练
暂无
## 推理
### vllm
#### 单机推理
可参考vllm_serve.sh脚本
```bash
## serve启动
vllm serve ArliAI/GLM-4.5-Air-Derestricted --trust-remote-code --max-model-len 32768 --served-model-name glm4.5 --dtype bfloat16 -tp 4
## client访问
可参考vllm_cilent.sh
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "glm4.5",
"messages": [
{
"role": "user",
"content": "请介绍下你自己"
}
]
}'
```
## 效果展示
<div align=center>
<img src="./doc/result.png"/>
</div>
### 精度
DCU与GPU精度一致,推理框架:vllm。
## 预训练权重
| 模型名称 | 权重大小 | DCU型号 | 最低卡数需求 |下载地址|
|:-----:|:----------:|:----------:|:---------------------:|:----------:|
| GLM-4.5-Air-Derestricted | 10B | K100AI | 4 | [下载地址](https://modelscope.cn/models/ArliAI/GLM-4.5-Air-Derestricted) |
## 源码仓库及问题反馈
- https://developer.sourcefind.cn/codes/modelzoo/glm-4.5-air-derestricted_vllm
## 参考资料
- https://z.ai/blog/glm-4.5
icon.png

62.1 KB

# 模型唯一标识
modelCode=1859
# 模型名称
modelName=glm-4.5-air-derestricted_vllm
# 模型描述
modelDescription=GLM-4.5系列模型是为智能代理设计的基础模型。GLM-4.5具有355亿个总参数,其中32亿个激活参数,而GLM-4.5-Air采用更紧凑的设计,具有106亿个总参数和12亿个激活参数。GLM-4.5模型统一了推理、编码和智能代理能力,以满足智能代理应用的复杂需求
processType=推理
# 算法类别
appScenario=文本生成
# 框架类型
frameType=vllm
# 加速卡类型
accelerateType=K100AI
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "glm4.5",
"messages": [
{
"role": "user",
"content": "请介绍下你自己"
}
]
}'
\ No newline at end of file
vllm serve ArliAI/GLM-4.5-Air-Derestricted --trust-remote-code --max-model-len 32768 --served-model-name glm4.5 --dtype bfloat16 -tp 4
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment