nielsr HF Staff commited on
Commit
7325ef9
·
verified ·
1 Parent(s): 5e17816

Improve model card: Add descriptive tags

Browse files

Added more descriptive tags (`multimodal`, `vlm`, `qwen3`, `internvit`) to enhance model discoverability on the Hugging Face Hub, reflecting its nature as a vision-language model built upon Qwen3 and InternViT components.

Files changed (1) hide show
  1. README.md +64 -35
README.md CHANGED
@@ -1,19 +1,23 @@
1
  ---
2
- license: apache-2.0
3
- pipeline_tag: image-text-to-text
4
- library_name: transformers
5
  base_model:
6
- - OpenGVLab/InternViT-6B-448px-V2_5
7
- - Qwen/Qwen3-32B
8
- base_model_relation: merge
9
  datasets:
10
- - OpenGVLab/MMPR-v1.2
11
- - OpenGVLab/MMPR-Tiny
12
  language:
13
- - multilingual
 
 
 
14
  tags:
15
- - internvl
16
- - custom_code
 
 
 
 
 
17
  ---
18
 
19
  # InternVL3_5-38B-Pretrained
@@ -28,7 +32,7 @@ tags:
28
 
29
  ## Introduction
30
 
31
- We introduce *InternVL3.5*, a new family of open-source multimodal models that significantly advances versatility, reasoning capability, and inference efficiency along the InternVL series. A key innovation is the *Cascade Reinforcement Learning (Cascade RL)* framework, which enhances reasoning through a two-stage process: offline RL for stable convergence and online RL for refined alignment. This coarse-to-fine training strategy leads to substantial improvements on downstream reasoning tasks, e.g., MMMU and MathVista. To optimize efficiency, we propose a *Visual Resolution Router (ViR)* that dynamically adjusts the resolution of visual tokens without compromising performance. Coupled with ViR, our Decoupled *Vision-Language Deployment (DvD)* strategy separates the vision encoder and language model across different GPUs, effectively balancing computational load. These contributions collectively enable InternVL3.5 to achieve up to a +16.0\% gain in overall reasoning performance and a 4.05 \\(\times\\) inference speedup compared to its predecessor, i.e., InternVL3. In addition, InternVL3.5 supports novel capabilities such as GUI interaction and embodied agency. Notably, our largest model, i.e., InternVL3.5-241B-A28B, attains state-of-the-art results among open-source MLLMs across general multimodal, reasoning, text, and agentic tasks—narrowing the performance gap with leading commercial models like GPT-5. All models and code are publicly released.
32
 
33
  ![image/jpg](https://huggingface.co/OpenGVLab/InternVL3_5-241B-A28B/resolve/main/images/performance.jpg)
34
 
@@ -142,7 +146,7 @@ Compared to InternVL3.5, InternVL3.5-Flash further integrates the *Visual Resolu
142
  Specifically, in InternVL3.5, each image patch is initially represented as 1024 visual tokens for the vision encoder, which are then compressed into 256 tokens via a pixel shuffle module before being passed to the Large Language Model (LLM).
143
  In InternVL3.5-Flash, as shown in the Figure below, an additional pixel shuffle module with a higher compression rate is included, enabling the compression of visual tokens down to 64 tokens.
144
  For each patch, the patch router determines the appropriate compression rate by assessing its semantic richness, and routes it to the corresponding pixel shuffle module accordingly.
145
- Benefiting from this patch-aware compression mechanism, InternVL3.5-Flash is able to reduce the number of visual tokens by 50\% while maintaining nearly 100\% of the performance of InternVL3.5.
146
 
147
 
148
  ![image/jpg](https://huggingface.co/OpenGVLab/InternVL3_5-241B-A28B/resolve/main/images/architecture.jpg)
@@ -234,7 +238,7 @@ $$
234
  \Bigg],
235
  $$
236
 
237
- where \\(\mathrm{KL}\) denotes the KL divergence and \(\xi\) denotes the compression rate, which is uniformly sampled from \(\{\frac{1}{4},\frac{1}{16}\}\). The image \(I_\xi\) is represented as 256 tokens when \(\xi=\frac{1}{4}\) and 64 tokens when \(\xi=\frac{1}{16}\). Notably, the reference model always performs inference with \(\xi=\frac{1}{4}\).
238
 
239
 
240
  `Router training`:
@@ -530,40 +534,50 @@ generation_config = dict(max_new_tokens=1024, do_sample=True)
530
  # pure-text conversation (纯文本对话)
531
  question = 'Hello, who are you?'
532
  response, history = model.chat(tokenizer, None, question, generation_config, history=None, return_history=True)
533
- print(f'User: {question}\nAssistant: {response}')
 
534
 
535
  question = 'Can you tell me a story?'
536
  response, history = model.chat(tokenizer, None, question, generation_config, history=history, return_history=True)
537
- print(f'User: {question}\nAssistant: {response}')
 
538
 
539
  # single-image single-round conversation (单图单轮对话)
540
- question = '<image>\nPlease describe the image shortly.'
 
541
  response = model.chat(tokenizer, pixel_values, question, generation_config)
542
- print(f'User: {question}\nAssistant: {response}')
 
543
 
544
  # single-image multi-round conversation (单图多轮对话)
545
- question = '<image>\nPlease describe the image in detail.'
 
546
  response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
547
- print(f'User: {question}\nAssistant: {response}')
 
548
 
549
  question = 'Please write a poem according to the image.'
550
  response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
551
- print(f'User: {question}\nAssistant: {response}')
 
552
 
553
  # multi-image multi-round conversation, combined images (多图多轮对话,拼接图像)
554
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
555
  pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat16).cuda()
556
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
557
 
558
- question = '<image>\nDescribe the two images in detail.'
 
559
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
560
  history=None, return_history=True)
561
- print(f'User: {question}\nAssistant: {response}')
 
562
 
563
  question = 'What are the similarities and differences between these two images.'
564
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
565
  history=history, return_history=True)
566
- print(f'User: {question}\nAssistant: {response}')
 
567
 
568
  # multi-image multi-round conversation, separate images (多图多轮对话,独立图像)
569
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
@@ -571,17 +585,21 @@ pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat1
571
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
572
  num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
573
 
574
- question = 'Image-1: <image>\nImage-2: <image>\nDescribe the two images in detail.'
 
 
575
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
576
  num_patches_list=num_patches_list,
577
  history=None, return_history=True)
578
- print(f'User: {question}\nAssistant: {response}')
 
579
 
580
  question = 'What are the similarities and differences between these two images.'
581
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
582
  num_patches_list=num_patches_list,
583
  history=history, return_history=True)
584
- print(f'User: {question}\nAssistant: {response}')
 
585
 
586
  # batch inference, single image per sample (单图批处理)
587
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
@@ -589,13 +607,15 @@ pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat1
589
  num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
590
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
591
 
592
- questions = ['<image>\nDescribe the image in detail.'] * len(num_patches_list)
 
593
  responses = model.batch_chat(tokenizer, pixel_values,
594
  num_patches_list=num_patches_list,
595
  questions=questions,
596
  generation_config=generation_config)
597
  for question, response in zip(questions, responses):
598
- print(f'User: {question}\nAssistant: {response}')
 
599
 
600
  # video multi-round conversation (视频多轮对话)
601
  def get_index(bound, fps, max_frame, first_idx=0, num_segments=32):
@@ -633,17 +653,24 @@ def load_video(video_path, bound=None, input_size=448, max_num=1, num_segments=3
633
  video_path = './examples/red-panda.mp4'
634
  pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=1)
635
  pixel_values = pixel_values.to(torch.bfloat16).cuda()
636
- video_prefix = ''.join([f'Frame{i+1}: <image>\n' for i in range(len(num_patches_list))])
 
637
  question = video_prefix + 'What is the red panda doing?'
638
- # Frame1: <image>\nFrame2: <image>\n...\nFrame8: <image>\n{question}
 
 
 
 
639
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
640
  num_patches_list=num_patches_list, history=None, return_history=True)
641
- print(f'User: {question}\nAssistant: {response}')
 
642
 
643
  question = 'Describe this video in detail.'
644
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
645
  num_patches_list=num_patches_list, history=history, return_history=True)
646
- print(f'User: {question}\nAssistant: {response}')
 
647
  ```
648
 
649
  #### Streaming Output
@@ -727,7 +754,9 @@ image_urls=[
727
 
728
  images = [load_image(img_url) for img_url in image_urls]
729
  # Numbering images improves multi-image conversations
730
- response = pipe((f'Image-1: {IMAGE_TOKEN}\nImage-2: {IMAGE_TOKEN}\ndescribe these two images', images))
 
 
731
  print(response.text)
732
  ```
733
 
@@ -829,4 +858,4 @@ If you find this project useful in your research, please consider citing:
829
  journal={arXiv preprint arXiv:2508.18265},
830
  year={2025}
831
  }
832
- ```
 
1
  ---
 
 
 
2
  base_model:
3
+ - OpenGVLab/InternViT-6B-448px-V2_5
4
+ - Qwen/Qwen3-32B
 
5
  datasets:
6
+ - OpenGVLab/MMPR-v1.2
7
+ - OpenGVLab/MMPR-Tiny
8
  language:
9
+ - multilingual
10
+ library_name: transformers
11
+ license: apache-2.0
12
+ pipeline_tag: image-text-to-text
13
  tags:
14
+ - internvl
15
+ - custom_code
16
+ - multimodal
17
+ - vlm
18
+ - qwen3
19
+ - internvit
20
+ base_model_relation: merge
21
  ---
22
 
23
  # InternVL3_5-38B-Pretrained
 
32
 
33
  ## Introduction
34
 
35
+ We introduce *InternVL3.5*, a new family of open-source multimodal models that significantly advances versatility, reasoning capability, and inference efficiency along the InternVL series. A key innovation is the *Cascade Reinforcement Learning (Cascade RL)* framework, which enhances reasoning through a two-stage process: offline RL for stable convergence and online RL for refined alignment. This coarse-to-fine training strategy leads to substantial improvements on downstream reasoning tasks, e.g., MMMU and MathVista. To optimize efficiency, we propose a *Visual Resolution Router (ViR)* that dynamically adjusts the resolution of visual tokens without compromising performance. Coupled with ViR, our Decoupled *Vision-Language Deployment (DvD)* strategy separates the vision encoder and language model across different GPUs, effectively balancing computational load. These contributions collectively enable InternVL3.5 to achieve up to a +16.0% gain in overall reasoning performance and a 4.05 \\(\times\\) inference speedup compared to its predecessor, i.e., InternVL3. In addition, InternVL3.5 supports novel capabilities such as GUI interaction and embodied agency. Notably, our largest model, i.e., InternVL3.5-241B-A28B, attains state-of-the-art results among open-source MLLMs across general multimodal, reasoning, text, and agentic tasks—narrowing the performance gap with leading commercial models like GPT-5. All models and code are publicly released.
36
 
37
  ![image/jpg](https://huggingface.co/OpenGVLab/InternVL3_5-241B-A28B/resolve/main/images/performance.jpg)
38
 
 
146
  Specifically, in InternVL3.5, each image patch is initially represented as 1024 visual tokens for the vision encoder, which are then compressed into 256 tokens via a pixel shuffle module before being passed to the Large Language Model (LLM).
147
  In InternVL3.5-Flash, as shown in the Figure below, an additional pixel shuffle module with a higher compression rate is included, enabling the compression of visual tokens down to 64 tokens.
148
  For each patch, the patch router determines the appropriate compression rate by assessing its semantic richness, and routes it to the corresponding pixel shuffle module accordingly.
149
+ Benefiting from this patch-aware compression mechanism, InternVL3.5-Flash is able to reduce the number of visual tokens by 50% while maintaining nearly 100% of the performance of InternVL3.5.
150
 
151
 
152
  ![image/jpg](https://huggingface.co/OpenGVLab/InternVL3_5-241B-A28B/resolve/main/images/architecture.jpg)
 
238
  \Bigg],
239
  $$
240
 
241
+ where \\(\mathrm{KL}\\) denotes the KL divergence and \(\xi\) denotes the compression rate, which is uniformly sampled from \(\{\frac{1}{4},\frac{1}{16}\}\). The image \(I_\xi\) is represented as 256 tokens when \(\xi=\frac{1}{4}\) and 64 tokens when \(\xi=\frac{1}{16}\). Notably, the reference model always performs inference with \(\xi=\frac{1}{4}\).
242
 
243
 
244
  `Router training`:
 
534
  # pure-text conversation (纯文本对话)
535
  question = 'Hello, who are you?'
536
  response, history = model.chat(tokenizer, None, question, generation_config, history=None, return_history=True)
537
+ print(f'User: {question}
538
+ Assistant: {response}')
539
 
540
  question = 'Can you tell me a story?'
541
  response, history = model.chat(tokenizer, None, question, generation_config, history=history, return_history=True)
542
+ print(f'User: {question}
543
+ Assistant: {response}')
544
 
545
  # single-image single-round conversation (单图单轮对话)
546
+ question = '<image>
547
+ Please describe the image shortly.'
548
  response = model.chat(tokenizer, pixel_values, question, generation_config)
549
+ print(f'User: {question}
550
+ Assistant: {response}')
551
 
552
  # single-image multi-round conversation (单图多轮对话)
553
+ question = '<image>
554
+ Please describe the image in detail.'
555
  response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
556
+ print(f'User: {question}
557
+ Assistant: {response}')
558
 
559
  question = 'Please write a poem according to the image.'
560
  response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
561
+ print(f'User: {question}
562
+ Assistant: {response}')
563
 
564
  # multi-image multi-round conversation, combined images (多图多轮对话,拼接图像)
565
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
566
  pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat16).cuda()
567
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
568
 
569
+ question = '<image>
570
+ Describe the two images in detail.'
571
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
572
  history=None, return_history=True)
573
+ print(f'User: {question}
574
+ Assistant: {response}')
575
 
576
  question = 'What are the similarities and differences between these two images.'
577
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
578
  history=history, return_history=True)
579
+ print(f'User: {question}
580
+ Assistant: {response}')
581
 
582
  # multi-image multi-round conversation, separate images (多图多轮对话,独立图像)
583
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
 
585
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
586
  num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
587
 
588
+ question = 'Image-1: <image>
589
+ Image-2: <image>
590
+ Describe the two images in detail.'
591
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
592
  num_patches_list=num_patches_list,
593
  history=None, return_history=True)
594
+ print(f'User: {question}
595
+ Assistant: {response}')
596
 
597
  question = 'What are the similarities and differences between these two images.'
598
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
599
  num_patches_list=num_patches_list,
600
  history=history, return_history=True)
601
+ print(f'User: {question}
602
+ Assistant: {response}')
603
 
604
  # batch inference, single image per sample (单图批处理)
605
  pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
 
607
  num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
608
  pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
609
 
610
+ questions = ['<image>
611
+ Describe the image in detail.'] * len(num_patches_list)
612
  responses = model.batch_chat(tokenizer, pixel_values,
613
  num_patches_list=num_patches_list,
614
  questions=questions,
615
  generation_config=generation_config)
616
  for question, response in zip(questions, responses):
617
+ print(f'User: {question}
618
+ Assistant: {response}')
619
 
620
  # video multi-round conversation (视频多轮对话)
621
  def get_index(bound, fps, max_frame, first_idx=0, num_segments=32):
 
653
  video_path = './examples/red-panda.mp4'
654
  pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=1)
655
  pixel_values = pixel_values.to(torch.bfloat16).cuda()
656
+ video_prefix = ''.join([f'Frame{i+1}: <image>
657
+ ' for i in range(len(num_patches_list))])
658
  question = video_prefix + 'What is the red panda doing?'
659
+ # Frame1: <image>
660
+ Frame2: <image>
661
+ ...
662
+ Frame8: <image>
663
+ {question}
664
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
665
  num_patches_list=num_patches_list, history=None, return_history=True)
666
+ print(f'User: {question}
667
+ Assistant: {response}')
668
 
669
  question = 'Describe this video in detail.'
670
  response, history = model.chat(tokenizer, pixel_values, question, generation_config,
671
  num_patches_list=num_patches_list, history=history, return_history=True)
672
+ print(f'User: {question}
673
+ Assistant: {response}')
674
  ```
675
 
676
  #### Streaming Output
 
754
 
755
  images = [load_image(img_url) for img_url in image_urls]
756
  # Numbering images improves multi-image conversations
757
+ response = pipe((f'Image-1: {IMAGE_TOKEN}
758
+ Image-2: {IMAGE_TOKEN}
759
+ describe these two images', images))
760
  print(response.text)
761
  ```
762
 
 
858
  journal={arXiv preprint arXiv:2508.18265},
859
  year={2025}
860
  }
861
+ ```