Skip to content

Add EoMT with DINOv3 backbone#41212

Merged
vasqu merged 111 commits intohuggingface:mainfrom
NielsRogge:codex/integrate-eomt-dinov3-model-into-transformers
Feb 2, 2026
Merged

Add EoMT with DINOv3 backbone#41212
vasqu merged 111 commits intohuggingface:mainfrom
NielsRogge:codex/integrate-eomt-dinov3-model-into-transformers

Conversation

@NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Sep 30, 2025

What does this PR do?

This PR adds EoMT with a DINOv3 backbone. The authors of EoMT released new checkpoints which swap the DINOv2 backbone by the newer DINOv3: https://github.com/tue-mps/eomt/blob/master/model_zoo/dinov3.md

Disclaimer

This PR was implemented using OpenAI Codex and further improved by me.

Who can review?

@yonigozlan

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@yonigozlan yonigozlan left a comment

Choose a reason for hiding this comment

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

Hey @NielsRogge ! Looking clean but I wonder if we can simplify even further, or if we even need a new model for this (we would still need to do some refactoring to Eomt though)

class_queries_logits=class_queries_logits,
last_hidden_state=sequence_output,
patch_offsets=patch_offsets,
)
Copy link
Member

Choose a reason for hiding this comment

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

Most of this is very similar to the base Eomt, I'm wondering if we could support the dinov3 version without adding a new model? This would mean defining a backbone instead of copying submodules of dinov2/dinov3, and make position_embeddings optional in the backbone layer call, so not sure how feasible this is, also in terms of BC. Wdyt @NielsRogge ?

@NielsRogge NielsRogge force-pushed the codex/integrate-eomt-dinov3-model-into-transformers branch from 1f098ff to 9e24af7 Compare October 8, 2025 17:23
@vasqu
Copy link
Contributor

vasqu commented Jan 30, 2026

run-slow: eomt, eomt_dinov3

@github-actions
Copy link
Contributor

This comment contains run-slow, running the specified jobs:

models: ["models/eomt", "models/eomt_dinov3"]
quantizations: []

@vasqu
Copy link
Contributor

vasqu commented Jan 30, 2026

run-slow: eomt, eomt_dinov3, vit

@github-actions
Copy link
Contributor

CI Results

Workflow Run ⚙️

⚠️ No test being reported (jobs are skipped or cancelled)!

@vasqu
Copy link
Contributor

vasqu commented Jan 30, 2026

run-slow: eomt, eomt_dinov3, vit

@github-actions
Copy link
Contributor

This comment contains run-slow, running the specified jobs:

models: ["models/eomt", "models/eomt_dinov3", "models/vit"]
quantizations: []

1 similar comment
@github-actions
Copy link
Contributor

This comment contains run-slow, running the specified jobs:

models: ["models/eomt", "models/eomt_dinov3", "models/vit"]
quantizations: []

@github-actions
Copy link
Contributor

CI Results

Workflow Run ⚙️

Model CI Report

❌ Failed tests

  • eomt_dinov3:
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationTest::test_sdpa_can_dispatch_on_flash
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationIntegrationTest::test_inference_fp16
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationIntegrationTest::test_semantic_segmentation_inference

@vasqu
Copy link
Contributor

vasqu commented Jan 30, 2026

@NielsRogge I've fixed the last few smaller things, can you check the failing tests at #41212 (comment)

Moreso the integration tests, if that's a GPU diff (A10) lmk I can update as well in that case - sdpa dispatch one is probably since we are forced to use a mask --> suffices to skip with a comment

@vasqu
Copy link
Contributor

vasqu commented Feb 2, 2026

run-slow: eomt_dinov3

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

This comment contains run-slow, running the specified jobs:

models: ["models/eomt_dinov3"]
quantizations: []

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 2228231d merge commit
PR 8dfe9736 branch commit
main e4b22baa base commit

Model CI Report

3 new failed tests from this PR 😭

  • eomt_dinov3:
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationTest::test_sdpa_can_dispatch_on_flash
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationIntegrationTest::test_inference_fp16
    tests/models/eomt_dinov3/test_modeling_eomt_dinov3.py::EomtDinov3ForUniversalSegmentationIntegrationTest::test_semantic_segmentation_inference

@NielsRogge
Copy link
Contributor Author

@vasqu feel free to handle the integration tests, I assume this is because of the GPU difference

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

[For maintainers] Suggested jobs to run (before merge)

run-slow: auto, eomt, eomt_dinov3, vit

@vasqu
Copy link
Contributor

vasqu commented Feb 2, 2026

run-slow: eomt, eomt_dinov3, vit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

This comment contains run-slow, running the specified jobs:

models: ["models/eomt", "models/eomt_dinov3", "models/vit"]
quantizations: []

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN f9483f5f merge commit
PR 56155dd2 branch commit
main 645db400 base commit

✅ No failing test specific to this PR 🎉 👏 !

@vasqu
Copy link
Contributor

vasqu commented Feb 2, 2026

Merging now, just fixed the last few tests due to GPU diffs resulting in slightly higher atols - updated to a10 numbers where needed (2 tests)

@vasqu vasqu merged commit 751cff7 into huggingface:main Feb 2, 2026
26 checks passed
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.

5 participants