---
title: videollama_7b_llama2_finetuned
canonical_url: "https://www.modelscope.cn/models/iic/videollama_7b_llama2_finetuned"
md_url: "https://www.modelscope.cn/models/iic/videollama_7b_llama2_finetuned.md"
repository: iic/videollama_7b_llama2_finetuned
chinese_name: "Video-LLaMA-7B-llama2chat-英文微调版"
last_updated: 2023-09-19
license: "Apache License 2.0"
library_name:
  - pytorch
frameworks:
  - pytorch
domain:
  - multi-modal
downloads: 4271
stars: 10
tags:
  - Alibaba
  - DAMO
  - Video-LLaMA
  - LLaMA2-Chat
  - "arxiv:2306.02858"
  - "多模态"
  - "图像"
  - "视频"
  - "文本"
---

# videollama_7b_llama2_finetuned

> videollama_7b_llama2_finetuned - iic 在 ModelScope 开源的模型。Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding

iic/videollama_7b_llama2_finetuned 是 ModelScope 魔搭社区上的机器学习模型，采用 Apache License 2.0 许可。

- **Repository**: iic/videollama_7b_llama2_finetuned
- **License**: Apache License 2.0
- **Tags**: Alibaba, DAMO, Video-LLaMA, LLaMA2-Chat, arxiv:2306.02858, 多模态, 图像, 视频, 文本
- **Downloads**: 4271
- **Stars**: 10
- **Last updated**: 2023-09-19

Source: https://www.modelscope.cn/models/iic/videollama_7b_llama2_finetuned

---

<h1 align="center"><a href="https://github.com/DAMO-NLP-SG/Video-LLaMA"><img src="https://s1.ax1x.com/2023/05/22/p9oQ0FP.jpg", alt="Video-LLaMA" border="0" style="margin: 0 auto; height: 200px;" /></a> </h1>

# Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding


<div style='display:flex; gap: 0.25rem; '>
<a href='https://github.com/DAMO-NLP-SG/Video-LLaMA'><img src='https://img.shields.io/badge/Github-Code-success'></a>
<a href='https://modelscope.cn/studios/damo/video-llama/summary'><img src='https://img.shields.io/badge/ModelScope-Demo-blueviolet'></a>
<a href='https://huggingface.co/spaces/DAMO-NLP-SG/Video-LLaMA'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue'></a> 
<a href='https://huggingface.co/DAMO-NLP-SG/Video-LLaMA-Series'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue'></a> 
<a href='https://arxiv.org/abs/2306.02858'><img src='https://img.shields.io/badge/Paper-PDF-red'></a>
</div>




# Video-LLaMA是什么

[Video-LLaMA](https://github.com/DAMO-NLP-SG/Video-LLaMA)是一个多模型大型语言模型，通过将语言解码器与现成的单模预训练模型连接起来，实现人与计算机之间基于视频的对话。

# 如何玩转Video-LLaMA

## 基础配置
```
注：Video-LLaMA目前还在快速迭代，现在以相对独立的方式实现了ModelScope的接口，因此需要独立安装环境。
```

- 首先安装ModelScope:
```shell
# modelscope的notebook不需要安装modelscope
# !pip install modelscope -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
```

- 然后导入模型
```python
from modelscope import snapshot_download, AutoModelForCausalLM, AutoTokenizer,GenerationConfig
model_dir = snapshot_download("damo/videollama_7b_llama2_finetuned", revision='v0.1.1')
```

- 安装包
```shell
# cd Video-LLaMA
# !pip install -r requirement.txt
```

## 基于Video 聊天

```
from modelscope.models import Model
from modelscope.pipelines import pipeline
import sys
model_dir = snapshot_download("damo/videollama_7b_llama2_finetuned", revision='v0.1.1')
sys.path.append(model_dir)
inference = pipeline('my-videollama-task', model=model_dir)
data = {
    "system": ' ',
    'video': "./examples/silence_girl.mp4",
    'messages': [
        ['USER',"Please describe this video in details."]
        ]
}
output = inference(data)
print(output['text'])
```
## 模型局限性
Video-LLaMA是一个原型模型，在理解复杂场景、长视频或特定领域时可能存在局限性。
输出结果可能受到输入质量、数据集的局限性和模型对错觉的敏感性的影响。请谨慎解读结果。

## 相关论文以及引用
如果你觉得Video-LLaMA好用，希望您能给我们的仓库点个star，并且引用我们的论文：
```
@article{damonlpsg2023videollama,
  author = {Zhang, Hang and Li, Xin and Bing, Lidong},
  title = {Video-LLaMA: An Instruction-tuned Audio-Visual Language Model for Video Understanding},
  year = 2023,
  journal = {arXiv preprint arXiv:2306.02858}
  url = {https://arxiv.org/abs/2306.02858}
}
