Prototype: votes, saves, and profiles aren't stored on this hosted preview yet. No real accounts, and no emails or texts. Privacy

Recipes / Document & invoice OCR

Fine-tune PaddleOCR-VL to read your documents (Unsloth)

A 1B-parameter document-reading model fine-tuned on image-and-text pairs. The notebook's example is LaTeX formulas.

  • No license flags found

Source: Unsloth notebooks ↗ · by Unsloth · last updated Oct 7, 2026

What a local business could build with it

Pull totals, dates and line items off invoices, receipts and intake forms. Replace the formula example with scans of your own paperwork and correct transcripts.

How to run it

Commands are copied from the source, unchanged except where a notebook cell is cut at 40 lines (marked in the code). Placeholders like <you> are the source's own. Credit goes to the authors named on each block.

Install (as written in the notebook)

%%capture import os, re if "COLAB_" not in "".join(os.environ.keys()): !pip install unsloth # Do this in local & cloud setups else: !pip install sentencepiece protobuf "datasets==4.3.0" "huggingface_hub>=0.34.0" hf_transfer !pip install --no-deps unsloth_zoo bitsandbytes accelerate peft trl triton unsloth !unsloth install-kernels !pip install --no-deps --upgrade "torchao>=0.16.0" !pip install transformers==4.57.6 !pip install --no-deps trl==0.22.2

From Unsloth notebook, Paddle_OCR_(1B)_Vision ↗

Load the base model

from unsloth import FastVisionModel # FastLanguageModel for LLMs import torch from transformers import AutoModelForCausalLM ,AutoProcessor # 4bit pre quantized models we support for 4x faster downloading + no OOMs. fourbit_models = [ "unsloth/Qwen3-VL-8B-Instruct-bnb-4bit", # Qwen 3 vision support "unsloth/Qwen3-VL-8B-Thinking-bnb-4bit", "unsloth/Qwen3-VL-32B-Instruct-bnb-4bit", "unsloth/Qwen3-VL-32B-Thinking-bnb-4bit", ] # More models at https://huggingface.co/unsloth model_path = "unsloth/PaddleOCR-VL" model, tokenizer = FastVisionModel.from_pretrained( model_path, max_seq_length = 2048, # Choose any for long context! load_in_4bit = False, # 4bit uses much less memory load_in_8bit = False, # A bit more accurate, uses 2x memory full_finetuning = True, # We support full finetuning now! auto_model = AutoModelForCausalLM, trust_remote_code = True, unsloth_force_compile = True, )

From Unsloth notebook, Paddle_OCR_(1B)_Vision ↗

Set up training

from trl import SFTTrainer, SFTConfig from unsloth.trainer import UnslothVisionDataCollator FastVisionModel.for_training(model) # Enable for training! custom_collator = UnslothVisionDataCollator( model = model, processor = processor, ignore_index = -100, max_seq_length = 2048, train_on_responses_only = True, instruction_part = "User:", response_part = "\nAssistant:", pad_to_multiple_of = 8, ) trainer = SFTTrainer( model = model, tokenizer = processor.tokenizer, data_collator = custom_collator, train_dataset = converted_dataset, args = SFTConfig( per_device_train_batch_size = 4, gradient_accumulation_steps = 2, # Use GA to mimic batch size! warmup_steps = 5, max_steps = 60, # num_train_epochs = 1, # Set this instead of max_steps for full training runs learning_rate = 5e-5, logging_steps = 1, optim = "adamw_8bit", weight_decay = 0.001, lr_scheduler_type = "linear", seed = 3407, output_dir = "outputs", report_to = "none", # You MUST put the below items for vision finetuning: remove_unused_columns = False, dataset_text_field = "", dataset_kwargs = {"skip_prepare_dataset": True}, # … (cell continues in the source notebook)

From Unsloth notebook, Paddle_OCR_(1B)_Vision ↗

Train

trainer_stats = trainer.train()

From Unsloth notebook, Paddle_OCR_(1B)_Vision ↗

Licenses

No flags: every license we found for this recipe is permissive (Apache-2.0, MIT, BSD, CC BY or similar). Still read each one.

PartLicense, as the source or Hub states it
CodeLGPL-3.0 (Unsloth notebooks)
Base modelApache-2.0
DatasetApache-2.0

Checked against the Hugging Face API and each repo on December 4, 2026. A grouping like “$10M revenue cap” is our shorthand, not legal advice.