Run this model with HF Jobs
Run IVGSZ/Flash-VStream-7b 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 and TRL to fine-tune https://huggingface.co/IVGSZ/Flash-VStream-7b. 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/IVGSZ/Flash-VStream-7b 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.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/IVGSZ/Flash-VStream-7b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/IVGSZ/Flash-VStream-7b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use IVGSZ/Flash-VStream-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IVGSZ/Flash-VStream-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IVGSZ/Flash-VStream-7b")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IVGSZ/Flash-VStream-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IVGSZ/Flash-VStream-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IVGSZ/Flash-VStream-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IVGSZ/Flash-VStream-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IVGSZ/Flash-VStream-7b
- SGLang
How to use IVGSZ/Flash-VStream-7b 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 "IVGSZ/Flash-VStream-7b" \ --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": "IVGSZ/Flash-VStream-7b", "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 "IVGSZ/Flash-VStream-7b" \ --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": "IVGSZ/Flash-VStream-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IVGSZ/Flash-VStream-7b with Docker Model Runner:
docker model run hf.co/IVGSZ/Flash-VStream-7b
Improve model card: Add pipeline tag, library, update links and license
#3
by nielsr HF Staff - opened
123456789101112131415161718192021222324252627---license: llama2tags:- vision-language model- llama- video understanding---# Flash-VStream Model Card<a href='https://invinciblewyq.github.io/vstream-page/'><img src='https://img.shields.io/badge/Project-Page-Green'></a><a href='https://arxiv.org/abs/2406.08085v1'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a>## Model detailsWe proposed Flash-VStream, a video-language model that simulates the memory mechanism of human. Our model is able to process extremely long video streams in real-time and respond to user queries simultaneously.## Training dataThis model is trained based on image data from LLaVA-1.5 dataset, and video data from WebVid and ActivityNet datasets following LLaMA-VID, including- 558K filtered image-text pairs from LAION/CC/SBU, captioned by BLIP.- 158K GPT-generated multimodal instruction-following data.- 450K academic-task-oriented VQA data mixture.- 40K ShareGPT data.- 232K video-caption pairs sampled from the WebVid 2.5M dataset.- 98K videos from ActivityNet with QA pairs from Video-ChatGPT.## LicenseThis project is licensed under the [LLAMA 2 License](LICENSE).1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859---license: apache-2.0tags:- vision-language model- llama- video understandingpipeline_tag: video-text-to-textlibrary_name: transformers---# Flash-VStream Model CardThis repository contains the Flash-VStream model presented in the paper [Flash-VStream: Efficient Real-Time Understanding for Long Video Streams](https://huggingface.co/papers/2506.23825).<a href='https://zhang9302002.github.io/vstream-iccv-page/'><img src='https://img.shields.io/badge/Project-Page-Green'></a><a href='https://huggingface.co/papers/2506.23825'><img src='https://img.shields.io/badge/Paper-HuggingFace-red'></a><a href='https://github.com/IVGSZ/Flash-VStream'><img src='https://img.shields.io/badge/Code-GitHub-blue.svg?logo=github'></a>## Model detailsWe proposed Flash-VStream, a video-language model that simulates the memory mechanism of human. Our model is able to process extremely long video streams in real-time and respond to user queries simultaneously.## Training dataThis model is trained based on image data from LLaVA-1.5 dataset, and video data from WebVid and ActivityNet datasets following LLaMA-VID, including- 558K filtered image-text pairs from LAION/CC/SBU, captioned by BLIP.- 158K GPT-generated multimodal instruction-following data.- 450K academic-task-oriented VQA data mixture.- 40K ShareGPT data.- 232K video-caption pairs sampled from the WebVid 2.5M dataset.- 98K videos from ActivityNet with QA pairs from Video-ChatGPT.## Sample UsageYou can load and use Flash-VStream with the `transformers` library.```pythonimport torchfrom transformers import AutoModel, AutoTokenizer# The model can be loaded using multiple GPUs or offloaded to CPU if needed.# This example assumes GPU is available.model_path = 'IVGSZ/Flash-VStream-7b' # Replace with the actual model ID if differentmodel = AutoModel.from_pretrained(model_path,torch_dtype=torch.bfloat16, # Use bfloat16 for efficient memory usagelow_cpu_mem_usage=True,trust_remote_code=True).eval().cuda()tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True, use_fast=False)# For detailed instructions on image/video preprocessing and chat interactions,# please refer to the official GitHub repository:# https://github.com/IVGSZ/Flash-VStream```## LicenseThis project is licensed under the [Apache-2.0 License](https://github.com/IVGSZ/Flash-VStream/blob/main/LICENSE).
README.md+59-27