transformers
Add Deepseek-OCR-2 model
#45075
Merged

Add Deepseek-OCR-2 model #45075

thisisiron
thisisiron feat: add DeepSeek-OCR-2 model registration and docs
e6bed84a
thisisiron feat: add DeepseekOcr2ImageProcessor
7a1a4007
thisisiron feat: add DeepseekOcr2Processor and refactor image processor tile_size
f3ec285d
thisisiron feat: add script to convert DeepSeek-OCR-2 weights to Hugging Face fo…
95b0d574
thisisiron feat: enhance DeepSeek-OCR-2 processing and inference test
b81bc0fb
thisisiron refactor
bbf3f942
thisisiron feat: add fast image processor
2e05944a
thisisiron refactor
8f3270b4
thisisiron test: add image processor tests for DeepseekOcr2
3ee14eba
thisisiron fix: make background_color configurable
58b683eb
thisisiron refactor: migrate image processors to pil/torchvision backend pattern
37104993
thisisiron test: add processor tests for DeepseekOcr2
1bfa054f
thisisiron fix: update __init__
1878af2c
thisisiron chore: clean up unused imports and fix formatting
46ddaecc
thisisiron feat: add configuration, modeling, and modular for DeepseekOcr2
8754d8df
thisisiron fix: style fixes, update docs, and minor cleanups
fef7b5fa
thisisiron fix: use @strict
5520c318
thisisiron fix: register private models
fee7de05
thisisiron docs: add usage example and expand DeepSeek-OCR-2 model doc
85312185
thisisiron fix: add checkpoint to auto_docstring
f6fc20ba
thisisiron fix: remove comment
b4bfbf53
thisisiron fix: remove unused max_query
e7755774
thisisiron thisisiron changed the title [WIP] Add Deepseek-OCR2 model Add Deepseek-OCR-2 model 232 days ago
zucchini-nlp
zucchini-nlp zucchini-nlp requested a review from zucchini-nlp zucchini-nlp 227 days ago
thisisiron fix: clean up DeepSeek-OCR2 modular
44482df2
thisisiron Merge branch 'main' into add-deepseek_ocr2
4b1605a6
thisisiron docs: update date
c6f5eaf2
thisisiron refactor: inherit SamVisionEncoder
f05c2529
thisisiron refactor: use create_causal_mask with or_mask_function
74ee9f3f
thisisiron Merge branch 'main' into add-deepseek_ocr2
25c54542
thisisiron Merge branch 'main' into add-deepseek_ocr2
33a61593
thisisiron docs: update date
2f931aaf
zucchini-nlp
zucchini-nlp commented on 2026-04-02
thisisiron fix: address PR review
d194f99b
thisisiron refactor: use modular for image processor
c08b036f
thisisiron refactor: restructure DeepSeek-OCR-2 config, image processor, and pro…
5ce50295
thisisiron Merge branch 'main' into add-deepseek_ocr2
917d0864
thisisiron
thisisiron fix: sync hidden_size and rms_norm_eps from encoder_config to vision_…
eec01bc6
thisisiron Merge branch 'main' into add-deepseek_ocr2
7ef21416
thisisiron refactor: remove comment
10639ec7
thisisiron fix
1efd730c
thisisiron fix: correct EncoderConfig docstring example
9c70392d
zucchini-nlp
zucchini-nlp commented on 2026-04-10
thisisiron refactor: add PIL image processor to modular
b9c75c62
thisisiron refactor: address review comments on config, processor, and model
1433b320
thisisiron Merge branch 'main' into add-deepseek_ocr2
22392adf
thisisiron
thisisiron fix: adjust processing tests for image token expansion
6b95f093
thisisiron fix: move view_separator to correct device for model parallelism
55fc4aab
thisisiron Merge branch 'main' into add-deepseek_ocr2
68b5d42e
thisisiron fix: add DeepseekOcr2ImageProcessorPil to __all__
f85aabb2
thisisiron fix: remove SDPA skip
c96106a0
thisisiron test: skip offload/export tests
8dbfda57
zucchini-nlp
zucchini-nlp approved these changes on 2026-04-14
zucchini-nlp
github-actions
HuggingFaceDocBuilderDev
github-actions
thisisiron refactor: address review comments
8b391e63
thisisiron Merge branch 'main' into add-deepseek_ocr2
0102cbf5
thisisiron fix: remove in DeepseekOcr2Model
451fd53c
thisisiron refactor: enforce explicit tokens in DeepseekOcr2Processor
0f73ee0e
thisisiron Merge branch 'main' into add-deepseek_ocr2
50b210cc
thisisiron refactor: inherit DeepseekOcr2ImageProcessorKwargs from GotOcr2ImageP…
f81b8b9f
thisisiron refactor: remove unused image processing
d84deaec
thisisiron
zucchini-nlp zucchini-nlp requested a review from Cyrilvallez Cyrilvallez 214 days ago
zucchini-nlp zucchini-nlp requested a review from vasqu vasqu 214 days ago
zucchini-nlp
vasqu
vasqu commented on 2026-04-21
thisisiron fix: update docs
765a1562
thisisiron Merge remote-tracking branch 'origin/main' into add-deepseek_ocr2
45aab0f1
thisisiron fix: export sub-configs
cd728815
thisisiron Update src/transformers/models/deepseek_ocr2/modular_deepseek_ocr2.py
54294aca
thisisiron refactor: switch to mlp_layer_types pattern and clean up redundant ov…
9310aafc
thisisiron refactor: derive projector dims from sub-configs
78fdc1cf
thisisiron refactor: address comments on naming, decorators, and mask location
a73c8a4d
thisisiron refactor: use VLMModelTester, fix processor text handling, and cache …
9389109f
thisisiron Merge branch 'add-deepseek_ocr2' of https://github.com/thisisiron/tra…
dddd6851
thisisiron fix: enable fullgraph compile
d9180fdc
thisisiron refactor: move weight mapping to conversion_mapping.py
916c8b0d
thisisiron fix: add tie_word_embeddings
9a9b7362
thisisiron
thisisiron Merge branch 'main' into add-deepseek_ocr2
1d133011
vasqu
vasqu
vasqu approved these changes on 2026-04-28
thisisiron Merge branch 'main' into add-deepseek_ocr2
3d7c8845
thisisiron refactor: address review comments
829f82b8
thisisiron Merge branch 'main' into add-deepseek_ocr2
b7ae2eb0
thisisiron
vasqu
vasqu approved these changes on 2026-04-30
vasqu make ci compatible, passed without changes neat
0c18ada2
vasqu
github-actions
github-actions
vasqu fixup imports
2ba5ede3
vasqu
thisisiron
vasqu
thisisiron Merge branch 'main' into add-deepseek_ocr2
865faa95
thisisiron
thisisiron switch vision encoder mask to block_sequence_ids
20035528
zucchini-nlp
thisisiron Merge branch 'main' into add-deepseek_ocr2
17ee7041
thisisiron update docs
28fa3a52
thisisiron
vasqu
vasqu approved these changes on 2026-05-25
vasqu
thisisiron Merge branch 'main' into add-deepseek_ocr2
2772070d
thisisiron update docs
077e99e0
vasqu
vasqu
thisisiron
vasqu
thisisiron Clean up DeepSeek-OCR-2 converted config
3c8fb527
thisisiron update DeepSeek-OCR-2 checkpoint
36c883fc
thisisiron Merge branch 'main' into add-deepseek_ocr2
9482d7e3
thisisiron update docs and sync generated config
fd0e526c
thisisiron
vasqu
github-actions
vasqu
vasqu approved these changes on 2026-06-01
github-actions
vasqu vasqu added New model
vasqu fix
b4069125
vasqu vasqu enabled auto-merge 167 days ago
github-actions
vasqu Merge branch 'main' into add-deepseek_ocr2
cf874952
github-actions
vasqu ok
5b87e5ff
vasqu vasqu enabled auto-merge 167 days ago
github-actions
disabled auto-merge 167 days ago
Manually disabled by user
vasqu
github-actions
vasqu vasqu enabled auto-merge 167 days ago
vasqu vasqu merged 8e67c5e1 into main 167 days ago
github-actions

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone