davanstrien HF Staff commited on
Commit
f9b3f80
·
verified ·
1 Parent(s): 4388151

Upload lighton-ocr2.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. lighton-ocr2.py +5 -15
lighton-ocr2.py CHANGED
@@ -6,18 +6,12 @@
6
  # "huggingface-hub",
7
  # "hf-xet",
8
  # "pillow",
9
- # "vllm",
 
10
  # "tqdm",
11
  # "toolz",
12
  # "torch",
13
- # "triton-kernels @ git+https://github.com/triton-lang/triton.git@v3.5.0#subdirectory=python/triton_kernels",
14
  # ]
15
- #
16
- # [[tool.uv.index]]
17
- # url = "https://wheels.vllm.ai/nightly"
18
- #
19
- # [tool.uv]
20
- # prerelease = "allow"
21
  # ///
22
 
23
  """
@@ -27,12 +21,8 @@ LightOnOCR-2 is a compact 1B multilingual OCR model optimized for production spe
27
  Combines Pixtral ViT encoder with Qwen3 language model for efficient document parsing.
28
  Uses Reinforcement Learning with Verifiable Rewards (RLVR) for improved quality.
29
 
30
- NOTE: Requires vLLM nightly wheels for LightOnOCR-2 support. First run may take
31
- a few minutes to download and install dependencies.
32
-
33
- KNOWN ISSUE (2026-01-29): vLLM nightly may have a regression causing
34
- "Can't load image processor" errors. If this occurs, try again later
35
- or check vLLM issues for updates.
36
 
37
  Features:
38
  - ⚡ Fastest: 42.8 pages/sec on H100 GPU (7× faster than v1)
@@ -46,7 +36,7 @@ Features:
46
  - 💪 Production-ready: Outperforms models 9× larger
47
 
48
  Model: lightonai/LightOnOCR-2-1B
49
- vLLM: Requires nightly build from main branch
50
  Performance: 83.2 ± 0.9% on OlmOCR-Bench
51
  """
52
 
 
6
  # "huggingface-hub",
7
  # "hf-xet",
8
  # "pillow",
9
+ # "vllm>=0.15.0",
10
+ # "transformers @ git+https://github.com/huggingface/transformers",
11
  # "tqdm",
12
  # "toolz",
13
  # "torch",
 
14
  # ]
 
 
 
 
 
 
15
  # ///
16
 
17
  """
 
21
  Combines Pixtral ViT encoder with Qwen3 language model for efficient document parsing.
22
  Uses Reinforcement Learning with Verifiable Rewards (RLVR) for improved quality.
23
 
24
+ NOTE: Requires transformers installed from source (included in dependencies).
25
+ First run may take a few minutes to download and install dependencies.
 
 
 
 
26
 
27
  Features:
28
  - ⚡ Fastest: 42.8 pages/sec on H100 GPU (7× faster than v1)
 
36
  - 💪 Production-ready: Outperforms models 9× larger
37
 
38
  Model: lightonai/LightOnOCR-2-1B
39
+ vLLM: Requires vLLM >= 0.15.0 + transformers from source
40
  Performance: 83.2 ± 0.9% on OlmOCR-Bench
41
  """
42