/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
7,1 млрд
Лицензия
Apache 2.0
Архитектура
mistral · dense
Опубликована
2 дек 2024

Divot

Генерация текстаТекст → текст3 профессии

Divot-LLM использует видеотокенизатор и языковую модель Mistral для понимания видеоклипов и генерации видео.

18скачиваний за 30 дней8лайковвеса обновлены10 дек 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Divot-LLM — модель TencentARC для понимания видео и генерации видеороликов. Она использует видеотокенизатор Divot, обученный самоконтролируемым способом с помощью диффузионного процесса: его непрерывные пространственно-временные признаки передаются языковой модели для авторегрессионной генерации текста, а при генерации видео модель предсказывает распределение этих признаков с помощью гауссовой смеси, после чего декодер восстанавливает видеоклип. В репозитории также опубликованы токенизатор и декодер Divot, код обучения и инференса.

В карточке указана архитектура Mistral, плотная причинная языковая модель с 7,1 млрд параметров и контекстом 32 768 токенов; формат весов — PyTorch и Safetensors. Для запуска требуются PyTorch и GPU NVIDIA с CUDA. README указывает необходимость отдельно загрузить Mistral-7B-Instruct-v0.1 и CLIP ViT-H/14, а также обученные компоненты Divot. Модель распространяется по лицензии Apache-2.0.

Сценарии применения

  • ответы на вопросы о содержании видеоклипа
  • создание текстового описания видео
  • понимание пространственно-временных событий в видео
  • генерация видеоклипа по текстовому запросу
  • восстановление видео из представлений токенизатора

Ограничения

Для инференса требуются компоненты Divot, Mistral-7B-Instruct-v0.1 и CLIP ViT-H/14; README также указывает требование GPU NVIDIA с CUDA. Метаданные задают задачу text-generation, тогда как README описывает работу с видео; отдельный видеотег в метаданных не указан.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Divot: Diffusion Powers Video Tokenizer for Comprehension and Generation

arXiv Static Badge

We introduce Divot, a Diffusion-Powered Video Tokenizer, which leverages the diffusion process for self-supervised video representation learning. We posit that if a video diffusion model can effectively de-noise video clips by taking the features of a video tokenizer as the condition, then the tokenizer has successfully captured robust spatial and temporal information. Additionally, the video diffusion model inherently functions as a de-tokenizer, decoding videos from their representations. Building upon the Divot tokenizer, we present Divot-LLM through video-to-text autoregression and text-to-video generation by modeling the distributions of continuous-valued Divot features with a Gaussian Mixture Model.

All models, training code and inference code are released!

TODOs

  • Release the pretrained tokenizer and de-tokenizer of Divot.
  • Release the pretrained and instruction tuned model of Divot-LLM.
  • Release inference code of Divot.
  • Release training and inference code of Divot-LLM.
  • Release training code of Divot.
  • Release de-tokenizer adaptation training code.

Introduction

image

We utilize the diffusion procedure to learn a video tokenizer in a self-supervised manner for unified comprehension and generation, where the spatiotemporal representations serve as the condition of a diffusion model to de-noise video clips. Additionally, the proxy diffusion model functions as a de-tokenizer to decode realistic video clips from the video representations.

After training the the Divot tokenizer, video features from the Divot tokenizer are fed into the LLM to perform next-word prediction for video comprehension, while learnable queries are input into the LLM to model the distributions of Divot features using a Gaussian Mixture Model (GMM) for video generation. During inference, video features are sampled from the predicted GMM distribution to decode videos using the de-tokenizer.

Usage

Dependencies

Installation

Clone the repo and install dependent packages

git clone https://github.com/TencentARC/Divot.git
cd Divot
pip install -r requirements.txt

Model Weights

We release the pretrained tokenizer and de-tokenizer, pre-trained and instruction-tuned Divot-LLM. Please download the checkpoints and save them under the folder ./pretrained. For example, ./pretrained/Divot_tokenizer_detokenizer.

You also need to download Mistral-7B-Instruct-v0.1 and CLIP-ViT-H-14-laion2B-s32B-b79K, and save them under the folder ./pretrained.

Inference

Video Reconstruction with Divot

python3 src/tools/eval_Divot_video_recon.py

Video Comprehension with Divot-LLM

python3 src/tools/eval_Divot_video_comp.py

Video Generation with Divot-LLM

python3 src/tools/eval_Divot_video_gen.py

Training

Pre-training

  1. Download the checkpoints of pre-trained Mistral-7B-Instruct-v0.1 and CLIP-ViT-H-14-laion2B-s32B-b79K , and save them under the folder ./pretrained.
  2. Prepare the training data in the format of webdataset.
  3. Run the following script.
sh scripts/train_Divot_pretrain_comp_gen.sh

Instruction-tuning

  1. Download the checkpoints of pre-trained Divot tokenizer and Divot-LLM in Divot, and save them under the folder ./pretrained.
  2. Prepare the instruction data in the format of webdataset (for generation) and jsonl (for comprehension, where each line stores a dictionary used to specify the video_path, question, and answer).
  3. Run the following script.
### For video comprehension
sh scripts/train_Divot_sft_comp.sh

### For video generation
sh scripts/train_Divot_sft_gen.sh

Inference with your own model

  1. Obtain "pytorch_model.bin" with the following script.
cd train_output/sft_comp/checkpoint-xxxx
python3 zero_to_fp32.py . pytorch_model.bin
  1. Merge your trained lora with the original LLM model using the following script.
python3 src/tools/merge_agent_lora_weight.py
  1. Load your merged model in "mistral7b_merged_xxx" and and corresponding "agent" path, For example,
llm_cfg_path = 'configs/clm_models/mistral7b_merged_sft_comp.yaml'
agent_cfg_path = 'configs/clm_models/agent_7b_in64_out64_video_gmm_sft_comp.yaml'

License

Divot is licensed under the Apache License Version 2.0 for academic purpose only except for the third-party components listed in License.

Citation

If you find the work helpful, please consider citing:

@article{ge2024divot,
  title={Divot: Diffusion Powers Video Tokenizer for Comprehension and Generation},
  author={Ge, Yuying and Li, Yizhuo and Ge, Yixiao and Shan, Ying},
  journal={arXiv preprint arXiv:2412.04432},
  year={2024}
}

Acknowledge

Our code for Divot tokenizer and de-tokenizer is built upon DynamiCrafter. Thanks for their excellent work!

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

vLLM

Можно запустить

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
06adb41

0 моделей