Fine-tune VLMs for multipage document-to-JSON with SageMaker AI and SWIFT
AWS•How-to••by Nick McCarthy, Arlind Nocaj, Irene Marban and Malte Reimann•AWS Artificial Intelligence Blog
In this post, we demonstrate that fine-tuning VLMs provides a powerful and flexible approach to automate and significantly enhance document understanding capabilities. We also demonstrate that using focused fine-tuning allows smaller, multi-modal models to compete effectively with much larger counterparts (98% accuracy with Qwen2.5 VL 3B).
Shows how to fine-tune Qwen2.5 VL 3B and Llama 3.2 11B Vision with LoRA/DoRA via the SWIFT framework on SageMaker AI to turn invoice page images into structured JSON.
Who it is for
Teams building invoice or form extraction on AWS who want to fine-tune small VLMs on their own historic documents.
Key points
AWS reports 98% accuracy for fine-tuned Qwen2.5 VL 3B on the Fatura2 invoice dataset in its evaluation.
AWS estimates about $1 to fine-tune a 3B model on around 200 documents using Spot instances and PEFT.
Deployment options shown: vLLM container on a SageMaker endpoint with a LoRA adapter, inference components, or Bedrock Custom Model Import.
AI:Both teach fine-tuning a vision-capable model on a cloud platform, but C17 uses a vendor's hosted vision fine-tuning API rather than open-weight LoRA on SageMaker.
Related posts
AWS•Customer story••by Babs Khalidson, Seppo Kalliomaki, Kimmo Isosomppi, Luisa Bertoli, Nicolas Metallo, Vushesh Babu Adhikari, Krišjānis Kočāns, Kaspars Magaznieks and Sergei Kiriasov•AWS Artificial Intelligence Blog
AI:Sun Finance built a serverless pipeline combining Textract OCR, Rekognition fallback and Claude structuring that raised ID extraction accuracy to 90.8% and cut per-document cost 91%.
AI:Inscribe built an agentic system on Bedrock that routes document checks across several models and says it flags tampered or AI-generated financial documents in under 90 seconds.
AI:Parcel Perform fine-tuned Nova Micro and Nova Lite with LoRA on SageMaker AI for email data extraction; AWS reports up to 94.77% accuracy and about 50% lower cost.