HuggingFaceTB / SmolVLM2-500M-Video-Instruct

huggingface.co
Total runs: 1.3M
24-hour runs: 0
7-day runs: 8.3K
30-day runs: 12.8K
Model's Last Updated: April 08 2025
image-text-to-text

Introduction of SmolVLM2-500M-Video-Instruct

Model Details of SmolVLM2-500M-Video-Instruct

Image description

SmolVLM2-500M-Video

SmolVLM2-500M-Video is a lightweight multimodal model designed to analyze video content. The model processes videos, images, and text inputs to generate text outputs - whether answering questions about media files, comparing visual content, or transcribing text from images. Despite its compact size, requiring only 1.8GB of GPU RAM for video inference, it delivers robust performance on complex multimodal tasks. This efficiency makes it particularly well-suited for on-device applications where computational resources may be limited.

Model Summary
  • Developed by: Hugging Face 🤗
  • Model type: Multi-modal model (image/multi-image/video/text)
  • Language(s) (NLP): English
  • License: Apache 2.0
  • Architecture: Based on Idefics3 (see technical summary)
Resources
Uses

SmolVLM2 can be used for inference on multimodal (video / image / text) tasks where the input consists of text queries along with video or one or more images. Text and media files can be interleaved arbitrarily, enabling tasks like captioning, visual question answering, and storytelling based on visual content. The model does not support image or video generation.

To fine-tune SmolVLM2 on a specific task, you can follow the fine-tuning tutorial .

Evaluation

We evaluated the performance of the SmolVLM2 family on the following scientific benchmarks:

Size Video-MME MLVU MVBench
2.2B 52.1 55.2 46.27
500M 42.2 47.3 39.73
256M 33.7 40.6 32.7
How to get started

You can use transformers to load, infer and fine-tune SmolVLM. Make sure you have num2words, flash-attn and latest transformers installed. You can load the model as follows.

from transformers import AutoProcessor, AutoModelForImageTextToText

model_path = "HuggingFaceTB/SmolVLM2-500M-Video-Instruct"
processor = AutoProcessor.from_pretrained(model_path)
model = AutoModelForImageTextToText.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    _attn_implementation="flash_attention_2"
).to("cuda")
Simple Inference

You preprocess your inputs directly using chat templates and directly passing them

messages = [
    {
        "role": "user",
        "content": [
{"type": "text", "text": "What is in this image?"},
            {"type": "image", "path": "path_to_img.png"},
            
        ]
    },
]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

generated_ids = model.generate(**inputs, do_sample=False, max_new_tokens=64)
generated_texts = processor.batch_decode(
    generated_ids,
    skip_special_tokens=True,
)
print(generated_texts[0])
Video Inference

To use SmolVLM2 for video inference, make sure you have decord installed.

messages = [
    {
        "role": "user",
        "content": [
            {"type": "video", "path": "path_to_video.mp4"},
            {"type": "text", "text": "Describe this video in detail"}
        ]
    },
]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

generated_ids = model.generate(**inputs, do_sample=False, max_new_tokens=64)
generated_texts = processor.batch_decode(
    generated_ids,
    skip_special_tokens=True,
)

print(generated_texts[0])
Multi-image Interleaved Inference

You can interleave multiple media with text using chat templates.

import torch


messages = [
    {
        "role": "user",
        "content": [
{"type": "text", "text": "What is the similarity between this image <image>"},

            {"type": "image", "path": "image_1.png"},
{"type": "text", "text": "and this image <image>"},
{"type": "image", "path": "image_2.png"},            
        ]
    },
]
inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

generated_ids = model.generate(**inputs, do_sample=False, max_new_tokens=64)
generated_texts = processor.batch_decode(
    generated_ids,
    skip_special_tokens=True,
)
print(generated_texts[0])
Model optimizations
Misuse and Out-of-scope Use

SmolVLM is not intended for high-stakes scenarios or critical decision-making processes that affect an individual's well-being or livelihood. The model may produce content that appears factual but may not be accurate. Misuse includes, but is not limited to:

  • Prohibited Uses:
    • Evaluating or scoring individuals (e.g., in employment, education, credit)
    • Critical automated decision-making
    • Generating unreliable factual content
  • Malicious Activities:
    • Spam generation
    • Disinformation campaigns
    • Harassment or abuse
    • Unauthorized surveillance
License

SmolVLM2 is built upon SigLIP as image encoder and SmolLM2 for text decoder part.

We release the SmolVLM2 checkpoints under the Apache 2.0 license.

Training Data

SmolVLM2 used 3.3M samples for training originally from ten different datasets: LlaVa Onevision , M4-Instruct , Mammoth , LlaVa Video 178K , FineVideo , VideoStar , VRipt , Vista-400K , MovieChat and ShareGPT4Video . In the following plots we give a general overview of the samples across modalities and the source of those samples.

Image description
Details
Image description

Runs of HuggingFaceTB SmolVLM2-500M-Video-Instruct on huggingface.co

1.3M
Total runs
0
24-hour runs
3.9K
3-day runs
8.3K
7-day runs
12.8K
30-day runs

More Information About SmolVLM2-500M-Video-Instruct huggingface.co Model

More SmolVLM2-500M-Video-Instruct license Visit here:

https://choosealicense.com/licenses/apache-2.0

SmolVLM2-500M-Video-Instruct huggingface.co

SmolVLM2-500M-Video-Instruct huggingface.co is an AI model on huggingface.co that provides SmolVLM2-500M-Video-Instruct's model effect (), which can be used instantly with this HuggingFaceTB SmolVLM2-500M-Video-Instruct model. huggingface.co supports a free trial of the SmolVLM2-500M-Video-Instruct model, and also provides paid use of the SmolVLM2-500M-Video-Instruct. Support call SmolVLM2-500M-Video-Instruct model through api, including Node.js, Python, http.

SmolVLM2-500M-Video-Instruct huggingface.co Url

https://huggingface.co/HuggingFaceTB/SmolVLM2-500M-Video-Instruct

HuggingFaceTB SmolVLM2-500M-Video-Instruct online free

SmolVLM2-500M-Video-Instruct huggingface.co is an online trial and call api platform, which integrates SmolVLM2-500M-Video-Instruct's modeling effects, including api services, and provides a free online trial of SmolVLM2-500M-Video-Instruct, you can try SmolVLM2-500M-Video-Instruct online for free by clicking the link below.

HuggingFaceTB SmolVLM2-500M-Video-Instruct online free url in huggingface.co:

https://huggingface.co/HuggingFaceTB/SmolVLM2-500M-Video-Instruct

SmolVLM2-500M-Video-Instruct install

SmolVLM2-500M-Video-Instruct is an open source model from GitHub that offers a free installation service, and any user can find SmolVLM2-500M-Video-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of SmolVLM2-500M-Video-Instruct install, users can directly use SmolVLM2-500M-Video-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

SmolVLM2-500M-Video-Instruct install url in huggingface.co:

https://huggingface.co/HuggingFaceTB/SmolVLM2-500M-Video-Instruct

Url of SmolVLM2-500M-Video-Instruct

SmolVLM2-500M-Video-Instruct huggingface.co Url

Provider of SmolVLM2-500M-Video-Instruct huggingface.co

HuggingFaceTB
ORGANIZATIONS

Other API from HuggingFaceTB