Instructions to use chai1me/qwen2vl-receipt-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use chai1me/qwen2vl-receipt-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2-VL-2B-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "chai1me/qwen2vl-receipt-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Qwen2-VL-2B Receipt Extraction (LoRA)
LoRA adapter fine-tuning Qwen2-VL-2B-Instruct to extract structured JSON (line items and total) from receipt images. Trained with QLoRA (4-bit) on a single Kaggle T4 GPU.
Results (60 held-out receipts, unseen during training)
| Metric | Score |
|---|---|
| Valid JSON output | 100% |
| Total exact-match | 90% |
| Mean char-similarity on near-misses | 0.957 |
Training
- Base:
Qwen/Qwen2-VL-2B-Instruct(loaded 4-bit viaunsloth/Qwen2-VL-2B-Instruct-bnb-4bit) - Method: LoRA on ~0.8% of parameters (language + attention + MLP layers), vision encoder frozen
- Config: 2 epochs, effective batch size 8, learning rate 2e-4
- Data: CORD-v2, 400 train / 60 validation
Usage
from unsloth import FastVisionModel
model, tokenizer = FastVisionModel.from_pretrained("chai1me/qwen2vl-receipt-lora", load_in_4bit=True)
FastVisionModel.for_inference(model)
Limitations
Trained on café/restaurant receipts (CORD). Other document types need retraining. Field extraction only; not a forgery- or tamper-detection system.
Full code and evaluation: GitHub
- Downloads last month
- 11
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support