cuierfei commited on
Commit
f8a81c3
1 Parent(s): b7d02ef

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +14 -14
  2. conversation.py +3 -3
README.md CHANGED
@@ -7,7 +7,7 @@ pipeline_tag: image-text-to-text
7
 
8
  [\[📂 GitHub\]](https://github.com/OpenGVLab/InternVL) [\[🆕 Blog\]](https://internvl.github.io/blog/) [\[📜 InternVL 1.0 Paper\]](https://arxiv.org/abs/2312.14238) [\[📜 InternVL 1.5 Report\]](https://arxiv.org/abs/2404.16821)
9
 
10
- [\[🗨️ Chat Demo\]](https://internvl.opengvlab.com/) [\[🤗 HF Demo\]](https://huggingface.co/spaces/OpenGVLab/InternVL) [\[🚀 Quick Start\]](#quick-start) [\[📖 中文解读\]](https://zhuanlan.zhihu.com/p/706547971) \[🌟 [魔搭社区](https://modelscope.cn/organization/OpenGVLab) | [教程](https://mp.weixin.qq.com/s/OUaVLkxlk1zhFb1cvMCFjg) \]
11
 
12
  [切换至中文版](#简介)
13
 
@@ -19,7 +19,7 @@ We are excited to announce the release of InternVL 2.0, the latest addition to t
19
 
20
  Compared to the state-of-the-art open-source multimodal large language models, InternVL 2.0 surpasses most open-source models. It demonstrates competitive performance on par with proprietary commercial models across various capabilities, including document and chart comprehension, infographics QA, scene text understanding and OCR tasks, scientific and mathematical problem solving, as well as cultural understanding and integrated multimodal capabilities.
21
 
22
- InternVL 2.0 is trained with an 8k context window and utilizes training data consisting of long texts, multiple images, and videos, significantly improving its ability to handle these types of inputs compared to InternVL 1.5. For more details, please refer to our blog and GitHub.
23
 
24
  | Model Name | Vision Part | Language Part | HF Link | MS Link |
25
  | :------------------: | :---------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------: | :--------------------------------------------------------------: | :--------------------------------------------------------------------: |
@@ -51,7 +51,7 @@ InternVL 2.0 is a multimodal large language model series, featuring models of va
51
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2187.8 | 2260.7 |
52
  | RealWorldQA | 68.0 | 67.5 | 66.0 | 68.3 |
53
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 80.7 | 84.5 |
54
- | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 45.2 / 46.8 | 48.3 / 50.7 |
55
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 82.2 | 83.4 |
56
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 82.0 |
57
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 69.8 | 73.5 |
@@ -464,7 +464,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
464
  from lmdeploy.vl import load_image
465
 
466
  model = 'OpenGVLab/InternVL2-26B'
467
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
468
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
469
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
470
  chat_template_config.meta_instruction = system_prompt
@@ -488,7 +488,7 @@ from lmdeploy.vl import load_image
488
  from lmdeploy.vl.constants import IMAGE_TOKEN
489
 
490
  model = 'OpenGVLab/InternVL2-26B'
491
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
492
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
493
  chat_template_config.meta_instruction = system_prompt
494
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -514,7 +514,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
514
  from lmdeploy.vl import load_image
515
 
516
  model = 'OpenGVLab/InternVL2-26B'
517
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
518
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
519
  chat_template_config.meta_instruction = system_prompt
520
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -538,7 +538,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig, Genera
538
  from lmdeploy.vl import load_image
539
 
540
  model = 'OpenGVLab/InternVL2-26B'
541
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
542
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
543
  chat_template_config.meta_instruction = system_prompt
544
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -559,7 +559,7 @@ To deploy InternVL2 as an API, please configure the chat template config first.
559
  ```json
560
  {
561
  "model_name":"internvl-internlm2",
562
- "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。",
563
  "stop_words":["<|im_start|>", "<|im_end|>"]
564
  }
565
  ```
@@ -673,7 +673,7 @@ InternVL 2.0 是一个多模态大语言模型系列,包含各种规模的模
673
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2187.8 | 2260.7 |
674
  | RealWorldQA | 68.0 | 67.5 | 66.0 | 68.3 |
675
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 80.7 | 84.5 |
676
- | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 45.2 / 46.8 | 48.3 / 50.7 |
677
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 82.2 | 83.4 |
678
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 82.0 |
679
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 69.8 | 73.5 |
@@ -763,7 +763,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
763
  from lmdeploy.vl import load_image
764
 
765
  model = 'OpenGVLab/InternVL2-26B'
766
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
767
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
768
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
769
  chat_template_config.meta_instruction = system_prompt
@@ -785,7 +785,7 @@ from lmdeploy.vl import load_image
785
  from lmdeploy.vl.constants import IMAGE_TOKEN
786
 
787
  model = 'OpenGVLab/InternVL2-26B'
788
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
789
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
790
  chat_template_config.meta_instruction = system_prompt
791
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -810,7 +810,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
810
  from lmdeploy.vl import load_image
811
 
812
  model = 'OpenGVLab/InternVL2-26B'
813
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
814
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
815
  chat_template_config.meta_instruction = system_prompt
816
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -834,7 +834,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig, Genera
834
  from lmdeploy.vl import load_image
835
 
836
  model = 'OpenGVLab/InternVL2-26B'
837
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
838
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
839
  chat_template_config.meta_instruction = system_prompt
840
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -855,7 +855,7 @@ print(sess.response.text)
855
  ```json
856
  {
857
  "model_name":"internvl-internlm2",
858
- "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。",
859
  "stop_words":["<|im_start|>", "<|im_end|>"]
860
  }
861
  ```
 
7
 
8
  [\[📂 GitHub\]](https://github.com/OpenGVLab/InternVL) [\[🆕 Blog\]](https://internvl.github.io/blog/) [\[📜 InternVL 1.0 Paper\]](https://arxiv.org/abs/2312.14238) [\[📜 InternVL 1.5 Report\]](https://arxiv.org/abs/2404.16821)
9
 
10
+ [\[🗨️ Chat Demo\]](https://internvl.opengvlab.com/) [\[🤗 HF Demo\]](https://huggingface.co/spaces/OpenGVLab/InternVL) [\[🚀 Quick Start\]](#quick-start) [\[📖 中文解读\]](https://zhuanlan.zhihu.com/p/706547971) [\[📖 Documents\]](https://internvl.readthedocs.io/en/latest/)
11
 
12
  [切换至中文版](#简介)
13
 
 
19
 
20
  Compared to the state-of-the-art open-source multimodal large language models, InternVL 2.0 surpasses most open-source models. It demonstrates competitive performance on par with proprietary commercial models across various capabilities, including document and chart comprehension, infographics QA, scene text understanding and OCR tasks, scientific and mathematical problem solving, as well as cultural understanding and integrated multimodal capabilities.
21
 
22
+ InternVL 2.0 is trained with an 8k context window and utilizes training data consisting of long texts, multiple images, and videos, significantly improving its ability to handle these types of inputs compared to InternVL 1.5. For more details, please refer to our [blog](https://internvl.github.io/blog/2024-07-02-InternVL-2.0/) and [GitHub](https://github.com/OpenGVLab/InternVL).
23
 
24
  | Model Name | Vision Part | Language Part | HF Link | MS Link |
25
  | :------------------: | :---------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------: | :--------------------------------------------------------------: | :--------------------------------------------------------------------: |
 
51
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2187.8 | 2260.7 |
52
  | RealWorldQA | 68.0 | 67.5 | 66.0 | 68.3 |
53
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 80.7 | 84.5 |
54
+ | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 45.2 / 46.8 | 48.3 / 51.2 |
55
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 82.2 | 83.4 |
56
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 82.0 |
57
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 69.8 | 73.5 |
 
464
  from lmdeploy.vl import load_image
465
 
466
  model = 'OpenGVLab/InternVL2-26B'
467
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
468
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
469
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
470
  chat_template_config.meta_instruction = system_prompt
 
488
  from lmdeploy.vl.constants import IMAGE_TOKEN
489
 
490
  model = 'OpenGVLab/InternVL2-26B'
491
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
492
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
493
  chat_template_config.meta_instruction = system_prompt
494
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
514
  from lmdeploy.vl import load_image
515
 
516
  model = 'OpenGVLab/InternVL2-26B'
517
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
518
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
519
  chat_template_config.meta_instruction = system_prompt
520
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
538
  from lmdeploy.vl import load_image
539
 
540
  model = 'OpenGVLab/InternVL2-26B'
541
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
542
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
543
  chat_template_config.meta_instruction = system_prompt
544
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
559
  ```json
560
  {
561
  "model_name":"internvl-internlm2",
562
+ "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。",
563
  "stop_words":["<|im_start|>", "<|im_end|>"]
564
  }
565
  ```
 
673
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2187.8 | 2260.7 |
674
  | RealWorldQA | 68.0 | 67.5 | 66.0 | 68.3 |
675
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 80.7 | 84.5 |
676
+ | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 45.2 / 46.8 | 48.3 / 51.2 |
677
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 82.2 | 83.4 |
678
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 82.0 |
679
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 69.8 | 73.5 |
 
763
  from lmdeploy.vl import load_image
764
 
765
  model = 'OpenGVLab/InternVL2-26B'
766
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
767
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
768
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
769
  chat_template_config.meta_instruction = system_prompt
 
785
  from lmdeploy.vl.constants import IMAGE_TOKEN
786
 
787
  model = 'OpenGVLab/InternVL2-26B'
788
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
789
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
790
  chat_template_config.meta_instruction = system_prompt
791
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
810
  from lmdeploy.vl import load_image
811
 
812
  model = 'OpenGVLab/InternVL2-26B'
813
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
814
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
815
  chat_template_config.meta_instruction = system_prompt
816
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
834
  from lmdeploy.vl import load_image
835
 
836
  model = 'OpenGVLab/InternVL2-26B'
837
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
838
  chat_template_config = ChatTemplateConfig('internvl-internlm2')
839
  chat_template_config.meta_instruction = system_prompt
840
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
855
  ```json
856
  {
857
  "model_name":"internvl-internlm2",
858
+ "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。",
859
  "stop_words":["<|im_start|>", "<|im_end|>"]
860
  }
861
  ```
conversation.py CHANGED
@@ -339,7 +339,7 @@ register_conv_template(
339
  name='Hermes-2',
340
  system_template='<|im_start|>system\n{system_message}',
341
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
342
- # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。',
343
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
344
  roles=('<|im_start|>user\n', '<|im_start|>assistant\n'),
345
  sep_style=SeparatorStyle.MPT,
@@ -360,7 +360,7 @@ register_conv_template(
360
  name='internlm2-chat',
361
  system_template='<|im_start|>system\n{system_message}',
362
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
363
- # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。',
364
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
365
  roles=('<|im_start|>user\n', '<|im_start|>assistant\n'),
366
  sep_style=SeparatorStyle.MPT,
@@ -379,7 +379,7 @@ register_conv_template(
379
  name='phi3-chat',
380
  system_template='<|system|>\n{system_message}',
381
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
382
- # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。',
383
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
384
  roles=('<|user|>\n', '<|assistant|>\n'),
385
  sep_style=SeparatorStyle.MPT,
 
339
  name='Hermes-2',
340
  system_template='<|im_start|>system\n{system_message}',
341
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
342
+ # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。',
343
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
344
  roles=('<|im_start|>user\n', '<|im_start|>assistant\n'),
345
  sep_style=SeparatorStyle.MPT,
 
360
  name='internlm2-chat',
361
  system_template='<|im_start|>system\n{system_message}',
362
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
363
+ # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。',
364
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
365
  roles=('<|im_start|>user\n', '<|im_start|>assistant\n'),
366
  sep_style=SeparatorStyle.MPT,
 
379
  name='phi3-chat',
380
  system_template='<|system|>\n{system_message}',
381
  # note: The new system prompt was not used here to avoid changes in benchmark performance.
382
+ # system_message='我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。',
383
  system_message='你是由上海人工智能实验室联合商汤科技开发的书生多模态大模型,英文名叫InternVL, 是一个有用无害的人工智能助手。',
384
  roles=('<|user|>\n', '<|assistant|>\n'),
385
  sep_style=SeparatorStyle.MPT,