Ubuntu commited on
Commit
01ba545
1 Parent(s): c26219e

update readme

Browse files
Files changed (1) hide show
  1. README.md +21 -4
README.md CHANGED
@@ -21,8 +21,27 @@ GLM-4-9B 是智谱 AI 推出的最新一代预训练模型 GLM-4 系列中的开
21
  在语义、数学、推理、代码和知识等多方面的数据集测评中,GLM-4-9B 及其人类偏好对齐的版本 GLM-4-9B-Chat 均表现出较高的性能。
22
  除了能进行多轮对话,GLM-4-9B-Chat 还具备网页浏览、代码执行、自定义工具调用(Function Call)和长文本推理(支持最大 128K 上下文)等高级功能。
23
  本代模型增加了多语言支持,支持包括日语,韩语,德语在内的 26 种语言。我们还推出了支持 1M 上下文长度(约 200 万中文字符)的模型。
24
- 本仓库是 GLM-4-9B 的多模态开源版本 GLM-4V-9B 模型。
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ## 运行模型
27
 
28
  ```python
@@ -35,9 +54,7 @@ device = "cuda"
35
  tokenizer = AutoTokenizer.from_pretrained("THUDM/glm-4v-9b", trust_remote_code=True)
36
 
37
  query = '描述这张图片'
38
-
39
  image = Image.open("your image").convert('RGB')
40
-
41
  inputs = tokenizer.apply_chat_template([{"role": "user", "image": image, "content": query}],
42
  add_generation_prompt=True, tokenize=True, return_tensors="pt",
43
  return_dict=True) # chat mode
@@ -57,7 +74,7 @@ with torch.no_grad():
57
  print(tokenizer.decode(outputs[0]))
58
  ```
59
 
60
- ## 协议
61
 
62
  GLM-4 模型的权重的使用则需要遵循 [LICENSE](LICENSE)。
63
 
 
21
  在语义、数学、推理、代码和知识等多方面的数据集测评中,GLM-4-9B 及其人类偏好对齐的版本 GLM-4-9B-Chat 均表现出较高的性能。
22
  除了能进行多轮对话,GLM-4-9B-Chat 还具备网页浏览、代码执行、自定义工具调用(Function Call)和长文本推理(支持最大 128K 上下文)等高级功能。
23
  本代模型增加了多语言支持,支持包括日语,韩语,德语在内的 26 种语言。我们还推出了支持 1M 上下文长度(约 200 万中文字符)的模型。
 
24
 
25
+ ### 多模态能力
26
+
27
+ GLM-4V-9B 是一个多模态语言模型,具备视觉理解能力,其相关经典任务的评测结果如下:
28
+
29
+ | | **MMBench-EN-Test** | **MMBench-CN-Test** | **SEEDBench_IMG** | **MMStar** | **MMMU** | **MME** | **HallusionBench** | **AI2D** | **OCRBench** |
30
+ |-------------------------|---------------------|---------------------|-------------------|------------|----------|---------|--------------------|----------|--------------|
31
+ | | 英文综合 | 中文综合 | 综合能力 | 综合能力 | 学科综合 | 感知推理 | 幻觉性 | 图表理解 | 文字识别 |
32
+ | **GPT-4o, 20240513** | 83.4 | 82.1 | 77.1 | 63.9 | 69.2 | 2310.3 | 55 | 84.6 | 736 |
33
+ | **GPT-4v, 20240409** | 81 | 80.2 | 73 | 56 | 61.7 | 2070.2 | 43.9 | 78.6 | 656 |
34
+ | **GPT-4v, 20231106** | 77 | 74.4 | 72.3 | 49.7 | 53.8 | 1771.5 | 46.5 | 75.9 | 516 |
35
+ | **InternVL-Chat-V1.5** | 82.3 | 80.7 | 75.2 | 57.1 | 46.8 | 2189.6 | 47.4 | 80.6 | 720 |
36
+ | **LlaVA-Next-Yi-34B** | 81.1 | 79 | 75.7 | 51.6 | 48.8 | 2050.2 | 34.8 | 78.9 | 574 |
37
+ | **Step-1V** | 80.7 | 79.9 | 70.3 | 50 | 49.9 | 2206.4 | 48.4 | 79.2 | 625 |
38
+ | **MiniCPM-Llama3-V2.5** | 77.6 | 73.8 | 72.3 | 51.8 | 45.8 | 2024.6 | 42.4 | 78.4 | 725 |
39
+ | **Qwen-VL-Max** | 77.6 | 75.7 | 72.7 | 49.5 | 52 | 2281.7 | 41.2 | 75.7 | 684 |
40
+ | **GeminiProVision** | 73.6 | 74.3 | 70.7 | 38.6 | 49 | 2148.9 | 45.7 | 72.9 | 680 |
41
+ | **Claude-3V Opus** | 63.3 | 59.2 | 64 | 45.7 | 54.9 | 1586.8 | 37.8 | 70.6 | 694 |
42
+ | **GLM-4v-9B** | 81.1 | 79.4 | 76.8 | 58.7 | 47.2 | 2163.8 | 46.6 | 81.1 | 786 |
43
+
44
+ **本仓库是 GLM-4V-9B 的模型仓库,支持`8K`上下文长度。**
45
  ## 运行模型
46
 
47
  ```python
 
54
  tokenizer = AutoTokenizer.from_pretrained("THUDM/glm-4v-9b", trust_remote_code=True)
55
 
56
  query = '描述这张图片'
 
57
  image = Image.open("your image").convert('RGB')
 
58
  inputs = tokenizer.apply_chat_template([{"role": "user", "image": image, "content": query}],
59
  add_generation_prompt=True, tokenize=True, return_tensors="pt",
60
  return_dict=True) # chat mode
 
74
  print(tokenizer.decode(outputs[0]))
75
  ```
76
 
77
+ ## 协议 (License)
78
 
79
  GLM-4 模型的权重的使用则需要遵循 [LICENSE](LICENSE)。
80