THUDM/GLM-4.1V-9B-Thinking 已完整同步
license: mit language:
- en
- zh base_model:
- zai-org/GLM-4-9B-0414 pipeline_tag: image-text-to-text library_name: transformers tags:
- reasoning
GLM-4.1V-9B-Thinking
📖 View the GLM-4.1V-9B-Thinking paper.
📍 Using GLM-4.1V-9B-Thinking API at Zhipu Foundation Model Open Platform
Model Introduction
Vision-Language Models (VLMs) have become foundational components of intelligent systems. As real-world AI tasks grow increasingly complex, VLMs must evolve beyond basic multimodal perception to enhance their reasoning capabilities in complex tasks. This involves improving accuracy, comprehensiveness, and intelligence, enabling applications such as complex problem solving, long-context understanding, and multimodal agents.
Based on the GLM-4-9B-0414 foundation model, we present the new open-source VLM model GLM-4.1V-9B-Thinking, designed to explore the upper limits of reasoning in vision-language models. By introducing a "thinking paradigm" and leveraging reinforcement learning, the model significantly enhances its capabilities. It achieves state-of-the-art performance among 10B-parameter VLMs, matching or even surpassing the 72B-parameter Qwen-2.5-VL-72B on 18 benchmark tasks. We are also open-sourcing the base model GLM-4.1V-9B-Base to support further research into the boundaries of VLM capabilities.
rl
Compared to the previous generation models CogVLM2 and the GLM-4V series, GLM-4.1V-Thinking offers the following improvements:
- The first reasoning-focused model in the series, achieving world-leading performance not only in mathematics but also across various sub-domains.
- Supports 64k context length.
- Handles arbitrary aspect ratios and up to 4K image resolution.
- Provides an open-source version supporting both Chinese and English bilingual usage.
Benchmark Performance
By incorporating the Chain-of-Thought reasoning paradigm, GLM-4.1V-9B-Thinking significantly improves answer accuracy, richness, and interpretability. It comprehensively surpasses traditional non-reasoning visual models. Out of 28 benchmark tasks, it achieved the best performance among 10B-level models on 23 tasks, and even outperformed the 72B-parameter Qwen-2.5-VL-72B on 18 tasks.
bench
Quick Inference
This is a simple example of running single-image inference using the transformers library.
First, install the transformers library from source:
pip install transformers>=4.57.1
Then, run the following code:
from transformers import AutoProcessor, Glm4vForConditionalGeneration
import torch
MODEL_PATH = "zai-org/GLM-4.1V-9B-Thinking"
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fa/Grayscale_8bits_palette_sample_image.png"
},
{
"type": "text",
"text": "describe this image"
}
],
}
]
processor = AutoProcessor.from_pretrained(MODEL_PATH, use_fast=True)
model = Glm4vForConditionalGeneration.from_pretrained(
pretrained_model_name_or_path=MODEL_PATH,
torch_dtype=torch.bfloat16,
device_map="auto",
)
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=8192)
output_text = processor.decode(generated_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
print(output_text)
For video reasoning, web demo deployment, and more code, please check our GitHub.
15 个文件
浏览文件数据集版权信息
本数据集的许可证为 MIT License。如有违反相关条款,请联系 WEHUB,我们将及时处理。 查看许可证
通过 WeHub CLI 下载当前数据集快照。下列命令会固定为当前页面展示的数据版本(如果页面提供版本)。文件字节由本机直连存储下载,浏览器不会签发或保存下载链接。
前置要求
需要 Node.js 18 及以上,以及 npm(或 npx)。
1. 安装 CLI
npm install -g wehub-cli@latest
2. 下载此数据集
wehub datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa
若中断或部分失败,在同一目录重新执行同一命令即可续传。默认会校验 SHA-256。
免全局安装
npx --yes wehub-cli@latest datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa
高级选项
以下为 wehub datasets download 已支持的参数示例:
强制重新下载,不复用已校验的本地文件
wehub datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa --overwrite
仅包含匹配路径
wehub datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa --include "*.jsonl"
排除匹配路径
wehub datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa --exclude "*.md"
提高并发下载数
wehub datasets download ds_ext_1746_e6992ca0aa --revision 3c1471e51dc811b589d4d12b1c1c7c1c941267c2 --output ./ds_ext_1746_e6992ca0aa --jobs 8
完整帮助:wehub datasets download --help