Instructions to use Remidesbois/LightonOCR-2-1b-poneglyph with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Remidesbois/LightonOCR-2-1b-poneglyph with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Remidesbois/LightonOCR-2-1b-poneglyph") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Remidesbois/LightonOCR-2-1b-poneglyph") model = AutoModelForImageTextToText.from_pretrained("Remidesbois/LightonOCR-2-1b-poneglyph") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Remidesbois/LightonOCR-2-1b-poneglyph with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Remidesbois/LightonOCR-2-1b-poneglyph" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remidesbois/LightonOCR-2-1b-poneglyph", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Remidesbois/LightonOCR-2-1b-poneglyph
- SGLang
How to use Remidesbois/LightonOCR-2-1b-poneglyph with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Remidesbois/LightonOCR-2-1b-poneglyph" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remidesbois/LightonOCR-2-1b-poneglyph", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Remidesbois/LightonOCR-2-1b-poneglyph" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remidesbois/LightonOCR-2-1b-poneglyph", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Remidesbois/LightonOCR-2-1b-poneglyph with Docker Model Runner:
docker model run hf.co/Remidesbois/LightonOCR-2-1b-poneglyph
LightOnOCR-2-1B-Poneglyph
LightOnOCR-2-1B-Poneglyph is a specialized end-to-end vision-language model fine-tuned for high-precision OCR, specifically targeting the font used in French editions of the One Piece manga.
Performance & Precision
By leveraging a focused dataset (consisting of bubble crops with a specific font corpus), the model achieves a 0% CER (Character Error Rate) and 0% WER (Word Error Rate) on evaluation data.
The training set comprises nearly 5,000 high-quality crops of dialogue bubbles, specifically curated to minimize background noise and prioritize clear text extraction.
Project Context
This model was developed for Projet Poneglyph. While the training data is highly specific, this narrow focus is intentional: it allows the model to achieve near-perfect accuracy for this unique use case.
Note on Generalization: This model has not been benchmarked on general datasets. Given its hyper-specialization, it may have reduced performance on standard document formatting. It is strictly intended for OCR tasks involving manga text bubbles.
Acknowledgments
Special thanks to the LightOnAI team for releasing the LightOnOCR-2 family. This provides a robust foundation for specialized fine-tuning, particularly due to its native proficiency with the French language.
@misc{lightonocr2_2026,
title = {LightOnOCR: A 1B End-to-End Multilingual Vision-Language Model for State-of-the-Art OCR},
author = {Said Taghadouini and Adrien Cavaill\`{e}s and Baptiste Aubertin},
year = {2026},
howpublished = {\url{[https://arxiv.org/abs/2601.14251](https://arxiv.org/abs/2601.14251)}}
}
- Downloads last month
- 47
Model tree for Remidesbois/LightonOCR-2-1b-poneglyph
Base model
lightonai/LightOnOCR-2-1B-base