Commit ·
54f1ed0
1
Parent(s): f6587dc
Switch hunyuan-ocr.py to stable vLLM (>=0.15.1), drop nightly index
Browse filesHunyuanOCR architecture is in stable vLLM. Also pins datasets>=4.0.0
and removes disable_mm_preprocessor_cache (nightly-only arg).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- hunyuan-ocr.py +3 -10
hunyuan-ocr.py
CHANGED
|
@@ -1,20 +1,14 @@
|
|
| 1 |
# /// script
|
| 2 |
# requires-python = ">=3.11"
|
| 3 |
# dependencies = [
|
| 4 |
-
# "datasets",
|
| 5 |
# "huggingface-hub",
|
| 6 |
# "pillow",
|
| 7 |
-
# "vllm",
|
| 8 |
# "tqdm",
|
| 9 |
# "toolz",
|
| 10 |
# "torch",
|
| 11 |
# ]
|
| 12 |
-
#
|
| 13 |
-
# [[tool.uv.index]]
|
| 14 |
-
# url = "https://wheels.vllm.ai/nightly/cu129"
|
| 15 |
-
#
|
| 16 |
-
# [tool.uv]
|
| 17 |
-
# prerelease = "allow"
|
| 18 |
# ///
|
| 19 |
|
| 20 |
"""
|
|
@@ -426,14 +420,13 @@ def main(
|
|
| 426 |
logger.info("This may take a few minutes on first run...")
|
| 427 |
|
| 428 |
# Note: HunyuanOCR has batching issues with vLLM V1 engine when batch_size > 1
|
| 429 |
-
# Using
|
| 430 |
llm = LLM(
|
| 431 |
model=model,
|
| 432 |
trust_remote_code=True,
|
| 433 |
max_model_len=max_model_len,
|
| 434 |
gpu_memory_utilization=gpu_memory_utilization,
|
| 435 |
limit_mm_per_prompt={"image": 1},
|
| 436 |
-
disable_mm_preprocessor_cache=True,
|
| 437 |
enable_prefix_caching=False,
|
| 438 |
)
|
| 439 |
|
|
|
|
| 1 |
# /// script
|
| 2 |
# requires-python = ">=3.11"
|
| 3 |
# dependencies = [
|
| 4 |
+
# "datasets>=4.0.0",
|
| 5 |
# "huggingface-hub",
|
| 6 |
# "pillow",
|
| 7 |
+
# "vllm>=0.15.1",
|
| 8 |
# "tqdm",
|
| 9 |
# "toolz",
|
| 10 |
# "torch",
|
| 11 |
# ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# ///
|
| 13 |
|
| 14 |
"""
|
|
|
|
| 420 |
logger.info("This may take a few minutes on first run...")
|
| 421 |
|
| 422 |
# Note: HunyuanOCR has batching issues with vLLM V1 engine when batch_size > 1
|
| 423 |
+
# Using limit_mm_per_prompt for stability
|
| 424 |
llm = LLM(
|
| 425 |
model=model,
|
| 426 |
trust_remote_code=True,
|
| 427 |
max_model_len=max_model_len,
|
| 428 |
gpu_memory_utilization=gpu_memory_utilization,
|
| 429 |
limit_mm_per_prompt={"image": 1},
|
|
|
|
| 430 |
enable_prefix_caching=False,
|
| 431 |
)
|
| 432 |
|