Add baidu/Unlimited-OCR vision tower support (feature-extraction)#1018
Draft
ssss141414 wants to merge 2 commits into
Draft
Add baidu/Unlimited-OCR vision tower support (feature-extraction)#1018ssss141414 wants to merge 2 commits into
ssss141414 wants to merge 2 commits into
Conversation
Register an OnnxConfig + wrapper that exports the Unlimited-OCR vision tower (SAM ViT-B + CLIP-L-14 + MLP projector) under the feature-extraction task, so winml config/build natively produce the vision-embedding ONNX artifact. - unlimited_ocr.py: UnlimitedOCRVisionTowerWrapper (AutoModel + get_model, composes sam_model/vision_model/projector) and UnlimitedOCRVisionIOConfig registered via @register_onnx_overwrite for (unlimited-ocr, feature-extraction) with static [1,3,1024,1024] dummy inputs and image_embeds output. - hf/__init__.py: wire the model-class mapping and trigger registration. - tests: network-free unit tests validating registry wiring and IO contract.
| from transformers import PretrainedConfig | ||
|
|
||
| # Import triggers ONNX config registration | ||
| import winml.modelkit.models # noqa: F401 |
…e deps The baidu/Unlimited-OCR trust_remote_code modeling code imports addict, einops, easydict and matplotlib. Expose them as an optional extra so 'winml build baidu/Unlimited-OCR' is reproducible from a clean checkout via 'pip install winml-modelkit[unlimited-ocr]', mirroring the existing audio/openvino/qnn extras.
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.
Register an OnnxConfig + wrapper that exports the Unlimited-OCR vision tower (SAM ViT-B + CLIP-L-14 + MLP projector) under the
feature-extractiontask, sowinml config/buildnatively produce the vision-embedding ONNX artifact.What
unlimited_ocr.py:UnlimitedOCRVisionTowerWrapper(AutoModel +get_model(), composessam_model/vision_model/projector) andUnlimitedOCRVisionIOConfigregistered via@register_onnx_overwritefor(unlimited-ocr, feature-extraction)with static[1,3,1024,1024]dummy inputs and animage_embedsoutput.hf/__init__.py: wire the model-class mapping and trigger registration.Validation
Scope
Vision tower only. The full generative DeepSeek-V2 decoder path is out of scope.