Instructions to use YanweiLi/llama-vid-13b-pretrain-336 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YanweiLi/llama-vid-13b-pretrain-336 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YanweiLi/llama-vid-13b-pretrain-336")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("YanweiLi/llama-vid-13b-pretrain-336") model = AutoModelForCausalLM.from_pretrained("YanweiLi/llama-vid-13b-pretrain-336", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YanweiLi/llama-vid-13b-pretrain-336 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YanweiLi/llama-vid-13b-pretrain-336" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/llama-vid-13b-pretrain-336", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/YanweiLi/llama-vid-13b-pretrain-336
- SGLang
How to use YanweiLi/llama-vid-13b-pretrain-336 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 "YanweiLi/llama-vid-13b-pretrain-336" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/llama-vid-13b-pretrain-336", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "YanweiLi/llama-vid-13b-pretrain-336" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/llama-vid-13b-pretrain-336", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use YanweiLi/llama-vid-13b-pretrain-336 with Docker Model Runner:
docker model run hf.co/YanweiLi/llama-vid-13b-pretrain-336
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- vision-language model
|
| 4 |
+
- llama
|
| 5 |
+
- video understanding
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
# LLaMA-VID Model Card
|
| 10 |
+
<a href='https://llama-vid.github.io/'><img src='https://img.shields.io/badge/Project-Page-Green'></a>
|
| 11 |
+
<a href='https://arxiv.org/abs/2311.17043'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a>
|
| 12 |
+
|
| 13 |
+
## Model details
|
| 14 |
+
LLaMA-VID empowers existing frameworks to support hour-long videos and pushes their upper limit with an extra context token.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
**Model type:**
|
| 18 |
+
LLaMA-VID is an open-source chatbot trained by fine-tuning LLaMA/Vicuna on GPT-generated multimodal instruction-following data.
|
| 19 |
+
LLaMA-VID empowers existing frameworks to support hour-long videos and pushes their upper limit with an extra context token. We build this repo based on LLaVA.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
**Model date:**
|
| 23 |
+
llama-vid-13b-pretrain-336 was trained on 11/2023.
|
| 24 |
+
|
| 25 |
+
## License
|
| 26 |
+
Llama 2 is licensed under the LLAMA 2 Community License,
|
| 27 |
+
Copyright (c) Meta Platforms, Inc. All Rights Reserved.
|
| 28 |
+
|
| 29 |
+
**Where to send questions or comments about the model:**
|
| 30 |
+
https://github.com/dvlab-research/LLaMA-VID/issues
|
| 31 |
+
|
| 32 |
+
## Intended use
|
| 33 |
+
**Primary intended uses:**
|
| 34 |
+
The primary use of LLaMA-VID is research on large multimodal models and chatbots.
|
| 35 |
+
|
| 36 |
+
**Primary intended users:**
|
| 37 |
+
The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
|
| 38 |
+
|
| 39 |
+
## Training data
|
| 40 |
+
This model is trained based on LLaVA-1.5 dataset, including
|
| 41 |
+
- 558K filtered image-text pairs from LAION/CC/SBU, captioned by BLIP.
|