Model reference · open weights
Mini-InternVL-5 is an open-weight language model from OpenGVLab. Mini-InternVL-Chat-2B-V1-5 (BF16) weighs 4.4 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the OpenGVLab/Mini-InternVL-Chat-2B-V1-5 model card, 2026-10-01
What it is
| Released by | OpenGVLab |
|---|---|
| Released | 2024-05-13 |
| Parameters | 2.2B |
| VRAM | 4.4 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 6 | 1 | all 32K | 11.6 GB |
| RTX 4060 Ti 16 GB | 11 | 2 | all 32K | 15.4 GB |
| RTX 3090 24 GB | 21 | 5 | all 32K | 23.4 GB |
| RTX 4090 24 GB | 21 | 5 | all 32K | 23.4 GB |
| RTX 5090 32 GB | 30 | 7 | all 32K | 31.0 GB |
| L40S 48 GB | 46 | 11 | all 32K | 44.0 GB |
| A100 80 GB | 89 | 22 | all 32K | 78.2 GB |
| H100 80 GB | 84 | 21 | all 32K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 104 | 26 | all 32K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 121 | 30 | all 32K | 107 GB |
| H200 141 GB | 159 | 39 | all 32K | 138 GB |
| B200 180 GB | 206 | 51 | all 32K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 18 | 4 | all 32K | 11.6 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 7.1 GB | 9.5 GB |
| 5 | 10.4 GB | 22.4 GB |
| 8 | 12.8 GB | 32.1 GB |
| 16 | 19.2 GB | 57.9 GB |
| 32 | 32.1 GB | 109 GB |
| 64 | 57.9 GB | 212 GB |
One card, with vLLM's small-card settings.
From the model card
[📂 GitHub] [📜 InternVL 1.0] [📜 InternVL 1.5] [📜 Mini-InternVL] [📜 InternVL 2.5]
[🆕 Blog] [🗨️ Chat Demo] [🤗 HF Demo] [🚀 Quick Start] [📖 Documents]
You can run multimodal large models using a 1080Ti now.
We are delighted to introduce the Mini-InternVL-Chat series. In the era of large language models, many researchers have started to focus on smaller language models, such as Gemma-2B, Qwen-1.8B, and InternLM2-1.8B. Inspired by their efforts, we have distilled our vision foundation model InternViT-6B-448px-V1-5 down to 300M and used InternLM2-Chat-1.8B or Phi-3-mini-128k-instruct as our language model. This resulted in a small multimodal model with excellent performance.
As shown in the figure below, we adopted the same model architecture as InternVL 1.5. We simply replaced the original InternViT-6B with InternViT-300M and InternLM2-Chat-20B with InternLM2-Chat-1.8B / Phi-3-mini-128k-instruct. For training, we used the same data as InternVL 1.5 to train this smaller model. Additionally, due to the lower training costs of smaller models, we used a context length of 8K during training.
Model Type: multimodal large language model (MLLM)
Model Stats:
Training Strategy:
Limitations: Although we have made efforts to ensure the safety of the model during the training process and to encourage the model to generate text that complies with ethical and legal requirements, the model may still produce unexpected outputs due to its size and probabilistic generation paradigm. For example, the generated responses may contain biases, discrimination, or other harmful content. Please do not propagate such content. We are not responsible for any consequences resulting from the dissemination of harmful information.
We provide an example code to run Mini-InternVL-Chat-2B-V1-5 using transformers.
Please use transformers>=4.37.2 to ensure the model works normally.
import torch
from transformers import AutoTokenizer, AutoModel
path = "OpenGVLab/Mini-InternVL-Chat-2B-V1-5"
model = AutoModel.from_pretrained(
path,
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
use_flash_attn=True,
trust_remote_code=True).eval().cuda()
import torch
from transformers import AutoTokenizer, AutoModel
path = "OpenGVLab/Mini-InternVL-Chat-2B-V1-5"
model = AutoModel.from_pretrained(
path,
torch_dtype=torch.bfloat16,
load_in_8bit=True,
low_cpu_mem_usage=True,
use_flash_attn=True,
trust_remote_code=True).eval()
import torch
from transformers import AutoTokenizer, AutoModel
path = "OpenGVLab/Mini-InternVL-Chat-2B-V1-5"
model = AutoModel.from_pretrained(
path,
torch_dtype=torch.bfloat16,
load_in_4bit=True,
low_cpu_mem_usage=True,
use_flash_attn=True,
trust_remote_code=True).eval()
The reason for writing the code this way is to avoid errors that occur during multi-GPU inference due to tensors not being on the same device. By ensuring that the first and last layers of the large language model (LLM) are on the same device, we prevent such errors.
import math
import torch
from transformers import AutoTokenizer, AutoModel
def split_model(model_name):
device_map = {}
world_size = torch.cuda.device_count()
num_layers = {'Mini-InternVL-2B-V1-5': 24, 'Mini-InternVL-4B-V1-5': 32, 'InternVL-Chat-V1-5': 48}[model_name]
# Since the first GPU will be used for ViT, treat it as half a GPU.
num_layers_per_gpu = math.ceil(num_layers / (world_size - 0.5))
num_layers_per_gpu = [num_layers_per_gpu] * world_size
num_layers_per_gpu[0] = math.ceil(num_layers_per_gpu[0] * 0.5)
layer_cnt = 0
for i, num_layer in enumerate(num_layers_per_gpu):
for j in range(num_layer):
device_map[f'language_model.model.layers.{layer_cnt}'] = i
layer_cnt += 1
device_map['vision_model'] = 0
device_map['mlp1'] = 0
device_map['language_model.model.tok_embeddings'] = 0
device_map['language_model.model.embed_tokens'] = 0
device_map['language_model.output'] = 0
device_map['language_model.model.norm'] = 0
device_map['language_model.model.rotary_emb'] = 0
device_map['language_model.lm_head'] = 0
device_map[f'languQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.