Skip to content

Conversation

@tianyuan211
Copy link

@tianyuan211 tianyuan211 commented Oct 23, 2025

Summary

This PR adds support for integrating DotsOCR into vLLM, enabling end-to-end document OCR and layout parsing through the multimodal inference pipeline.

Changes

  • Registered DotsOCR model under vllm/model_executor/models/dots_ocr.py.
  • Added proper compute_logits, forward, and multimodal embedding fusion for OCR-specific tasks.
  • Updated model registry and docs to include DotsOCR usage instructions.

Motivation

DotsOCR integration allows vLLM to run lightweight, high-accuracy OCR and document layout understanding tasks without requiring server-based inference.

Test

python3 examples/offline_inference/vision_language.py -m 'dots_ocr'

Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Signed-off-by: tianyuan211 <[email protected]>
Copy link

@czhu15 czhu15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls fix the conflict

changed = True
new_dict[k] = v
if changed:
# skip read-only attributes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this is the correct behavior, + @yangulei for comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What attributes of dots.ocr will cause issue here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What attributes of dots.ocr will cause issue here?

the error is AttributeError: can't set attribute 'dummy_inputs'

@tianyuan211
Copy link
Author

pls fix the conflict

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants