We now support VLMs in smolagents!
smolagents now supports vision language models, letting agents take images either once at start via `agent.run(..., images=[...])` (stored on the TaskStep) or dynamically per step through step callbacks that attach screenshots to `ActionStep.observations_images`. The mechanism builds on the ReAct-style MultiStepAgent loop, where callbacks run after each action. A full walkthrough builds a vision web-browsing CodeAgent with helium/selenium, custom tools for going back, closing pop-ups and Ctrl+F search, and a screenshot callback that prunes older images to keep context lean. Using TransformersModel with a VLM requires `flatten_messages_as_text=False`, and hard browsing tasks succeed more reliably with strong VLMs like Qwen2-VL-72B or GPT-4o.
Related posts
- ScreenSuite - The most comprehensive evaluation suite for GUI Agents!
Hugging Face easyNoviceScreenSuite unifies 13 benchmarks for evaluating vision language models as GUI agents across perception, grounding, single-step actions and multi-step agentic tasks on mobile, desktop and web. The evaluation is deliberately vision-only, with no accessibility trees or DOM, so scores on benchmarks like Mind2Web are lower than published figures but closer to how humans use interfaces. Multi-step tasks run through smolagents in E2B remote sandboxes or new Dockerized Ubuntu and Android VMs. Models evaluated include the Qwen2.5-VL series, UI-TARS-1.5-7B, Holo1-7B and GPT-4o, and a custom run takes a few commands from the repo.
- Smol2Operator: Post-Training GUI Agents for Computer Use
Hugging Face hardMasterA two-phase supervised fine-tuning recipe turns SmolVLM2-2.2B-Instruct, which starts with no GUI grounding (about 0% on ScreenSpot-v2), into an agentic GUI model that emits code-form actions. The AGUVIS datasets are first normalized into a single unified action space, using a function parser and converter that standardize function names and parameters and express coordinates on a 0-1 scale. Phase 1 trains grounding: ablations favored 1152px images and normalized coordinates over pixel coordinates (33.7% vs 4.3% at 400k samples), and two epochs reached 41% on ScreenSpot-v2. Phase 2 adds reasoning and multi-step planning using think/code formatted data, and all datasets, tools and training recipes are released as open source.
- SmolVLA: Efficient Vision-Language-Action Model trained on Lerobot Community Data
Hugging Face hardMasterSmolVLA is a 450M-parameter open-source vision-language-action model for robotics, pretrained on about 10M frames from 487 curated LeRobot community datasets and able to run on consumer hardware. It pairs a SmolVLM2 backbone with a ~100M flow-matching action expert. Efficiency comes from limiting each frame to 64 visual tokens via PixelShuffle, using features from only the first half of the VLM's layers, and interleaving cross- and self-attention in the action expert. An asynchronous inference stack overlaps action execution with remote chunk prediction, giving about 30% faster response and 2× task throughput, and the model outperforms larger VLAs and ACT on LIBERO, Meta-World and real SO100/SO101 tasks.
- Vision Language Models (Better, faster, stronger)
Hugging Face easyNoviceVision language models shifted over the past year toward smaller yet stronger models, any-to-any architectures, multimodal reasoning, Mixture-of-Experts decoders and vision-language-action models for robotics. Specialized capabilities matured: detection, segmentation and counting via localization tokens (PaliGemma, Molmo, Qwen2.5-VL), multimodal safety filters (ShieldGemma 2, Llama Guard 4), and multimodal RAG that skips brittle PDF parsing using DSE or ColBERT-style retrievers such as ColPali. Small models like SmolVLM and gemma-3-4b-it can run locally through MLX and llama.cpp with one-line commands, and MoE decoders trade higher memory for faster inference.
- SmolVLM - small yet mighty Vision Language Model
Hugging Face hardMasterSmolVLM is a 2B-parameter open vision language model built on the Idefics3 architecture with a SmolLM2 1.7B backbone. It uses 9x pixel-shuffle compression so each 384x384 patch becomes just 81 tokens. A test prompt plus image encodes to 1.2k tokens versus 16k for Qwen2-VL, giving 5 GB minimum GPU RAM, 3.3-4.5x faster prefill and 7.5-16x faster generation, at modestly lower benchmark scores. Training details cover extending context to 16k by raising the RoPE base to 273k, choosing checkpoints with a weighted benchmark metric, and fine-tuning with QLoRA on a ~16 GB L4 or DPO via TRL.