InternVL Documentation

repository·main·Indexed 27 days ago

https://github.com/opengvlab/internvl

An open-source suite of high-performance multimodal models for vision-language understanding and dialogue. The project includes the internvl_chat package (v2.0.0) and tools for scaling Vision Foundation Models. It provides implementations for InternViT-6B image classification, linear probing on ImageNet-1K, and a CLIP benchmarking suite for zero-shot image classification and image-text retrieval across multiple languages including English, Chinese, Japanese, Arabic, and Italian.

Tokens
52.5K
Snippets
123
Records
255
Agent score
95%

What's inside InternVL

  1. Overview of Mini-InternVL Models

    main
    Mini-InternVL is a series of lightweight Multimodal Large Language Models (MLLMs) with parameter counts of 1B, 2B, and 4B. These models are designed to achieve high performance (up to 90% relative to larger models) with significantly fewer parameters (approx. 5%). They utilize the InternViT-300M visual encoder, which is a lightweight model trained to inherit capabilities from the larger InternViT-6B.
  2. Overview of Mixed Preference Optimization (MPO)

    main

    Mixed Preference Optimization (MPO) is a training method designed to enhance the multimodal reasoning and Chain-of-Thought (CoT) performance of Multimodal Large Language Models (MLLMs). It combines three distinct loss components to help the model learn relative preferences, absolute response quality, and the generation process of preferred responses:

    1. Preference Loss ($\mathcal{L}_{p}$): Uses DPO (Direct Preference Optimization) to learn the relative preference between chosen and rejected responses.
    2. Quality Loss ($\mathcal{L}_{q}$): Uses BCO (Binary Classifier Optimization) to help the model understand the absolute quality of individual responses.
    3. Generation Loss ($\mathcal{L}_{g}$): Uses SFT (Supervised Fine-Tuning) loss to help the model learn the generation process of preferred responses.

    The total training objective is defined as: $\mathcal{L}=w_{p}\cdot\mathcal{L}{p} + w{q}\cdot\mathcal{L}{q} + w{g}\cdot\mathcal{L}{g}$, where $w{*}$ represents the weights for each component.

  3. Overview of the InternVL Family

    main
    InternVL is a suite of open-source multimodal models designed to close the gap between open-source and commercial multimodal models (like GPT-5). The family includes various versions (1.0, 1.5, 2.0, 2.5, 3.0, 3.5) and specialized packages such as internvl_chat and llava (for multimodal dialogue using the LLaVA codebase).
  4. Overview of InternVL 2.5 Model Family

    main

    The InternVL 2.5 series consists of several multimodal models varying in size, combining an InternViT vision encoder with different LLMs (Qwen 2.5 or InternLM 2.5).

    Model NameVision PartLanguage PartHF Link
    InternVL2_5-1BInternViT-300M-448px-V2_5Qwen2.5-0.5B-Instruct🤗 link
    InternVL2_5-2BInternViT-300M-448px-V2_5internlm2_5-1_8b-chat🤗 link
    InternVL2_5-4BInternViT-300M-448px-V2_5Qwen2.5-3B-Instruct🤗 link
    InternVL2_5-8BInternViT-300M-448px-V2_5internlm2_5-7b-chat🤗 link
    InternVL2_5-26BInternViT-6B-448px-V2_5internlm2_5-20b-chat🤗 link
    InternVL2_5-38BInternViT-6B-448px-V2_5Qwen2.5-32B-Instruct🤗 link
    InternVL2_5-78BInternViT-6B-448px-V2_5Qwen2.5-72B-Instruct🤗 link
  5. InternVL Family Model Documentation

    main

    The InternVL family includes several versions, each with specific documentation for introduction, quick start, fine-tuning, evaluation, deployment, and preference optimization (MPO):

    • InternVL 2.5: Includes Intro, Quick Start, Finetune, Evaluate, Deploy, and MPO.
    • InternVL 2.0: Includes Intro, Quick Start, Finetune, Evaluate, Deploy, and MPO.
    • InternVL 1.5: Includes Intro, Quick Start, Finetune, and Evaluate.
    • InternVL 1.2: Includes Intro, Quick Start, Finetune, and Evaluate.
    • InternVL 1.1: Includes Intro, Quick Start, and Evaluation.
    • InternVL 1.0: Specialized tasks including Classification, CLIP-Benchmark, Segmentation, Chat-LLaVA, and InternVL-G.
  6. InternVL 2.5 Model Architecture

    main

    InternVL 2.5 follows the ViT-MLP-LLM paradigm. It integrates an incrementally pre-trained InternViT with pre-trained LLMs (like InternLM 2.5 or Qwen 2.5) via a randomly initialized MLP projector.

    Key architectural features include:

    • Pixel Unshuffle: Reduces the number of visual tokens to one-quarter of the original.
    • Dynamic Resolution Strategy: Divides images into tiles of 448×448 pixels.
    • Multimodal Support: Supports single-image, multi-image, and video data.
  7. Identify evaluation codebases for InternVL benchmarks

    main

    The InternVL evaluation results are obtained using several different codebases depending on the benchmark category. To evaluate InternVL on specific tasks, you must use the corresponding codebase listed below:

    Multimodal Reasoning and Mathematics

    • MMMU-Pro: Use the local ./mmmu_pro directory.
    • AI2D (with mask), ChartQA, DocVQA, InfoVQA: Use the local ./vqa directory.
    • CharXiv: Use the CharXiv repository.
    • MMMU, MathVista, MATH-Vision, MathVerse, OlympiadBench, AI2D (without mask), OCRBench, SEED-2-Plus, VCR: Use VLMEvalKit.

    Multi-Image Understanding

    • Mantis Eval: Use the local ./mantis_eval directory.
    • MMIU: Use the local ./mmiu directory.
    • MIRB: Use the local ./mirb directory.
    • BLINK, MuirBench, MMT-Bench: Use VLMEvalKit.

    Comprehensive Multimodal Evaluation

    • MME: Use the local ./mme directory.
    • MMBench: Use the local ./mmbench directory.
    • MMVet v2: Use the local ./mmvetv2 directory.
    • MMBench v1.1, MMVet, MMStar: Use VLMEvalKit.

    Multimodal Hallucination Evaluation

    • MMHal-Bench: Use the local ./mmhal directory.
    • POPE: Use the local ./pope directory.
    • HallBench, CRPE: Use VLMEvalKit.

    Visual Grounding

    • RefCOCO, RefCOCO+, RefCOCOg: Use the local ./refcoco directory.

    Video Understanding

    • MVBench: Use the local ./mvbench directory.
    • Video-MME, MMBench-Video, MLVU, LongVideoBench: Use VLMEvalKit.
    • CG-Bench: Provided by authors.

    Other Benchmarks

    • Real-World Comprehension (RealWorldQA, MME-RealWorld, WildVision, R-Bench): Use VLMEvalKit.
    • Multilingual (MMMB, Multilingual MMBench, MTVQA): Use VLMEvalKit.
  8. InternVL Model Family Documentation

    main

    The InternVL project provides specialized documentation for various model versions. Depending on your needs (Quick Start, Fine-tuning, Evaluation, Deployment, or Preference Optimization), refer to the specific version guide:

    • InternVL 3.0: Full suite including Intro, Quick Start, Finetune, Evaluate, Deploy, and MPO.
    • InternVL 2.5: Full suite including Intro, Quick Start, Finetune, Evaluate, Deploy, and MPO.
    • InternVL 2.0: Full suite including Intro, Quick Start, Finetune, Evaluate, Deploy, and MPO.
    • InternVL 1.5: Includes Intro, Quick Start, Finetune, and Evaluate, and Deploy.
    • InternVL 1.2: Includes Intro, Quick Start, Finetune, and Evaluate.
    • InternVL 1.1: Includes Intro, Quick Start, and Evaluation.
    • InternVL 1.0: Specialized tasks including Classification, CLIP-Benchmark, Segmentation, Chat-LLaVA, and InternVL-G.
  9. Capabilities of InternVL

    main

    InternVL is a suite of multimodal models capable of various visual and cross-modal tasks. Its primary capabilities include:

    Visual Perception

    • Linear-Probe Image Classification: High-performance image classification using models like InternViT-6B.
    • Semantic Segmentation: Precise pixel-level segmentation (e.g., using InternViT-6B with UperNet).
    • Zero-Shot Image Classification: Classifying images without specific training on target classes (e.g., ImageNet variants).
    • Multilingual Zero-Shot Image Classification: Supporting multiple languages including English (EN), Chinese (ZH), Japanese (JP), Arabic (Ar), and Italian (IT).
    • Zero-Shot Video Classification: Classifying video content across datasets like K400, K600, and K700.

    Cross-Modal Retrieval

    • English Zero-Shot Image-Text Retrieval: Retrieving images from text or vice versa using datasets like Flickr30K and COCO.
    • Chinese Zero-Shot Image-Text Retrieval: Specialized retrieval for Chinese language datasets (Flickr30K-CN, COCO-CN).
    • Multilingual Zero-Shot Image-Text Retrieval (XTD): Retrieval across multiple languages including English, Spanish, French, Chinese, Italian, Korean, Russian, and Japanese.

    Multimodal Dialogue

    • Support for interactive dialogue involving both text and visual inputs.