Text Generation
Transformers
Safetensors
English
chat
cogvlm2
cogvlm--video
conversational
custom_code
Instructions to use zai-org/cogvlm2-video-llama3-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/cogvlm2-video-llama3-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/cogvlm2-video-llama3-chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("zai-org/cogvlm2-video-llama3-chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zai-org/cogvlm2-video-llama3-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/cogvlm2-video-llama3-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/cogvlm2-video-llama3-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/cogvlm2-video-llama3-chat
- SGLang
How to use zai-org/cogvlm2-video-llama3-chat with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zai-org/cogvlm2-video-llama3-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/cogvlm2-video-llama3-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zai-org/cogvlm2-video-llama3-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/cogvlm2-video-llama3-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/cogvlm2-video-llama3-chat with Docker Model Runner:
docker model run hf.co/zai-org/cogvlm2-video-llama3-chat
zR commited on
Commit ·
8e2af17
1
Parent(s): b478626
fix
Browse files- README.md +3 -3
- README_zh.md +25 -5
README.md
CHANGED
|
@@ -46,7 +46,7 @@ the [MVBench](https://github.com/OpenGVLab/Ask-Anything), [VideoChatGPT-Bench](h
|
|
| 46 |
and Zero-shot VideoQA datasets (MSVD-QA, MSRVTT-QA, ActivityNet-QA). Where VCG-* refers to the VideoChatGPTBench, ZS-*
|
| 47 |
refers to Zero-Shot VideoQA datasets and MV-* refers to main categories in the MVBench.
|
| 48 |
|
| 49 |
-
.
|
|
| 99 |
## License
|
| 100 |
|
| 101 |
This model is released under the
|
| 102 |
-
CogVLM2 [LICENSE](
|
| 103 |
For models built with Meta Llama 3, please also adhere to
|
| 104 |
-
the [LLAMA3_LICENSE](
|
| 105 |
|
| 106 |
## Training details
|
| 107 |
|
|
|
|
| 46 |
and Zero-shot VideoQA datasets (MSVD-QA, MSRVTT-QA, ActivityNet-QA). Where VCG-* refers to the VideoChatGPTBench, ZS-*
|
| 47 |
refers to Zero-Shot VideoQA datasets and MV-* refers to main categories in the MVBench.
|
| 48 |
|
| 49 |
+

|
| 50 |
|
| 51 |
Performance on VideoChatGPT-Bench and Zero-shot VideoQA dataset:
|
| 52 |
|
|
|
|
| 99 |
## License
|
| 100 |
|
| 101 |
This model is released under the
|
| 102 |
+
CogVLM2 [LICENSE](./LICENSE).
|
| 103 |
For models built with Meta Llama 3, please also adhere to
|
| 104 |
+
the [LLAMA3_LICENSE](./LLAMA3_LICENSE).
|
| 105 |
|
| 106 |
## Training details
|
| 107 |
|
README_zh.md
CHANGED
|
@@ -1,10 +1,29 @@
|
|
| 1 |
# CogVLM2-Video-Llama3-Chat
|
| 2 |
|
| 3 |
-
CogVLM2-Video 在多个视频问答任务上
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
在 [MVBench](https://github.com/OpenGVLab/Ask-Anything)、[VideoChatGPT-Bench](https://github.com/mbzuai-oryx/Video-ChatGPT)
|
| 5 |
和 Zero-shot VideoQA 数据集 (MSVD-QA、MSRVTT-QA、ActivityNet-QA) 上的性能。
|
| 6 |
|
| 7 |
-
、[VideoChatGPT-Bench](https://github.com/mbzuai-oryx/Video-ChatGPT)
|
| 24 |
和 Zero-shot VideoQA 数据集 (MSVD-QA、MSRVTT-QA、ActivityNet-QA) 上的性能。
|
| 25 |
|
| 26 |
+

|
| 27 |
|
| 28 |
其中 VCG 指的是 VideoChatGPTBench,ZS 指的是零样本 VideoQA 数据集,MV-* 指的是 MVBench 中的主要类别。
|
| 29 |
|
|
|
|
| 76 |
|
| 77 |
## 模型协议
|
| 78 |
|
| 79 |
+
此模型根据
|
| 80 |
+
CogVLM2 [LICENSE](./LICENSE)
|
| 81 |
+
发布。对于使用 Meta Llama 3 构建的模型,还请遵守
|
| 82 |
+
[LLAMA3_LICENSE](./LLAMA3_LICENSE)。
|
| 83 |
## 引用
|
| 84 |
|
| 85 |
我们即将发布技术报告,尽情期待。
|