Fix attention mask dtype in EoMT-DINOv3 converter verification
codex
## Summary
- ensure the converter verification feeds 0/1 attention masks into the Hugging Face backbone so its eager attention matches the original implementation
## Testing
- .venv/bin/python -m compileall src/transformers/models/eomt_dinov3/convert_eomt_dinov3_to_hf.py
- make fixup *(fails: repository has no `main` branch to diff against)*
- make fix-copies *(fails: optional `yaml` and `regex` dependencies are unavailable)*
------
https://chatgpt.com/codex/tasks/task_b_68d65a86fc4c8336abf69a5c0d342a8a
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce a converter that merges EoMT delta weights with DINOv3 backbones, builds HF configs, and verifies parity via backbone-step checks.
>
> - **Models/Tools**:
> - Add `src/transformers/models/eomt_dinov3/convert_eomt_dinov3_to_hf.py` to convert EoMT-DINOv3 checkpoints to 🤗 Transformers.
> - **Conversion**:
> - Load DINOv3 backbone weights/config, map keys to EoMT format, apply delta, and merge backbone parameters where needed.
> - Auto-derive `EomtDinov3Config` (queries, blocks, upscale blocks, labels, registers) from delta/base.
> - **Verification**:
> - Implement parity checks collecting patch embeddings, RoPE, per-layer hidden states, mask/class logits, and final sequence output.
> - Ensure attention mask construction and dtype/values align with original (0/1 mask, head-expanded, masked_fill).
> - **CLI & UX**:
> - Provide checkpoint catalog resolution (`--model-id`, `--list-models`), HF Hub/local downloads, token handling, image size/backbone overrides.
> - Save `model` and `EomtDinov3ImageProcessorFast`; optional `--verify`, `--safe-serialization`.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 038d50e88028d185760bba6051afb1bc8fe36aeb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
合并状态:已合并 合并于 2025-09-30 关闭于 2025-09-30 1 条评论