- Replace config_name=config with conditional spread to avoid passing
None, which generates invalid YAML (config_name: null) that fails
Hub validation. Applied to all 10 scripts with --config flag.
- Switch vLLM nightly URL from /nightly to /nightly/cu129 in 6 scripts
to get x86_64 wheels (bare /nightly only has ARM wheels currently).
- Includes accumulated improvements: --verbose flag, --config/--create-pr
support, upload retry with XET fallback, inference_info fixes.
- Adds dots-ocr-1.5.py and hunyuan-ocr.py (new scripts).
Verified via HF Jobs smoke tests (7/9 config-flag scripts completed).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match official demo message format: text before image
Update message format to match LightOn's official demo implementation:
- Add empty text element before image in content array
- Order: text first, then image (matching their Gradio demo)
This ensures we're using the exact same message structure as their
production demo, which should improve reliability and quality.
Reference: Official demo at https://huggingface.co/spaces/lightonai/LightOnOCR
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Based on feedback from LightOn authors (@staghado), update default
image resolution from 1288px to 1540px to match training settings.
Changes:
- Default target_size: 1288px → 1540px
- Updated docstrings: trained at 200 DPI (not 300 DPI)
- Updated help text to note this matches training
The model was trained with max resolution of 1540px and 200 DPI,
so using these settings should provide optimal quality.
Reference: https://x.com/staghado/status/1849518069623726119
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Add explicit triton-kernels dependency from git to resolve vLLM
nightly build dependency resolution issue.
Error was: "Package `triton-kernels` was included as a URL dependency.
URL dependencies must be expressed as direct requirements"
Solution: Add triton-kernels as direct git dependency pointing to
v3.5.0 subdirectory as required by vLLM nightly.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Update LightOnOCR script to use vLLM nightly wheels
LightOnOCR support requires vLLM nightly build from main branch.
Added configuration to use nightly wheels, similar to DeepSeek-OCR script.
Changes:
- Use vLLM nightly wheels from https://wheels.vllm.ai/nightly
- Add prerelease = "allow" for UV
- Update docstring to note nightly requirement
- Remove version constraint from vLLM dependency
This matches the pattern used in deepseek-ocr-vllm.py which also
requires cutting-edge vLLM features.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Adds lighton-ocr.py - a UV script for processing documents with
LightOnOCR, a compact 1B OCR model optimized for production speed.
Features:
- Fast: 5.71 pages/sec on H100 GPU
- Compact: Only 1B parameters
- 3 vocabulary variants (151k/32k/16k tokens)
- European language optimization (12% faster with 32k/16k)
- LaTeX formula and table extraction
- Markdown output format
- Image preprocessing (1288px target size)
Based on dots-ocr.py template with adaptations:
- LightOnOCR-specific sampling params (temp=0.2, top_p=0.9)
- Automatic image resizing to optimal dimensions
- Vocabulary size selection
- Simplified prompt handling (no special modes)
Model: lightonai/LightOnOCR-1B-1025
vLLM: Officially supported in model registry
Blog: https://huggingface.co/blog/lightonai/lightonocr
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>