Vision-native handwritten insurance form understanding, fine-tuned from unsloth/Qwen2-VL-7B-Instruct using QLoRA.
No OCR needed. This model reads handwriting, checks checkbox states, and extracts structured data directly from scanned MDF (Monthly Disability Verification) form images.
Model Summary
Property
Value
Base Model
unsloth/Qwen2-VL-7B-Instruct (7B)
Task
Visual Question Answering on MDF forms
Fine-tuning Method
QLoRA (r=16, alpha=32) via Unsloth
Quantization
4-bit NF4 (training) → 16-bit merged
Annotator
Vertex AI Gemini 2.5 Flash
Exact Match
0%
OOD Refusal Rate
0%
License
Apache 2.0
Quick Start
python
1from transformers import AutoModelForCausalLM, AutoProcessor
2from PIL import Image
3import torch
45model_id ="solvrays/scribegene-llm-v0.4"67processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)8model = AutoModelForCausalLM.from_pretrained(9 model_id,10 torch_dtype=torch.bfloat16,11 device_map="cuda",12 trust_remote_code=True,13)1415# Load your scanned MDF form image16image = Image.open("mdf_form.png").convert("RGB")1718# Ask a question about the form19question ="What is the name of the physician who signed this form?"2021messages =[{22"role":"user",23"content":[24{"type":"image"},25{"type":"text","text": question}26]27}]28text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)2930inputs = processor(text=[text], images=[image], return_tensors="pt").to("cuda")3132with torch.no_grad():33 out = model.generate(**inputs, max_new_tokens=200, temperature=0.1)3435answer = processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)36print(answer)
What is an MDF Form?
A Monthly Disability Verification Form (Form 441.O.MDF.O) is issued by TriPlus Services, acting as Third-Party Administrator of Penn Treaty Network America and American Network policies. It requires a licensed physician to certify a patient's ongoing disability status monthly.
Key Fields Extracted
Physician name, address, phone, fax
Submission date range (from / to)
Patient disability status (YES checked / NO checked)
OOD Refusal Rate measures how reliably the model declines to answer questions not answerable from the form (e.g. "What is the diagnosis?", "Has this claim been approved?").
⚠️ Limitations
Domain-specific: Trained exclusively on TriPlus Services MDF forms. Performance on other form types is not guaranteed.
Image quality: Works best on scans ≥ 300 DPI. Very low-resolution or heavily degraded scans may reduce accuracy.
Language: English only.
Redacted fields: Returns null for blacked-out fields (insured name/policy number).
Not for medical diagnosis: This model extracts administrative form data only.
License
This model is released under the Apache 2.0 License.
The base model (unsloth/Qwen2-VL-7B-Instruct) is also Apache 2.0.