Fine-Tuning a Small Vision-Language Model with LoRA to Extract Fields from Multi-Page Documents

Kirill Hidellstone9 Jun 2026

Problem

A team needed to pull 15 key fields out of 6,000 multi-page PDF documents. These are standard legal documents whose layout depends on who produced them. The fields can sit on one page or be spread over up to 80 pages. The base Qwen3-VL-2B-Instruct, prompted zero-shot, got 0.543 accuracy. The untuned 8B model got 0.833 but needed 9.19 s per document. All work had to fit on one NVIDIA A100 with about 79 GB of memory.

Example from the article: the fields have obfuscated names, such as Frodo_Beggins_pasport (passport series and number) and Aragorn_data_rozhdeniya (birth date). The model returns all 15 per document.

Solution in brief

The author fine-tuned Qwen3-VL-2B with LoRA in Unsloth. Each training example holds a prompt, the page images of one document and the 15 answers. The tuned 2B model reached 0.886 accuracy against 0.543 untuned and 0.833 for the untuned 8B model, at 3.50 s per document instead of 9.19 s.

Questions this case answers
  • How to turn long multi-page documents into structured fields with a small multimodal model when zero-shot prompting reaches only about half the accuracy needed
  • How to fine-tune a multimodal model on a single GPU with limited memory without losing generalization
  • How to extract a fixed set of fields from thousands of multi-page scanned documents with a vision-language model?
  • How to make a 2B vision-language model beat an untuned 8B one on document field extraction?

Tools and methods

  • LoRA fine-tuning (rsLoRA) — trains about 1.6% of the model weights on vision, language, attention and MLP layers
  • Qwen3-VL-2B-Instruct — small vision-language model that is tuned and served
  • Unsloth — vision data collator, memory-saving gradient checkpointing and the training loop
  • TRL SFTTrainer — runs supervised fine-tuning
  • vLLM — serves the merged model for inference and evaluation
Continue reading — it's free

Google or a one-time email code. No password.