Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
GLM-OCR_vllm
Commits
8e0f5528
Commit
8e0f5528
authored
Mar 19, 2026
by
dengjb
Browse files
update
parent
dcb7cb95
Pipeline
#3440
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
README.md
README.md
+3
-12
No files found.
README.md
View file @
8e0f5528
# GLM-OCR
# GLM-OCR
## 论文
## 论文
`
[
GLM-OCR Technical Report
](
https://arxiv.org/abs/2603.10910
)
GLM-OCR Technical Report
`
-
https://arxiv.org/abs/2603.10910
## 模型简介
## 模型简介
GLM-OCR 是一个基于 GLM-V 编码器-解码器架构的多模态 OCR 模型,专为复杂文档理解而设计。它引入了多令牌预测(Multi-Token Prediction, MTP)损失和稳定的全任务强化学习,以提升训练效率、识别准确率和泛化能力。该模型集成了在大规模图文数据上预训练的 CogViT 视觉编码器、具备高效令牌下采样的轻量级跨模态连接器,以及 GLM-0.5B 语言解码器。结合基于 PP-DocLayout-V3 的两阶段流程(布局分析与并行识别),GLM-OCR 在各种文档布局下均能提供稳健且高质量的 OCR 性能。
GLM-OCR 是一个基于 GLM-V 编码器-解码器架构的多模态 OCR 模型,专为复杂文档理解而设计。它引入了多令牌预测(Multi-Token Prediction, MTP)损失和稳定的全任务强化学习,以提升训练效率、识别准确率和泛化能力。该模型集成了在大规模图文数据上预训练的 CogViT 视觉编码器、具备高效令牌下采样的轻量级跨模态连接器,以及 GLM-0.5B 语言解码器。结合基于 PP-DocLayout-V3 的两阶段流程(布局分析与并行识别),GLM-OCR 在各种文档布局下均能提供稳健且高质量的 OCR 性能。
...
@@ -28,7 +25,7 @@ GLM-OCR 是一个基于 GLM-V 编码器-解码器架构的多模态 OCR 模型
...
@@ -28,7 +25,7 @@ GLM-OCR 是一个基于 GLM-V 编码器-解码器架构的多模态 OCR 模型
| python |3.10 |
| python |3.10 |
| transformers | 5.3.0 |
| transformers | 5.3.0 |
| torch | 2.9.0+das.opt1.dtk2604.20260206.g275d08c2 |
| torch | 2.9.0+das.opt1.dtk2604.20260206.g275d08c2 |
| vllm | 0.15.1+das.opt1.alpha
.dtk2604-cp310-cp310-linux_x86_64
|
| vllm | 0.15.1+das.opt1.alpha |
当前支持以下镜像: harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm0.15.1-ubuntu22.04-dtk26.04-0130-py3.10-20260220
当前支持以下镜像: harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm0.15.1-ubuntu22.04-dtk26.04-0130-py3.10-20260220
...
@@ -72,22 +69,17 @@ pip install -r requirements.txt
...
@@ -72,22 +69,17 @@ pip install -r requirements.txt
vllm推理脚本
vllm推理脚本
```
```
cd /path/your_code_data
export HIP_VISIBLE_DEVICES=0
export HIP_VISIBLE_DEVICES=0
VLLM_USE_MODELSCOPE=true \
vllm serve ZhipuAI/GLM-OCR/ \
vllm serve ZhipuAI/GLM-OCR/ \
--served-model-name GLM-OCR \
--served-model-name GLM-OCR \
--allowed-local-media-path / \
--allowed-local-media-path / \
--port 8080
--port 8080
# 或者 直接运行脚本
# 或者 直接运行脚本
cd /path/your_code_data
bash vllm_inf.sh
bash vllm_inf.sh
```
```
vllm服务测试脚本
vllm服务测试脚本
```
```
cd /path/your_code_data
curl http://localhost:8080/v1/chat/completions \
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Content-Type: application/json" \
...
@@ -106,7 +98,6 @@ curl http://localhost:8080/v1/chat/completions \
...
@@ -106,7 +98,6 @@ curl http://localhost:8080/v1/chat/completions \
# 或者shell脚本启动
# 或者shell脚本启动
cd /path/your_code_data
bash vllm_test.sh
bash vllm_test.sh
```
```
...
@@ -121,7 +112,7 @@ DCU与GPU精度一致,推理框架:vllm。
...
@@ -121,7 +112,7 @@ DCU与GPU精度一致,推理框架:vllm。
## 预训练权重
## 预训练权重
| 模型名称 | 权重大小 | DCU型号 | 最低卡数需求 | 下载地址 |
| 模型名称 | 权重大小 | DCU型号 | 最低卡数需求 | 下载地址 |
|:------:|:----:|:----------:|:------:|:---------------------:|
|:------:|:----:|:----------:|:------:|:---------------------:|
|
glm-cor
| 1.33B | BW1000 | 1 |
[
Hugging Face
](
https://huggingface.co/moonshotai/Kimi-K2.5
)
|
|
GLM-OCR
| 1.33B | BW1000 | 1 |
[
Hugging Face
](
https://huggingface.co/moonshotai/Kimi-K2.5
)
|
## 源码仓库及问题反馈
## 源码仓库及问题反馈
-
https://developer.sourcefind.cn/codes/modelzoo/glm-ocr_vllm
-
https://developer.sourcefind.cn/codes/modelzoo/glm-ocr_vllm
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment