zai-org / cogvlm2-llama3-chat-19B

huggingface.co
Total runs: 10.3K
24-hour runs: 130
7-day runs: 497
30-day runs: 3.0K
Model's Last Updated: September 04 2024
text-generation

Introduction of cogvlm2-llama3-chat-19B

Model Details of cogvlm2-llama3-chat-19B

CogVLM2

👋 Wechat · 💡 Online Demo · 🎈 Github Page · 📑 Paper

📍Experience the larger-scale CogVLM model on the ZhipuAI Open Platform .

Model introduction

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:

  1. Significant improvements in many benchmarks such as TextVQA , DocVQA .
  2. Support 8K content length.
  3. Support image resolution up to 1344 * 1344 .
  4. Provide an open source model version that supports both Chinese and English .

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
Benchmark

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").

Quick Start

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_conversation_input_ids(
                tokenizer,
                query=query,
                history=history,
                template_version='chat'
            )
        else:
            input_by_model = model.build_conversation_input_ids(
                tokenizer,
                query=query,
                history=history,
                images=[image],
                template_version='chat'
            )
        inputs = {
            'input_ids': input_by_model['input_ids'].unsqueeze(0).to(DEVICE),
            'token_type_ids': input_by_model['token_type_ids'].unsqueeze(0).to(DEVICE),
            'attention_mask': input_by_model['attention_mask'].unsqueeze(0).to(DEVICE),
            'images': [[input_by_model['images'][0].to(DEVICE).to(TORCH_TYPE)]] if image is not None else None,
        }
        gen_kwargs = {
            "max_new_tokens": 2048,
            "pad_token_id": 128002,  
        }
        with torch.no_grad():
            outputs = model.generate(**inputs, **gen_kwargs)
            outputs = outputs[:, inputs['input_ids'].shape[1]:]
            response = tokenizer.decode(outputs[0])
            response = response.split("<|end_of_text|>")[0]
            print("\nCogVLM2:", response)
        history.append((query, response))
License

This model is released under the CogVLM2 LICENSE . For models built with Meta Llama 3, please also adhere to the LLAMA3_LICENSE .

Citation

If you find our work helpful, please consider citing the following papers

@misc{hong2024cogvlm2,
  title={CogVLM2: Visual Language Models for Image and Video Understanding},
  author={Hong, Wenyi and Wang, Weihan and Ding, Ming and Yu, Wenmeng and Lv, Qingsong and Wang, Yan and Cheng, Yean and Huang, Shiyu and Ji, Junhui and Xue, Zhao and others},
  year={2024}
  eprint={2408.16500},
  archivePrefix={arXiv},
  primaryClass={cs.CV}
}

@misc{wang2023cogvlm,
      title={CogVLM: Visual Expert for Pretrained Language Models}, 
      author={Weihan Wang and Qingsong Lv and Wenmeng Yu and Wenyi Hong and Ji Qi and Yan Wang and Junhui Ji and Zhuoyi Yang and Lei Zhao and Xixuan Song and Jiazheng Xu and Bin Xu and Juanzi Li and Yuxiao Dong and Ming Ding and Jie Tang},
      year={2023},
      eprint={2311.03079},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Runs of zai-org cogvlm2-llama3-chat-19B on huggingface.co

10.3K
Total runs
130
24-hour runs
307
3-day runs
497
7-day runs
3.0K
30-day runs

More Information About cogvlm2-llama3-chat-19B huggingface.co Model

More cogvlm2-llama3-chat-19B license Visit here:

https://choosealicense.com/licenses/cogvlm2

cogvlm2-llama3-chat-19B huggingface.co

cogvlm2-llama3-chat-19B huggingface.co is an AI model on huggingface.co that provides cogvlm2-llama3-chat-19B's model effect (), which can be used instantly with this zai-org cogvlm2-llama3-chat-19B model. huggingface.co supports a free trial of the cogvlm2-llama3-chat-19B model, and also provides paid use of the cogvlm2-llama3-chat-19B. Support call cogvlm2-llama3-chat-19B model through api, including Node.js, Python, http.

cogvlm2-llama3-chat-19B huggingface.co Url

https://huggingface.co/zai-org/cogvlm2-llama3-chat-19B

zai-org cogvlm2-llama3-chat-19B online free

cogvlm2-llama3-chat-19B huggingface.co is an online trial and call api platform, which integrates cogvlm2-llama3-chat-19B's modeling effects, including api services, and provides a free online trial of cogvlm2-llama3-chat-19B, you can try cogvlm2-llama3-chat-19B online for free by clicking the link below.

zai-org cogvlm2-llama3-chat-19B online free url in huggingface.co:

https://huggingface.co/zai-org/cogvlm2-llama3-chat-19B

cogvlm2-llama3-chat-19B install

cogvlm2-llama3-chat-19B is an open source model from GitHub that offers a free installation service, and any user can find cogvlm2-llama3-chat-19B on GitHub to install. At the same time, huggingface.co provides the effect of cogvlm2-llama3-chat-19B install, users can directly use cogvlm2-llama3-chat-19B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

cogvlm2-llama3-chat-19B install url in huggingface.co:

https://huggingface.co/zai-org/cogvlm2-llama3-chat-19B

Url of cogvlm2-llama3-chat-19B

cogvlm2-llama3-chat-19B huggingface.co Url

Provider of cogvlm2-llama3-chat-19B huggingface.co

zai-org
ORGANIZATIONS

Other API from zai-org

huggingface.co

Total runs: 1.9M
Run Growth: -1.4M
Growth Rate: -72.24%
Updated:September 11 2026
huggingface.co

Total runs: 1.9M
Run Growth: -106.5K
Growth Rate: -5.66%
Updated:January 29 2026
huggingface.co

Total runs: 1.3M
Run Growth: 1.3M
Growth Rate: 100.00%
Updated:September 07 2026
huggingface.co

Total runs: 1.3M
Run Growth: -706.1K
Growth Rate: -53.41%
Updated:September 01 2026
huggingface.co

Total runs: 932.2K
Run Growth: -1.8M
Growth Rate: -188.05%
Updated:September 01 2026
huggingface.co

Total runs: 635.5K
Run Growth: 626.7K
Growth Rate: 98.61%
Updated:September 04 2026
huggingface.co

Total runs: 442.1K
Run Growth: -4.8K
Growth Rate: -1.09%
Updated:August 04 2024
huggingface.co

Total runs: 272.7K
Run Growth: -733.7K
Growth Rate: -269.02%
Updated:April 05 2026
huggingface.co

Total runs: 263.9K
Run Growth: -212.3K
Growth Rate: -80.46%
Updated:April 16 2026
huggingface.co

Total runs: 101.7K
Run Growth: -187.4K
Growth Rate: -184.31%
Updated:August 11 2025
huggingface.co

Total runs: 87.5K
Run Growth: -1.8K
Growth Rate: -2.07%
Updated:March 13 2025
huggingface.co

Total runs: 82.3K
Run Growth: 8.0K
Growth Rate: 9.73%
Updated:May 13 2026
huggingface.co

Total runs: 80.5K
Run Growth: -43.5K
Growth Rate: -54.00%
Updated:August 11 2025
huggingface.co

Total runs: 78.4K
Run Growth: -82.6K
Growth Rate: -105.42%
Updated:December 10 2025
huggingface.co

Total runs: 76.3K
Run Growth: -8.1K
Growth Rate: -10.65%
Updated:December 05 2024
huggingface.co

Total runs: 75.4K
Run Growth: 3.7K
Growth Rate: 4.86%
Updated:January 29 2026
huggingface.co

Total runs: 58.8K
Run Growth: -63.5K
Growth Rate: -108.01%
Updated:August 11 2026
huggingface.co

Total runs: 45.4K
Run Growth: -82.9K
Growth Rate: -182.81%
Updated:October 25 2025
huggingface.co

Total runs: 22.0K
Run Growth: -2.3K
Growth Rate: -10.22%
Updated:November 23 2024
huggingface.co

Total runs: 20.7K
Run Growth: -62.9K
Growth Rate: -303.60%
Updated:March 03 2025
huggingface.co

Total runs: 20.7K
Run Growth: -20.8K
Growth Rate: -100.51%
Updated:April 14 2025
huggingface.co

Total runs: 18.3K
Run Growth: -9.7K
Growth Rate: -52.88%
Updated:September 30 2025
huggingface.co

Total runs: 15.4K
Run Growth: -2.5K
Growth Rate: -16.41%
Updated:November 23 2024
huggingface.co

Total runs: 14.2K
Run Growth: -13.3K
Growth Rate: -93.35%
Updated:December 23 2025
huggingface.co

Total runs: 13.4K
Run Growth: 13.0K
Growth Rate: 96.42%
Updated:September 04 2026
huggingface.co

Total runs: 13.1K
Run Growth: 2.5K
Growth Rate: 18.98%
Updated:December 09 2025
huggingface.co

Total runs: 10.1K
Run Growth: 1.4K
Growth Rate: 14.29%
Updated:January 15 2026
huggingface.co

Total runs: 7.9K
Run Growth: -3.6K
Growth Rate: -45.43%
Updated:October 16 2025
huggingface.co

Total runs: 7.2K
Run Growth: -7.1K
Growth Rate: -99.58%
Updated:April 22 2025
huggingface.co

Total runs: 6.2K
Run Growth: -1.7K
Growth Rate: -28.22%
Updated:March 11 2025
huggingface.co

Total runs: 5.3K
Run Growth: -1.9K
Growth Rate: -36.13%
Updated:January 27 2025
huggingface.co

Total runs: 3.7K
Run Growth: -5.3K
Growth Rate: -142.00%
Updated:December 09 2025
huggingface.co

Total runs: 3.1K
Run Growth: 1.1K
Growth Rate: 36.55%
Updated:August 04 2024
huggingface.co

Total runs: 2.9K
Run Growth: -1.6K
Growth Rate: -53.96%
Updated:October 25 2025
huggingface.co

Total runs: 1.6K
Run Growth: 773
Growth Rate: 47.25%
Updated:August 12 2025
huggingface.co

Total runs: 687
Run Growth: 309
Growth Rate: 44.98%
Updated:March 02 2023
huggingface.co

Total runs: 588
Run Growth: -31
Growth Rate: -5.27%
Updated:August 11 2025
huggingface.co

Total runs: 423
Run Growth: -1.2K
Growth Rate: -294.09%
Updated:January 02 2025
huggingface.co

Total runs: 410
Run Growth: 244
Growth Rate: 59.51%
Updated:October 20 2023
huggingface.co

Total runs: 322
Run Growth: 76
Growth Rate: 23.60%
Updated:December 10 2024
huggingface.co

Total runs: 305
Run Growth: -419
Growth Rate: -137.38%
Updated:October 25 2025
huggingface.co

Total runs: 304
Run Growth: 144
Growth Rate: 47.37%
Updated:March 02 2023
huggingface.co

Total runs: 277
Run Growth: 70
Growth Rate: 25.27%
Updated:November 20 2023
huggingface.co

Total runs: 251
Run Growth: 111
Growth Rate: 44.22%
Updated:October 20 2023
huggingface.co

Total runs: 244
Run Growth: 107
Growth Rate: 43.85%
Updated:October 20 2023