davanstrien HF Staff Claude Opus 4.6 commited on
Commit
952354b
·
1 Parent(s): 0bc9b0a

Fix deepseek-ocr-vllm.py: use official vLLM offline pattern (P0)

Browse files

Rewrote inference core to match the official vLLM DeepSeek-OCR recipe:
- llm.generate() with PIL images instead of llm.chat() with base64
- Added NGramPerReqLogitsProcessor to prevent repetition loops
- Added enable_prefix_caching=False, mm_processor_cache_gb=0
- Added skip_special_tokens=False and ngram/window sampling params
- Removed resolution modes (only apply to transformers API, not vLLM)
- Removed deprecated HF_XET_HIGH_PERFORMANCE env var
- Bumped script_version to 2.0.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

1 file changed +59 -193
deepseek-ocr-vllm.py+59-193