Prototype: votes, saves, and profiles aren't stored on this hosted preview yet. No real accounts, and no emails or texts. Privacy

Recipes / Document & invoice OCR

Fine-tune the small SmolVLM on one consumer GPU (HF Cookbook)

SmolVLM-Instruct fine-tuned with TRL on ChartQA, aimed at a single consumer GPU.

  • GPL-3.0 data

Source: HF Cookbook ↗ · by Sergio Paniego · last updated Jan 9, 2026

What a local business could build with it

A small image-reading model you can run in-house on modest hardware, for documents that shouldn't leave your network.

How to run it

Commands are copied from the source, unchanged except where a notebook cell is cut at 40 lines (marked in the code). Placeholders like <you> are the source's own. Credit goes to the authors named on each block.

Install (as written in the notebook)

!pip install -U -q git+https://github.com/huggingface/trl.git bitsandbytes peft qwen-vl-utils trackio # Tested with trl==0.22.0.dev0, bitsandbytes==0.47.0, peft==0.17.1, qwen-vl-utils==0.0.11, trackio==0.2.8

From HF Cookbook, fine_tuning_smol_vlm_sft_trl ↗

Set up training

from trl import SFTTrainer trainer = SFTTrainer( model=model, args=training_args, train_dataset=train_dataset, eval_dataset=eval_dataset, peft_config=peft_config, processing_class=processor, )

From HF Cookbook, fine_tuning_smol_vlm_sft_trl ↗

Licenses

License flags to read before commercial use:

  • Dataset: GPL-3.0 copyleft: check what it means for your product. GPL-3.0 (copyleft)
PartLicense, as the source or Hub states it
CodeApache-2.0 (huggingface/cookbook)
Base modelApache-2.0
DatasetGPL-3.0 (copyleft)

Checked against the Hugging Face API and each repo on December 4, 2026. A grouping like “$10M revenue cap” is our shorthand, not legal advice.