v0.4.0

TimmyOVO/deepseek-ocr.rsv0.4.0Nov 9, 2025by github-actions[bot]

AI Summary

Feature release adding PaddleOCR-VL backend alongside DeepSeek-OCR, with model-aware prompts, lazy loading, and comprehensive sampling controls.

Key Highlights

  • PaddleOCR-VL backend (SigLIP + Ernie 0.9B with FlashAttention) now available
  • Lazy loading defers weight mmap until first request for faster startup
  • Model-aware prompts with bilingual Markdown feedback
  • Server/CLI sampling controls added (temperature, top-p, top-k, repetition-penalty, etc.)
  • Common utilities moved into deepseek-ocr-core to reduce duplication

New Features

  • PaddleOCR-VL backend integration
  • Lazy loading for weights
  • Model-aware prompt generation
  • Sampling controls: --do-sample, --temperature, --top-p, --top-k, --repetition-penalty, --no-repeat-ngram-size
  • Model switching between DeepSeek-OCR and PaddleOCR-VL
  • Bilingual Markdown feedback for prompt issues
  • Fix for ModelScope provider repo ID handling
  • Warning responses for requests without images instead of transport errors

Full Release Notes

## New Features

  - `PaddleOCR‑VL` backend (SigLIP + Ernie 0.9B with FlashAttention) is now selectable alongside `DeepSeek‑OCR`. Documentation covers model switching and architecture/memory differences.
  - Model-aware prompts with bilingual Markdown feedback when requests omit <image> placeholders.
  - Lazy loading: the server defers weight mmap until the first request, reducing startup time.
  - Server/CLI sampling controls: `--do-sample`, `--temperature`, `--top-p`, `--top-k`, `--repetition-penalty`, and `--no-repeat-ngram-size` are now recognized across both entry points.

  ## Improvements

  - Common utilities (token sampling, embedding gathers, transformer KV cache) moved into deepseek-ocr-core, trimming duplication between DeepSeek and Paddle crates.
  - Documentation clarifies multi-model selection, DeepSeek-only dynamic crop mode, bilingual terminology, and per-flag behavior.
  - CLI/Server prompt builders choose the correct format per model, improving output quality without manual tweaks.

  ## Bug Fixes

  - ModelScope provider now respects arbitrary repo IDs and exact file paths, fixing Paddle asset downloads that previously fetched the wrong config.json.
  - Requests without images no longer throw transport errors; both sync and streaming responses return a structured bilingual warning instead.
  - Prompt/image mismatches surface as normal assistant replies instead of opaque “prompt formatting failed” errors, keeping clients compatible with standard OpenAI flows.