Run this model with HF Jobs

Run lightonai/LightOnOCR-2-1B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/lightonai/LightOnOCR-2-1B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/lightonai/LightOnOCR-2-1B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/lightonai/LightOnOCR-2-1B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/lightonai/LightOnOCR-2-1B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

hallucinations on empty pages

#4
by elenapop - opened

when passing empty pages (which can happen in documents) to the model, it outputs wild things: lists, latex formulas etc

image

it does not happen only with empty pages, but more complex: photos of documents on a pdf page

hello,
could you share your setup(gpu, inference library, sampling params etc) and an example?
we had included empty pages during training exactly for this reason.

NVIDIA GeForce RTX 5090
CUDA Version: 12.8
vllm 0.11.2
vllm serve lightonai/LightOnOCR-2-1B --limit-mm-per-prompt '{"image": 1}' --mm-processor-cache-gb 0 --no-enable-prefix-caching

here is an example of pdf that i split in images and then pass it to the ocr: https://limewire.com/d/qPKsp#qHbLPG7fev (it should be available for one week)

thanks for the details!
you can try lightonai/LightOnOCR-2-1B-bbox or lightonai/LightOnOCR-2-1B-base, they don't seem to have this issue!

yes the base one seems better, there is no hallucination in this case, only a explanatory text:

image

are you running with same inference parameters as config?
in the demo, i get no output at all for the white page you shared.

yes, the same inference parameters, only the model's name changes; some of the blanc pages get no output and some the text from above

Sign up or log in to comment