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 lines242526272829303135 unmodified lines676869707172540 unmodified lines61361461561661761861923 unmodified linesfrom functools import partialtry:from flash_attn import flash_attn_qkvpacked_funcexcept:print("You need to install flash_attn")from timm.layers import drop_path, to_2tuple, trunc_normal_35 unmodified linesself, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.,proj_drop=0., attn_head_dim=None,attn_type='flash_v2'):super().__init__()self.num_heads = num_headshead_dim = dim // num_heads540 unmodified linesif "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 NotImplementedErrorreturn UMTVisionTower(vision_tower, vision_tower_cfg=vision_tower_cfg, **kwargs)raise ValueError(f"Unknown vision tower: {vision_tower}")23 unmodified lines2425262728293031323335 unmodified lines697071727374757677787980540 unmodified lines62162262362462562623 unmodified linesfrom functools import partialtry:from flash_attn import flash_attn_qkvpacked_funcuse_flash_attn = Trueexcept:use_flash_attn = Falseprint("You need to install flash_attn to be faster!")from timm.layers import drop_path, to_2tuple, trunc_normal_35 unmodified linesself, 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_typeelse:attn_type = 'origin'super().__init__()self.num_heads = num_headshead_dim = dim // num_heads540 unmodified linesif "umt-hd" in vision_tower:return UMTVisionTower(vision_tower, vision_tower_cfg=vision_tower_cfg, image_size=448, **kwargs)elif "umt" in vision_tower: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