Model reference · open weights
cogvlm2-llama3 is an open-weight language model from zai-org. cogvlm2-llama3-chat-19B (BF16) weighs 39.0 GB; the smallest configuration that runs it is H100 80 GB.
Summary of the zai-org/cogvlm2-llama3-chat-19B model card, 2026-10-01
What it is
| Released by | zai-org |
|---|---|
| Released | 2024-05-16 |
| Parameters | 19.5B |
| VRAM | 39.0 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 8K each | |||
| RTX 3060 12 GB … RTX 5090 32 GB 5 smaller cards | — | — | |
| L40S 48 GB | — | 5K | 44.0 GB |
| A100 80 GB | 8 | all 8K | 78.2 GB |
| H100 80 GB | 7 | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 11 | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 14 | all 8K | 107 GB |
| H200 141 GB | 21 | all 8K | 138 GB |
| B200 180 GB | 30 | all 8K | 176 GB |
| 2× L40S 48 GB tensor parallel | 10 | all 8K | 44.0 GB a card |
| 4× RTX 4090 24 GB tensor parallel | 10 | all 8K | 23.4 GB a card |
| 4× RTX 3090 24 GB tensor parallel | 10 | all 8K | 23.4 GB a card |
| 4× RTX 5090 32 GB tensor parallel | 17 | all 8K | 31.0 GB a card |
| 2× H100 80 GB tensor parallel | 24 | all 8K | 78.1 GB a card |
| Requests at once | 8K tokens each |
|---|---|
| 1 | 45.3 GB |
| 5 | 62.5 GB |
| 8 | 75.4 GB |
| 16 | 110 GB |
| 32 | 178 GB |
| 64 | 316 GB |
One card, with vLLM's small-card settings.
From the model card
👋 Wechat · 💡Online Demo · 🎈Github Page · 📑 Paper 📍Experience the larger-scale CogVLM model on the ZhipuAI Open Platform.
We launch a new generation of CogVLM2 series of models and open source two models built with Meta-Llama-3-8B-Instruct. Compared with the previous generation of CogVLM open source models, the CogVLM2 series of open source models have the following improvements:
TextVQA, DocVQA.You can see the details of the CogVLM2 family of open source models in the table below:
| Model name | cogvlm2-llama3-chat-19B | cogvlm2-llama3-chinese-chat-19B |
|---|---|---|
| Base Model | Meta-Llama-3-8B-Instruct | Meta-Llama-3-8B-Instruct |
| Language | English | Chinese, English |
| Model size | 19B | 19B |
| Task | Image understanding, dialogue model | Image understanding, dialogue model |
| Text length | 8K | 8K |
| Image resolution | 1344 * 1344 | 1344 * 1344 |
Our open source models have achieved good results in many lists compared to the previous generation of CogVLM open source models. Its excellent performance can compete with some non-open source models, as shown in the table below:
| Model | Open Source | LLM Size | TextVQA | DocVQA | ChartQA | OCRbench | VCR_EASY | VCR_HARD | MMMU | MMVet | MMBench |
|---|---|---|---|---|---|---|---|---|---|---|---|
| CogVLM1.1 | ✅ | 7B | 69.7 | - | 68.3 | 590 | 73.9 | 34.6 | 37.3 | 52.0 | 65.8 |
| LLaVA-1.5 | ✅ | 13B | 61.3 | - | - | 337 | - | - | 37.0 | 35.4 | 67.7 |
| Mini-Gemini | ✅ | 34B | 74.1 | - | - | - | - | - | 48.0 | 59.3 | 80.6 |
| LLaVA-NeXT-LLaMA3 | ✅ | 8B | - | 78.2 | 69.5 | - | - | - | 41.7 | - | 72.1 |
| LLaVA-NeXT-110B | ✅ | 110B | - | 85.7 | 79.7 | - | - | - | 49.1 | - | 80.5 |
| InternVL-1.5 | ✅ | 20B | 80.6 | 90.9 | 83.8 | 720 | 14.7 | 2.0 | 46.8 | 55.4 | 82.3 |
| QwenVL-Plus | ❌ | - | 78.9 | 91.4 | 78.1 | 726 | - | - | 51.4 | 55.7 | 67.0 |
| Claude3-Opus | ❌ | - | - | 89.3 | 80.8 | 694 | 63.85 | 37.8 | 59.4 | 51.7 | 63.3 |
| Gemini Pro 1.5 | ❌ | - | 73.5 | 86.5 | 81.3 | - | 62.73 | 28.1 | 58.5 | - | - |
| GPT-4V | ❌ | - | 78.0 | 88.4 | 78.5 | 656 | 52.04 | 25.8 | 56.8 | 67.7 | 75.0 |
| CogVLM2-LLaMA3 | ✅ | 8B | 84.2 | 92.3 | 81.0 | 756 | 83.3 | 38.0 | 44.3 | 60.4 | 80.5 |
| CogVLM2-LLaMA3-Chinese | ✅ | 8B | 85.0 | 88.4 | 74.7 | 780 | 79.9 | 25.1 | 42.8 | 60.5 | 78.9 |
All reviews were obtained without using any external OCR tools ("pixel only").
here is a simple example of how to use the model to chat with the CogVLM2 model. For More use case. Find in our github
import torch
from PIL import Image
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_PATH = "THUDM/cogvlm2-llama3-chat-19B"
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
TORCH_TYPE = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else torch.float16
tokenizer = AutoTokenizer.from_pretrained(
MODEL_PATH,
trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH,
torch_dtype=TORCH_TYPE,
trust_remote_code=True,
).to(DEVICE).eval()
text_only_template = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {} ASSISTANT:"
while True:
image_path = input("image path >>>>> ")
if image_path == '':
print('You did not enter image path, the following will be a plain text conversation.')
image = None
text_only_first_query = True
else:
image = Image.open(image_path).convert('RGB')
history = []
while True:
query = input("Human:")
if query == "clear":
break
if image is None:
if text_only_first_query:
query = text_only_template.format(query)
text_only_first_query = False
else:
old_prompt = ''
for _, (old_query, response) in enumerate(history):
old_prompt += old_query + " " + response + "\n"
query = old_prompt + "USER: {} ASSISTANT:".format(query)
if image is None:
input_by_model = model.build_cQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.