Improve model card: Add paper/abstract sections and HF Space link
#2
by
						
nielsr
	
							HF Staff
						- opened
							
					
    	
        README.md
    CHANGED
    
    | 
         @@ -1,20 +1,29 @@ 
     | 
|
| 1 | 
         
             
            ---
         
     | 
| 2 | 
         
            -
            license: apache-2.0
         
     | 
| 3 | 
         
            -
            pipeline_tag: image-text-to-text
         
     | 
| 4 | 
         
            -
            library_name: transformers
         
     | 
| 5 | 
         
             
            base_model:
         
     | 
| 6 | 
         
            -
             
     | 
| 7 | 
         
            -
            base_model_relation: finetune
         
     | 
| 8 | 
         
             
            datasets:
         
     | 
| 9 | 
         
            -
             
     | 
| 10 | 
         
            -
             
     | 
| 11 | 
         
             
            language:
         
     | 
| 12 | 
         
            -
             
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 13 | 
         
             
            tags:
         
     | 
| 14 | 
         
            -
             
     | 
| 15 | 
         
            -
             
     | 
| 
         | 
|
| 16 | 
         
             
            ---
         
     | 
| 17 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 18 | 
         
             
            # InternVL3_5-1B
         
     | 
| 19 | 
         | 
| 20 | 
         
             
            [\[📂 GitHub\]](https://github.com/OpenGVLab/InternVL)  [\[📜 InternVL 1.0\]](https://huggingface.co/papers/2312.14238)  [\[📜 InternVL 1.5\]](https://huggingface.co/papers/2404.16821)  [\[📜 InternVL 2.5\]](https://huggingface.co/papers/2412.05271)  [\[📜 InternVL2.5-MPO\]](https://huggingface.co/papers/2411.10442)  [\[📜 InternVL3\]](https://huggingface.co/papers/2504.10479) [\[📜 InternVL3.5\]](https://huggingface.co/papers/2508.18265)
         
     | 
| 
         @@ -529,40 +538,50 @@ generation_config = dict(max_new_tokens=1024, do_sample=True) 
     | 
|
| 529 | 
         
             
            # pure-text conversation (纯文本对话)
         
     | 
| 530 | 
         
             
            question = 'Hello, who are you?'
         
     | 
| 531 | 
         
             
            response, history = model.chat(tokenizer, None, question, generation_config, history=None, return_history=True)
         
     | 
| 532 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 533 | 
         | 
| 534 | 
         
             
            question = 'Can you tell me a story?'
         
     | 
| 535 | 
         
             
            response, history = model.chat(tokenizer, None, question, generation_config, history=history, return_history=True)
         
     | 
| 536 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 537 | 
         | 
| 538 | 
         
             
            # single-image single-round conversation (单图单轮对话)
         
     | 
| 539 | 
         
            -
            question = '<image 
     | 
| 
         | 
|
| 540 | 
         
             
            response = model.chat(tokenizer, pixel_values, question, generation_config)
         
     | 
| 541 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 542 | 
         | 
| 543 | 
         
             
            # single-image multi-round conversation (单图多轮对话)
         
     | 
| 544 | 
         
            -
            question = '<image 
     | 
| 
         | 
|
| 545 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
         
     | 
| 546 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 547 | 
         | 
| 548 | 
         
             
            question = 'Please write a poem according to the image.'
         
     | 
| 549 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
         
     | 
| 550 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 551 | 
         | 
| 552 | 
         
             
            # multi-image multi-round conversation, combined images (多图多轮对话,拼接图像)
         
     | 
| 553 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 554 | 
         
             
            pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 555 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 556 | 
         | 
| 557 | 
         
            -
            question = '<image 
     | 
| 
         | 
|
| 558 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 559 | 
         
             
                                           history=None, return_history=True)
         
     | 
| 560 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 561 | 
         | 
| 562 | 
         
             
            question = 'What are the similarities and differences between these two images.'
         
     | 
| 563 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 564 | 
         
             
                                           history=history, return_history=True)
         
     | 
| 565 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 566 | 
         | 
| 567 | 
         
             
            # multi-image multi-round conversation, separate images (多图多轮对话,独立图像)
         
     | 
| 568 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 
         @@ -570,17 +589,21 @@ pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat1 
     | 
|
| 570 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 571 | 
         
             
            num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
         
     | 
| 572 | 
         | 
| 573 | 
         
            -
            question = 'Image-1: <image 
     | 
| 
         | 
|
| 
         | 
|
| 574 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 575 | 
         
             
                                           num_patches_list=num_patches_list,
         
     | 
| 576 | 
         
             
                                           history=None, return_history=True)
         
     | 
| 577 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 578 | 
         | 
| 579 | 
         
             
            question = 'What are the similarities and differences between these two images.'
         
     | 
| 580 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 581 | 
         
             
                                           num_patches_list=num_patches_list,
         
     | 
| 582 | 
         
             
                                           history=history, return_history=True)
         
     | 
| 583 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 584 | 
         | 
| 585 | 
         
             
            # batch inference, single image per sample (单图批处理)
         
     | 
| 586 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 
         @@ -588,13 +611,15 @@ pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat1 
     | 
|
| 588 | 
         
             
            num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
         
     | 
| 589 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 590 | 
         | 
| 591 | 
         
            -
            questions = ['<image 
     | 
| 
         | 
|
| 592 | 
         
             
            responses = model.batch_chat(tokenizer, pixel_values,
         
     | 
| 593 | 
         
             
                                         num_patches_list=num_patches_list,
         
     | 
| 594 | 
         
             
                                         questions=questions,
         
     | 
| 595 | 
         
             
                                         generation_config=generation_config)
         
     | 
| 596 | 
         
             
            for question, response in zip(questions, responses):
         
     | 
| 597 | 
         
            -
                print(f'User: {question} 
     | 
| 
         | 
|
| 598 | 
         | 
| 599 | 
         
             
            # video multi-round conversation (视频多轮对话)
         
     | 
| 600 | 
         
             
            def get_index(bound, fps, max_frame, first_idx=0, num_segments=32):
         
     | 
| 
         @@ -632,17 +657,24 @@ def load_video(video_path, bound=None, input_size=448, max_num=1, num_segments=3 
     | 
|
| 632 | 
         
             
            video_path = './examples/red-panda.mp4'
         
     | 
| 633 | 
         
             
            pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=1)
         
     | 
| 634 | 
         
             
            pixel_values = pixel_values.to(torch.bfloat16).cuda()
         
     | 
| 635 | 
         
            -
            video_prefix = ''.join([f'Frame{i+1}: <image 
     | 
| 
         | 
|
| 636 | 
         
             
            question = video_prefix + 'What is the red panda doing?'
         
     | 
| 637 | 
         
            -
            # Frame1: <image 
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 638 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 639 | 
         
             
                                           num_patches_list=num_patches_list, history=None, return_history=True)
         
     | 
| 640 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 641 | 
         | 
| 642 | 
         
             
            question = 'Describe this video in detail.'
         
     | 
| 643 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 644 | 
         
             
                                           num_patches_list=num_patches_list, history=history, return_history=True)
         
     | 
| 645 | 
         
            -
            print(f'User: {question} 
     | 
| 
         | 
|
| 646 | 
         
             
            ```
         
     | 
| 647 | 
         | 
| 648 | 
         
             
            #### Streaming Output
         
     | 
| 
         @@ -726,7 +758,9 @@ image_urls=[ 
     | 
|
| 726 | 
         | 
| 727 | 
         
             
            images = [load_image(img_url) for img_url in image_urls]
         
     | 
| 728 | 
         
             
            # Numbering images improves multi-image conversations
         
     | 
| 729 | 
         
            -
            response = pipe((f'Image-1: {IMAGE_TOKEN} 
     | 
| 
         | 
|
| 
         | 
|
| 730 | 
         
             
            print(response.text)
         
     | 
| 731 | 
         
             
            ```
         
     | 
| 732 | 
         | 
| 
         @@ -828,4 +862,59 @@ If you find this project useful in your research, please consider citing: 
     | 
|
| 828 | 
         
             
              journal={arXiv preprint arXiv:2508.18265},
         
     | 
| 829 | 
         
             
              year={2025}
         
     | 
| 830 | 
         
             
            }
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 831 | 
         
             
            ```
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
             
            ---
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 2 | 
         
             
            base_model:
         
     | 
| 3 | 
         
            +
            - OpenGVLab/InternVL3_5-1B-MPO
         
     | 
| 
         | 
|
| 4 | 
         
             
            datasets:
         
     | 
| 5 | 
         
            +
            - OpenGVLab/MMPR-v1.2
         
     | 
| 6 | 
         
            +
            - OpenGVLab/MMPR-Tiny
         
     | 
| 7 | 
         
             
            language:
         
     | 
| 8 | 
         
            +
            - multilingual
         
     | 
| 9 | 
         
            +
            library_name: transformers
         
     | 
| 10 | 
         
            +
            license: apache-2.0
         
     | 
| 11 | 
         
            +
            pipeline_tag: image-text-to-text
         
     | 
| 12 | 
         
             
            tags:
         
     | 
| 13 | 
         
            +
            - internvl
         
     | 
| 14 | 
         
            +
            - custom_code
         
     | 
| 15 | 
         
            +
            base_model_relation: finetune
         
     | 
| 16 | 
         
             
            ---
         
     | 
| 17 | 
         | 
| 18 | 
         
            +
            # Paper: Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling
         
     | 
| 19 | 
         
            +
            The model series InternVL 3.5 builds upon advancements presented in the paper [Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling](https://huggingface.co/papers/2412.05271).
         
     | 
| 20 | 
         
            +
             
     | 
| 21 | 
         
            +
            ## Abstract
         
     | 
| 22 | 
         
            +
            We introduce InternVL 2.5, an advanced multimodal large language model (MLLM) series that builds upon InternVL 2.0, maintaining its core model architecture while introducing significant enhancements in training and testing strategies as well as data quality. In this work, we delve into the relationship between model scaling and performance, systematically exploring the performance trends in vision encoders, language models, dataset sizes, and test-time configurations. Through extensive evaluations on a wide range of benchmarks, including multi-discipline reasoning, document understanding, multi-image / video understanding, real-world comprehension, multimodal hallucination detection, visual grounding, multilingual capabilities, and pure language processing, InternVL 2.5 exhibits competitive performance, rivaling leading commercial models such as GPT-4o and Claude-3.5-Sonnet. Notably, our model is the first open-source MLLMs to surpass 70% on the MMMU benchmark, achieving a 3.7-point improvement through Chain-of-Thought (CoT) reasoning and showcasing strong potential for test-time scaling. We hope this model contributes to the open-source community by setting new standards for developing and applying multimodal AI systems. HuggingFace demo see this https URL
         
     | 
| 23 | 
         
            +
             
     | 
| 24 | 
         
            +
            ## Hugging Face Space
         
     | 
| 25 | 
         
            +
            Link to the official Hugging Face Space: [OpenGVLab/InternVL](https://huggingface.co/spaces/OpenGVLab/InternVL)
         
     | 
| 26 | 
         
            +
             
     | 
| 27 | 
         
             
            # InternVL3_5-1B
         
     | 
| 28 | 
         | 
| 29 | 
         
             
            [\[📂 GitHub\]](https://github.com/OpenGVLab/InternVL)  [\[📜 InternVL 1.0\]](https://huggingface.co/papers/2312.14238)  [\[📜 InternVL 1.5\]](https://huggingface.co/papers/2404.16821)  [\[📜 InternVL 2.5\]](https://huggingface.co/papers/2412.05271)  [\[📜 InternVL2.5-MPO\]](https://huggingface.co/papers/2411.10442)  [\[📜 InternVL3\]](https://huggingface.co/papers/2504.10479) [\[📜 InternVL3.5\]](https://huggingface.co/papers/2508.18265)
         
     | 
| 
         | 
|
| 538 | 
         
             
            # pure-text conversation (纯文本对话)
         
     | 
| 539 | 
         
             
            question = 'Hello, who are you?'
         
     | 
| 540 | 
         
             
            response, history = model.chat(tokenizer, None, question, generation_config, history=None, return_history=True)
         
     | 
| 541 | 
         
            +
            print(f'User: {question}
         
     | 
| 542 | 
         
            +
            Assistant: {response}')
         
     | 
| 543 | 
         | 
| 544 | 
         
             
            question = 'Can you tell me a story?'
         
     | 
| 545 | 
         
             
            response, history = model.chat(tokenizer, None, question, generation_config, history=history, return_history=True)
         
     | 
| 546 | 
         
            +
            print(f'User: {question}
         
     | 
| 547 | 
         
            +
            Assistant: {response}')
         
     | 
| 548 | 
         | 
| 549 | 
         
             
            # single-image single-round conversation (单图单轮对话)
         
     | 
| 550 | 
         
            +
            question = '<image>
         
     | 
| 551 | 
         
            +
            Please describe the image shortly.'
         
     | 
| 552 | 
         
             
            response = model.chat(tokenizer, pixel_values, question, generation_config)
         
     | 
| 553 | 
         
            +
            print(f'User: {question}
         
     | 
| 554 | 
         
            +
            Assistant: {response}')
         
     | 
| 555 | 
         | 
| 556 | 
         
             
            # single-image multi-round conversation (单图多轮对话)
         
     | 
| 557 | 
         
            +
            question = '<image>
         
     | 
| 558 | 
         
            +
            Please describe the image in detail.'
         
     | 
| 559 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=None, return_history=True)
         
     | 
| 560 | 
         
            +
            print(f'User: {question}
         
     | 
| 561 | 
         
            +
            Assistant: {response}')
         
     | 
| 562 | 
         | 
| 563 | 
         
             
            question = 'Please write a poem according to the image.'
         
     | 
| 564 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config, history=history, return_history=True)
         
     | 
| 565 | 
         
            +
            print(f'User: {question}
         
     | 
| 566 | 
         
            +
            Assistant: {response}')
         
     | 
| 567 | 
         | 
| 568 | 
         
             
            # multi-image multi-round conversation, combined images (多图多轮对话,拼接图像)
         
     | 
| 569 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 570 | 
         
             
            pixel_values2 = load_image('./examples/image2.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 571 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 572 | 
         | 
| 573 | 
         
            +
            question = '<image>
         
     | 
| 574 | 
         
            +
            Describe the two images in detail.'
         
     | 
| 575 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 576 | 
         
             
                                           history=None, return_history=True)
         
     | 
| 577 | 
         
            +
            print(f'User: {question}
         
     | 
| 578 | 
         
            +
            Assistant: {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 | 
         
             
                                           history=history, return_history=True)
         
     | 
| 583 | 
         
            +
            print(f'User: {question}
         
     | 
| 584 | 
         
            +
            Assistant: {response}')
         
     | 
| 585 | 
         | 
| 586 | 
         
             
            # multi-image multi-round conversation, separate images (多图多轮对话,独立图像)
         
     | 
| 587 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 
         | 
|
| 589 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 590 | 
         
             
            num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
         
     | 
| 591 | 
         | 
| 592 | 
         
            +
            question = 'Image-1: <image>
         
     | 
| 593 | 
         
            +
            Image-2: <image>
         
     | 
| 594 | 
         
            +
            Describe the two images in detail.'
         
     | 
| 595 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 596 | 
         
             
                                           num_patches_list=num_patches_list,
         
     | 
| 597 | 
         
             
                                           history=None, return_history=True)
         
     | 
| 598 | 
         
            +
            print(f'User: {question}
         
     | 
| 599 | 
         
            +
            Assistant: {response}')
         
     | 
| 600 | 
         | 
| 601 | 
         
             
            question = 'What are the similarities and differences between these two images.'
         
     | 
| 602 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 603 | 
         
             
                                           num_patches_list=num_patches_list,
         
     | 
| 604 | 
         
             
                                           history=history, return_history=True)
         
     | 
| 605 | 
         
            +
            print(f'User: {question}
         
     | 
| 606 | 
         
            +
            Assistant: {response}')
         
     | 
| 607 | 
         | 
| 608 | 
         
             
            # batch inference, single image per sample (单图批处理)
         
     | 
| 609 | 
         
             
            pixel_values1 = load_image('./examples/image1.jpg', max_num=12).to(torch.bfloat16).cuda()
         
     | 
| 
         | 
|
| 611 | 
         
             
            num_patches_list = [pixel_values1.size(0), pixel_values2.size(0)]
         
     | 
| 612 | 
         
             
            pixel_values = torch.cat((pixel_values1, pixel_values2), dim=0)
         
     | 
| 613 | 
         | 
| 614 | 
         
            +
            questions = ['<image>
         
     | 
| 615 | 
         
            +
            Describe the image in detail.'] * len(num_patches_list)
         
     | 
| 616 | 
         
             
            responses = model.batch_chat(tokenizer, pixel_values,
         
     | 
| 617 | 
         
             
                                         num_patches_list=num_patches_list,
         
     | 
| 618 | 
         
             
                                         questions=questions,
         
     | 
| 619 | 
         
             
                                         generation_config=generation_config)
         
     | 
| 620 | 
         
             
            for question, response in zip(questions, responses):
         
     | 
| 621 | 
         
            +
                print(f'User: {question}
         
     | 
| 622 | 
         
            +
            Assistant: {response}')
         
     | 
| 623 | 
         | 
| 624 | 
         
             
            # video multi-round conversation (视频多轮对话)
         
     | 
| 625 | 
         
             
            def get_index(bound, fps, max_frame, first_idx=0, num_segments=32):
         
     | 
| 
         | 
|
| 657 | 
         
             
            video_path = './examples/red-panda.mp4'
         
     | 
| 658 | 
         
             
            pixel_values, num_patches_list = load_video(video_path, num_segments=8, max_num=1)
         
     | 
| 659 | 
         
             
            pixel_values = pixel_values.to(torch.bfloat16).cuda()
         
     | 
| 660 | 
         
            +
            video_prefix = ''.join([f'Frame{i+1}: <image>
         
     | 
| 661 | 
         
            +
            ' for i in range(len(num_patches_list))])
         
     | 
| 662 | 
         
             
            question = video_prefix + 'What is the red panda doing?'
         
     | 
| 663 | 
         
            +
            # Frame1: <image>
         
     | 
| 664 | 
         
            +
            Frame2: <image>
         
     | 
| 665 | 
         
            +
            ...
         
     | 
| 666 | 
         
            +
            Frame8: <image>
         
     | 
| 667 | 
         
            +
            {question}
         
     | 
| 668 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 669 | 
         
             
                                           num_patches_list=num_patches_list, history=None, return_history=True)
         
     | 
| 670 | 
         
            +
            print(f'User: {question}
         
     | 
| 671 | 
         
            +
            Assistant: {response}')
         
     | 
| 672 | 
         | 
| 673 | 
         
             
            question = 'Describe this video in detail.'
         
     | 
| 674 | 
         
             
            response, history = model.chat(tokenizer, pixel_values, question, generation_config,
         
     | 
| 675 | 
         
             
                                           num_patches_list=num_patches_list, history=history, return_history=True)
         
     | 
| 676 | 
         
            +
            print(f'User: {question}
         
     | 
| 677 | 
         
            +
            Assistant: {response}')
         
     | 
| 678 | 
         
             
            ```
         
     | 
| 679 | 
         | 
| 680 | 
         
             
            #### Streaming Output
         
     | 
| 
         | 
|
| 758 | 
         | 
| 759 | 
         
             
            images = [load_image(img_url) for img_url in image_urls]
         
     | 
| 760 | 
         
             
            # Numbering images improves multi-image conversations
         
     | 
| 761 | 
         
            +
            response = pipe((f'Image-1: {IMAGE_TOKEN}
         
     | 
| 762 | 
         
            +
            Image-2: {IMAGE_TOKEN}
         
     | 
| 763 | 
         
            +
            describe these two images', images))
         
     | 
| 764 | 
         
             
            print(response.text)
         
     | 
| 765 | 
         
             
            ```
         
     | 
| 766 | 
         | 
| 
         | 
|
| 862 | 
         
             
              journal={arXiv preprint arXiv:2508.18265},
         
     | 
| 863 | 
         
             
              year={2025}
         
     | 
| 864 | 
         
             
            }
         
     | 
| 865 | 
         
            +
            @article{zhu2025internvl3,
         
     | 
| 866 | 
         
            +
              title={Internvl3: Exploring advanced training and test-time recipes for open-source multimodal models},
         
     | 
| 867 | 
         
            +
              author={Zhu, Jinguo and Wang, Weiyun and Chen, Zhe and Liu, Zhaoyang and Ye, Shenglong and Gu, Lixin and Tian, Hao and Duan, Yuchen and Su, Weijie and Shao, Jie and others},
         
     | 
| 868 | 
         
            +
              journal={arXiv preprint arXiv:2504.10479},
         
     | 
| 869 | 
         
            +
              year={2025}
         
     | 
| 870 | 
         
            +
            }
         
     | 
| 871 | 
         
            +
            @article{chen2024expanding,
         
     | 
| 872 | 
         
            +
              title={Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling},
         
     | 
| 873 | 
         
            +
              author={Chen, Zhe and Wang, Weiyun and Cao, Yue and Liu, Yangzhou and Gao, Zhangwei and Cui, Erfei and Zhu, Jinguo and Ye, Shenglong and Tian, Hao and Liu, Zhaoyang and others},
         
     | 
| 874 | 
         
            +
              journal={arXiv preprint arXiv:2412.05271},
         
     | 
| 875 | 
         
            +
              year={2024}
         
     | 
| 876 | 
         
            +
            }
         
     | 
| 877 | 
         
            +
            @article{wang2024mpo,
         
     | 
| 878 | 
         
            +
              title={Enhancing the Reasoning Ability of Multimodal Large Language Models via Mixed Preference Optimization},
         
     | 
| 879 | 
         
            +
              author={Wang, Weiyun and Chen, Zhe and Wang, Wenhai and Cao, Yue and Liu, Yangzhou and Gao, Zhangwei and Zhu, Jinguo and Zhu, Xizhou and Lu, Lewei and Qiao, Yu and Dai, Jifeng},
         
     | 
| 880 | 
         
            +
              journal={arXiv preprint arXiv:2411.10442},
         
     | 
| 881 | 
         
            +
              year={2024}
         
     | 
| 882 | 
         
            +
            }
         
     | 
| 883 | 
         
            +
            @article{gao2024mini,
         
     | 
| 884 | 
         
            +
              title={Mini-InternVL: a flexible-transfer pocket multi-modal model with 5\% parameters and 90\% performance},
         
     | 
| 885 | 
         
            +
              author={Gao, Zhangwei and Chen, Zhe and Cui, Erfei and Ren, Yiming and Wang, Weiyun and Zhu, Jinguo and Tian, Hao and Ye, Shenglong and He, Junjun and Zhu, Xizhou and others},
         
     | 
| 886 | 
         
            +
              journal={Visual Intelligence},
         
     | 
| 887 | 
         
            +
              volume={2},
         
     | 
| 888 | 
         
            +
              number={1},
         
     | 
| 889 | 
         
            +
              pages={1--17},
         
     | 
| 890 | 
         
            +
              year={2024},
         
     | 
| 891 | 
         
            +
              publisher={Springer}
         
     | 
| 892 | 
         
            +
            }
         
     | 
| 893 | 
         
            +
            @article{chen2024far,
         
     | 
| 894 | 
         
            +
              title={How far are we to gpt-4v? closing the gap to commercial multimodal models with open-source suites},
         
     | 
| 895 | 
         
            +
              author={Chen, Zhe and Wang, Weiyun and Tian, Hao and Ye, Shenglong and Gao, Zhangwei and Cui, Erfei and Tong, Wenwen and Hu, Kongzhi and Luo, Jiapeng and Ma, Zheng and others},
         
     | 
| 896 | 
         
            +
              journal={Science China Information Sciences},
         
     | 
| 897 | 
         
            +
              volume={67},
         
     | 
| 898 | 
         
            +
              number={12},
         
     | 
| 899 | 
         
            +
              pages={220101},
         
     | 
| 900 | 
         
            +
              year={2024},
         
     | 
| 901 | 
         
            +
              publisher={Springer}
         
     | 
| 902 | 
         
            +
            }
         
     | 
| 903 | 
         
            +
            @inproceedings{chen2024internvl,
         
     | 
| 904 | 
         
            +
              title={Internvl: Scaling up vision foundation models and aligning for generic visual-linguistic tasks},
         
     | 
| 905 | 
         
            +
              author={Chen, Zhe and Wu, Jiannan and Wang, Wenhai and Su, Weijie and Chen, Guo and Xing, Sen and Zhong, Muyan and Zhang, Qinglong and Zhu, Xizhou and Lu, Lewei and others},
         
     | 
| 906 | 
         
            +
              booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
         
     | 
| 907 | 
         
            +
              pages={24185--24198},
         
     | 
| 908 | 
         
            +
              year={2024}
         
     | 
| 909 | 
         
            +
            }
         
     | 
| 910 | 
         
             
            ```
         
     | 
| 911 | 
         
            +
             
     | 
| 912 | 
         
            +
            ## Acknowledgement
         
     | 
| 913 | 
         
            +
             
     | 
| 914 | 
         
            +
            InternVL is built with reference to the code of the following projects: [OpenAI CLIP](https://github.com/openai/CLIP), [Open CLIP](https://github.com/mlfoundations/open_clip), [CLIP Benchmark](https://github.com/LAION-AI/CLIP_benchmark), [EVA](https://github.com/baaivision/EVA/tree/master), [InternImage](https://github.com/OpenGVLab/InternImage), [ViT-Adapter](https://github.com/czczup/ViT-Adapter), [MMSegmentation](https://github.com/open-mmlab/mmsegmentation), [Transformers](https://github.com/huggingface/transformers), [DINOv2](https://github.com/facebookresearch/dinov2), [BLIP-2](https://github.com/salesforce/LAVIS/tree/main/projects/blip2), [Qwen-VL](https://github.com/QwenLM/Qwen-VL/tree/master/eval_mm), and [LLaVA-1.5](https://github.com/haotian-liu/LLaVA). Thanks for their awesome work!
         
     | 
| 915 | 
         
            +
             
     | 
| 916 | 
         
            +
            ______________________________________________________________________
         
     | 
| 917 | 
         
            +
             
     | 
| 918 | 
         
            +
            Scan the following QR Code, join our WeChat group.
         
     | 
| 919 | 
         
            +
             
     | 
| 920 | 
         
            +
            <p align="center"><img width="300" alt="image" src="https://github.com/user-attachments/assets/f776df09-ebba-4fd5-80c2-fec4ff1518be"></p>
         
     |