Image-Text-to-Text
PEFT
Safetensors
document-classification
vision-language
lora
unsloth
conversational
Instructions to use asim-salim/gemma-4-e4b-doc-classifier-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use asim-salim/gemma-4-e4b-doc-classifier-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it") model = PeftModel.from_pretrained(base_model, "asim-salim/gemma-4-e4b-doc-classifier-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Gemma 4 E4B — Document Classifier (LoRA)
LoRA adapter finetuned from google/gemma-4-E4B-it for single-page document
classification and identity-field extraction from scanned/faxed financial documents.
Classes
bank_statement, drivers_license, monthly_bill, paystub, state_id, unknown
Output format
{"schema_object_wrapper": [{"cls": "", "confidence": 0.0, "issuer": "", "holder": "", "page_marker": ""}]}
Usage
from unsloth import FastVisionModel
model, processor = FastVisionModel.from_pretrained("asim-salim/gemma-4-e4b-doc-classifier-lora")
FastVisionModel.for_inference(model)
Adapter: 147 MB LoRA over google/gemma-4-E4B-it. Trained with unsloth + TRL (PEFT 0.19.1).
License
Governed by the Gemma Terms of Use and the Gemma Prohibited Use Policy.
Limitations
Trained on a specific document corpus; not evaluated for general-purpose document understanding. Outputs must not be treated as authoritative for financial decisions.
- Downloads last month
- 3