Instructions to use singhabhishekkk/apprentice-qwen35-4b-lora-document-types with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use singhabhishekkk/apprentice-qwen35-4b-lora-document-types with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B") model = PeftModel.from_pretrained(base_model, "singhabhishekkk/apprentice-qwen35-4b-lora-document-types") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use singhabhishekkk/apprentice-qwen35-4b-lora-document-types with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for singhabhishekkk/apprentice-qwen35-4b-lora-document-types to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for singhabhishekkk/apprentice-qwen35-4b-lora-document-types to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for singhabhishekkk/apprentice-qwen35-4b-lora-document-types to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="singhabhishekkk/apprentice-qwen35-4b-lora-document-types", max_seq_length=2048, )
Apprentice Qwen3.5-4B LoRA (document type classification)
LoRA adapter fine-tuned on 140 golden examples from a corrected Tobacco3482 OCR-text dataset to classify one document type from: ADVE, Email, Form, Letter, Memo, News, Note, Report, Resume, Scientific.
The input prompt is the verbatim shipped document-type prompt from icereed/paperless-gpt, filled with English, the allowed type list, an empty title, and OCR text capped at about 4,000 characters.
Results (60 held-out rows, exact match)
| System | Score |
|---|---|
| gpt-5.4-mini, shipped paperless-gpt prompt | 78.33 |
| gpt-5.4-mini, GEPA-optimized | 81.67 |
| Qwen3.5-4B raw | 71.67 |
| Qwen3.5-4B fine-tuned (this adapter) | 80.00 |
The fine-tune beats the frontier model as paperless-gpt ships it (78.33) and lands 1.67 short of the GEPA-optimized teacher.
Training
LoRA r=16, alpha 16, 3 epochs, lr 2e-4, batch 2 x grad-accum 4, Unsloth 4-bit, Colab GPU. Train/eval split: seed 42, 140/60 from 200 sampled rows, identical split across every model this task is fine-tuned on.
Usage
Load with PEFT on top of Qwen/Qwen3.5-4B, or serve locally with an adapter-capable runtime. Caveat: evaluated on 60 rows for one field only. Re-validate on your paperless-ngx document types before production use.
- Downloads last month
- -