How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="singhabhishekkk/apprentice-gemma4-e4b-lora-document-types",
	filename="apprentice-gemma4-e4b-doc-types.Q4_K_M.gguf",
)
llm.create_chat_completion(
	messages = "No input example has been defined for this model task."
)

Apprentice Gemma 4 E4B 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)

Fill in from this task's README after publishing this run's printed numbers.

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 google/gemma-4-E4B-it, 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
49
GGUF
Model size
8B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for singhabhishekkk/apprentice-gemma4-e4b-lora-document-types

Adapter
(269)
this model

Dataset used to train singhabhishekkk/apprentice-gemma4-e4b-lora-document-types