Instructions to use luodian/OTTER-Video-LLaMA7B-DenseCaption with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use luodian/OTTER-Video-LLaMA7B-DenseCaption with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="luodian/OTTER-Video-LLaMA7B-DenseCaption")# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("luodian/OTTER-Video-LLaMA7B-DenseCaption", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use luodian/OTTER-Video-LLaMA7B-DenseCaption with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "luodian/OTTER-Video-LLaMA7B-DenseCaption" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luodian/OTTER-Video-LLaMA7B-DenseCaption", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/luodian/OTTER-Video-LLaMA7B-DenseCaption
- SGLang
How to use luodian/OTTER-Video-LLaMA7B-DenseCaption 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 "luodian/OTTER-Video-LLaMA7B-DenseCaption" \ --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": "luodian/OTTER-Video-LLaMA7B-DenseCaption", "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 "luodian/OTTER-Video-LLaMA7B-DenseCaption" \ --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": "luodian/OTTER-Video-LLaMA7B-DenseCaption", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use luodian/OTTER-Video-LLaMA7B-DenseCaption with Docker Model Runner:
docker model run hf.co/luodian/OTTER-Video-LLaMA7B-DenseCaption
Add pipeline tag, link to paper
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
<p align="center" width="100%">
|
|
@@ -188,4 +189,19 @@ while True:
|
|
| 188 |
response = get_response(frames_list, prompts_input, model, image_processor, tensor_dtype)
|
| 189 |
print(f"Response: {response}")
|
| 190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
```
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
pipeline_tag: video-text-to-text
|
| 4 |
---
|
| 5 |
|
| 6 |
<p align="center" width="100%">
|
|
|
|
| 189 |
response = get_response(frames_list, prompts_input, model, image_processor, tensor_dtype)
|
| 190 |
print(f"Response: {response}")
|
| 191 |
|
| 192 |
+
```
|
| 193 |
+
<br>
|
| 194 |
+
<div align="center">
|
| 195 |
+
<a href='https://arxiv.org/abs/2305.03726'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a> <a href='https://github.com/Luodian/Otter'><img src='https://img.shields.io/badge/GitHub-Code-blue'></a>
|
| 196 |
+
</div>
|
| 197 |
+
|
| 198 |
+
## 📜 Citation
|
| 199 |
+
|
| 200 |
+
```
|
| 201 |
+
@article{li2023otter,
|
| 202 |
+
title={Otter: A Multi-Modal Model with In-Context Instruction Tuning},
|
| 203 |
+
author={Li, Bo and Zhang, Yuanhan and Chen, Liangyu and Wang, Jinghao and Yang, Jingkang and Liu, Ziwei},
|
| 204 |
+
journal={arXiv preprint arXiv:2305.03726},
|
| 205 |
+
year={2023}
|
| 206 |
+
}
|
| 207 |
```
|