davanstrien HF Staff Claude commited on
Commit
94823db
·
1 Parent(s): 0e62664

Update LightOnOCR script to use vLLM nightly wheels

Browse files

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>

Files changed (1) hide show
  1. lighton-ocr.py +10 -2
lighton-ocr.py CHANGED
@@ -4,12 +4,17 @@
4
  # "datasets",
5
  # "huggingface-hub[hf_transfer]",
6
  # "pillow",
7
- # "vllm>=0.9.1",
8
  # "tqdm",
9
  # "toolz",
10
  # "torch",
11
  # ]
12
  #
 
 
 
 
 
13
  # ///
14
 
15
  """
@@ -18,6 +23,9 @@ Convert document images to markdown using LightOnOCR with vLLM.
18
  LightOnOCR is a compact 1B multilingual OCR model optimized for production speed.
19
  Combines Pixtral ViT encoder with Qwen3 language model for efficient document parsing.
20
 
 
 
 
21
  Features:
22
  - ⚡ Fastest: 5.71 pages/sec on H100 GPU
23
  - 🎯 Compact: Only 1B parameters
@@ -28,7 +36,7 @@ Features:
28
  - 🔤 3 vocabulary sizes (151k/32k/16k tokens)
29
 
30
  Model: lightonai/LightOnOCR-1B-1025
31
- vLLM: Officially supported in model registry
32
  Performance: 76.1% overall benchmark score
33
  """
34
 
 
4
  # "datasets",
5
  # "huggingface-hub[hf_transfer]",
6
  # "pillow",
7
+ # "vllm",
8
  # "tqdm",
9
  # "toolz",
10
  # "torch",
11
  # ]
12
  #
13
+ # [[tool.uv.index]]
14
+ # url = "https://wheels.vllm.ai/nightly"
15
+ #
16
+ # [tool.uv]
17
+ # prerelease = "allow"
18
  # ///
19
 
20
  """
 
23
  LightOnOCR is a compact 1B multilingual OCR model optimized for production speed.
24
  Combines Pixtral ViT encoder with Qwen3 language model for efficient document parsing.
25
 
26
+ NOTE: Requires vLLM nightly wheels for LightOnOCR support. First run may take
27
+ a few minutes to download and install dependencies.
28
+
29
  Features:
30
  - ⚡ Fastest: 5.71 pages/sec on H100 GPU
31
  - 🎯 Compact: Only 1B parameters
 
36
  - 🔤 3 vocabulary sizes (151k/32k/16k tokens)
37
 
38
  Model: lightonai/LightOnOCR-1B-1025
39
+ vLLM: Requires nightly build from main branch
40
  Performance: 76.1% overall benchmark score
41
  """
42