All FastVLM guides
Step by step
- 1
Install a Transformers version that includes FastVLM support.
- 2
Load a compatible model and AutoProcessor.
- 3
Build messages with separate image and text content items.
- 4
Use apply_chat_template before generate; a plain prompt string is not sufficient.
Example
Transformers
from transformers import AutoProcessor, FastVlmForConditionalGeneration
model_id = "KamilaMila/FastVLM-0.5B"
model = FastVlmForConditionalGeneration.from_pretrained(
model_id, device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)Verify against the primary source
APIs, model files and dependency versions can change. Treat this page as an implementation map, then confirm the current command and license in the linked official documentation.
Open official source