Conversation
Signed-off-by: qdivan <qdivan@users.noreply.github.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
qdivan
marked this pull request as ready for review
August 11, 2026 10:42
Author
|
This is ready for maintainer review. The focused concurrency regression passes (5/5 across three consecutive runs), the CLA check is green, and the current head remains clean and mergeable. The patch narrowly serializes only the shared Transformers predictor path while preserving concurrency for other backends. Could a maintainer review it when available? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
MinerU shares one predictor per backend/model tuple, while
mineru-apiaccepts concurrent requests. For the Transformers backend, overlappingmodel.generate()calls can overwrite Qwen2-VL's request-specificrope_deltasstate. This causes the empty-delta shape failures reported in #4376 and #4906; reducing global API concurrency to one avoids the failure but also serializes unrelated document work.Modification
This serializes only calls into a shared local Transformers predictor. PDF rendering and post-processing remain concurrent.
Verification
On upstream
masterat79d6d8d79fb8f3ddba5cc34c07a16f0ec36f56c7:python3 tests/unittest/test_vlm_predictor_execution_guard.py— 5 passed (repeated three times during independent audit).python3 -m py_compile mineru/backend/vlm/vlm_analyze.py tests/unittest/test_vlm_predictor_execution_guard.pygit diff --checkNo GPU/model run is required for this integration-level locking change: the regression directly exercises the production sync and async guard implementations without model downloads.
BC-breaking
No. Public APIs and output formats are unchanged. Only concurrent execution through a shared local Transformers predictor is serialized.
Checklist