Skip to content

Add ModernBERT support to MLX token classification export - #2481

Closed
maziyarpanahi wants to merge 1 commit into
masterfrom
feature/om-179-mlx-architecture-coverage-extension
Closed

maziyarpanahi wants to merge 1 commit into
masterfrom
feature/om-179-mlx-architecture-coverage-extension

Conversation

@maziyarpanahi

Copy link
Copy Markdown
Owner

Summary

  • Add ModernBERT token-classification support to the MLX backend, including rotary attention, alternating global/local windows, gated MLP blocks, and the classification head.
  • Wire ModernBERT configuration and Hugging Face weight-key dispatch for MLX-fp and MLX-8bit artifacts.
  • Add synthetic offline coverage for architecture dispatch, PyTorch/MLX logit parity, and INT8 output shape preservation.

Validation

  • tests/unit/mlx/test_mlx_architecture_coverage.py — 3 passed on the arm64 MLX environment.
  • tests/unit/mlx/test_mlx_convert.py — 34 passed, 2 skipped.
  • Ruff lint and format checks pass for all changed files.

Closes #2345

@maziyarpanahi maziyarpanahi added improvement Hardening / refactor of existing code P2 Medium roadmap-v2 OpenMed V2 roadmap backlog labels Aug 9, 2026
@maziyarpanahi

Copy link
Copy Markdown
Owner Author

The ModernBERT work for #2345 has been consolidated into #2455, which is current with master, adds both ModernBERT and Longformer, and includes real Metal parity plus FP/INT8 artifact coverage. PR #2455 now closes both #2340 and #2345, so this narrower duplicate is superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Hardening / refactor of existing code P2 Medium roadmap-v2 OpenMed V2 roadmap backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend MLX backend architecture coverage for student-model export

1 participant