Video-Text-to-Text
Transformers
Safetensors
English
videochat_flash_qwen
feature-extraction
multimodal
custom_code
Eval Results (legacy)
Run this model with HF Jobs
Run OpenGVLab/VideoChat-Flash-Qwen2-7B_res448 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/OpenGVLab/VideoChat-Flash-Qwen2-7B_res448. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/OpenGVLab/VideoChat-Flash-Qwen2-7B_res448 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use OpenGVLab/VideoChat-Flash-Qwen2-7B_res448 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/VideoChat-Flash-Qwen2-7B_res448 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenGVLab/VideoChat-Flash-Qwen2-7B_res448", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update vision_tower_builder.py
Browse files23 unmodified lines242526272829283031323335 unmodified lines697071727374757677787980540 unmodified lines62162262361662462562623 unmodified linesfrom functools import partialtry: from flash_attn import flash_attn_qkvpacked_func use_flash_attn = Trueexcept: use_flash_attn = False print("You need to install flash_attn") print("You need to install flash_attn to be faster!")from timm.layers import drop_path, to_2tuple, trunc_normal_
35 unmodified lines self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., attn_head_dim=None, attn_type='flash_v2'):
if use_flash_attn: attn_type = attn_type else: attn_type = 'origin' super().__init__() self.num_heads = num_heads head_dim = dim // num_heads540 unmodified lines if "umt-hd" in vision_tower: return UMTVisionTower(vision_tower, vision_tower_cfg=vision_tower_cfg, image_size=448, **kwargs) elif "umt" in vision_tower: raise NotImplementedError return UMTVisionTower(vision_tower, vision_tower_cfg=vision_tower_cfg, **kwargs)
raise ValueError(f"Unknown vision tower: {vision_tower}")vision_tower_builder.py+9-2