cuierfei commited on
Commit
b9cd80e
1 Parent(s): 00b90e0

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 | 2260.7 | 2315.0 |
52
  | RealWorldQA | 68.0 | 67.5 | 68.3 | 71.8 |
53
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 84.5 | 87.1 |
54
- | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 48.3 / 50.7 | 53.9 / 55.2 |
55
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 83.4 | 86.8 |
56
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 86.5 |
57
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 73.5 | 80.6 |
@@ -494,7 +494,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
494
  from lmdeploy.vl import load_image
495
 
496
  model = 'OpenGVLab/InternVL2-40B'
497
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
498
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
499
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
500
  chat_template_config.meta_instruction = system_prompt
@@ -518,7 +518,7 @@ from lmdeploy.vl import load_image
518
  from lmdeploy.vl.constants import IMAGE_TOKEN
519
 
520
  model = 'OpenGVLab/InternVL2-40B'
521
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
522
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
523
  chat_template_config.meta_instruction = system_prompt
524
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -544,7 +544,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
544
  from lmdeploy.vl import load_image
545
 
546
  model = 'OpenGVLab/InternVL2-40B'
547
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
548
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
549
  chat_template_config.meta_instruction = system_prompt
550
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -568,7 +568,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig, Genera
568
  from lmdeploy.vl import load_image
569
 
570
  model = 'OpenGVLab/InternVL2-40B'
571
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
572
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
573
  chat_template_config.meta_instruction = system_prompt
574
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -589,7 +589,7 @@ To deploy InternVL2 as an API, please configure the chat template config first.
589
  ```json
590
  {
591
  "model_name":"internvl-zh-hermes2",
592
- "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。",
593
  "stop_words":["<|im_start|>", "<|im_end|>"]
594
  }
595
  ```
@@ -703,7 +703,7 @@ InternVL 2.0 是一个多模态大语言模型系列,包含各种规模的模
703
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2260.7 | 2315.0 |
704
  | RealWorldQA | 68.0 | 67.5 | 68.3 | 71.8 |
705
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 84.5 | 87.1 |
706
- | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 48.3 / 50.7 | 53.9 / 55.2 |
707
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 83.4 | 86.8 |
708
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 86.5 |
709
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 73.5 | 80.6 |
@@ -793,7 +793,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
793
  from lmdeploy.vl import load_image
794
 
795
  model = 'OpenGVLab/InternVL2-40B'
796
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
797
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
798
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
799
  chat_template_config.meta_instruction = system_prompt
@@ -815,7 +815,7 @@ from lmdeploy.vl import load_image
815
  from lmdeploy.vl.constants import IMAGE_TOKEN
816
 
817
  model = 'OpenGVLab/InternVL2-40B'
818
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
819
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
820
  chat_template_config.meta_instruction = system_prompt
821
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -840,7 +840,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig
840
  from lmdeploy.vl import load_image
841
 
842
  model = 'OpenGVLab/InternVL2-40B'
843
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
844
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
845
  chat_template_config.meta_instruction = system_prompt
846
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -864,7 +864,7 @@ from lmdeploy import pipeline, TurbomindEngineConfig, ChatTemplateConfig, Genera
864
  from lmdeploy.vl import load_image
865
 
866
  model = 'OpenGVLab/InternVL2-40B'
867
- system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。'
868
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
869
  chat_template_config.meta_instruction = system_prompt
870
  pipe = pipeline(model, chat_template_config=chat_template_config,
@@ -885,7 +885,7 @@ print(sess.response.text)
885
  ```json
886
  {
887
  "model_name":"internvl-zh-hermes2",
888
- "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室及多家合作单位联合开发的多模态大语言模型。",
889
  "stop_words":["<|im_start|>", "<|im_end|>"]
890
  }
891
  ```
 
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 | 2260.7 | 2315.0 |
52
  | RealWorldQA | 68.0 | 67.5 | 68.3 | 71.8 |
53
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 84.5 | 87.1 |
54
+ | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 48.3 / 51.2 | 53.9 / 55.2 |
55
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 83.4 | 86.8 |
56
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 86.5 |
57
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 73.5 | 80.6 |
 
494
  from lmdeploy.vl import load_image
495
 
496
  model = 'OpenGVLab/InternVL2-40B'
497
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
498
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
499
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
500
  chat_template_config.meta_instruction = system_prompt
 
518
  from lmdeploy.vl.constants import IMAGE_TOKEN
519
 
520
  model = 'OpenGVLab/InternVL2-40B'
521
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
522
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
523
  chat_template_config.meta_instruction = system_prompt
524
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
544
  from lmdeploy.vl import load_image
545
 
546
  model = 'OpenGVLab/InternVL2-40B'
547
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
548
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
549
  chat_template_config.meta_instruction = system_prompt
550
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
568
  from lmdeploy.vl import load_image
569
 
570
  model = 'OpenGVLab/InternVL2-40B'
571
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
572
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
573
  chat_template_config.meta_instruction = system_prompt
574
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
589
  ```json
590
  {
591
  "model_name":"internvl-zh-hermes2",
592
+ "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。",
593
  "stop_words":["<|im_start|>", "<|im_end|>"]
594
  }
595
  ```
 
703
  | MME<sub>sum</sub> | 2070.2 | 2110.6 | 2260.7 | 2315.0 |
704
  | RealWorldQA | 68.0 | 67.5 | 68.3 | 71.8 |
705
  | AI2D<sub>test</sub> | 89.4 | 80.3 | 84.5 | 87.1 |
706
+ | MMMU<sub>val</sub> | 63.1 / 61.7 | 58.5 / 60.6 | 48.3 / 51.2 | 53.9 / 55.2 |
707
  | MMBench-EN<sub>test</sub> | 81.0 | 73.9 | 83.4 | 86.8 |
708
  | MMBench-CN<sub>test</sub> | 80.2 | 73.8 | 82.0 | 86.5 |
709
  | CCBench<sub>dev</sub> | 57.3 | 28.4 | 73.5 | 80.6 |
 
793
  from lmdeploy.vl import load_image
794
 
795
  model = 'OpenGVLab/InternVL2-40B'
796
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
797
  image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
798
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
799
  chat_template_config.meta_instruction = system_prompt
 
815
  from lmdeploy.vl.constants import IMAGE_TOKEN
816
 
817
  model = 'OpenGVLab/InternVL2-40B'
818
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
819
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
820
  chat_template_config.meta_instruction = system_prompt
821
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
840
  from lmdeploy.vl import load_image
841
 
842
  model = 'OpenGVLab/InternVL2-40B'
843
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
844
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
845
  chat_template_config.meta_instruction = system_prompt
846
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
864
  from lmdeploy.vl import load_image
865
 
866
  model = 'OpenGVLab/InternVL2-40B'
867
+ system_prompt = '我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。'
868
  chat_template_config = ChatTemplateConfig('internvl-zh-hermes2')
869
  chat_template_config.meta_instruction = system_prompt
870
  pipe = pipeline(model, chat_template_config=chat_template_config,
 
885
  ```json
886
  {
887
  "model_name":"internvl-zh-hermes2",
888
+ "meta_instruction":"我是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。",
889
  "stop_words":["<|im_start|>", "<|im_end|>"]
890
  }
891
  ```
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,