Skip to content

Add BEiT to NormalizedConfigManager - #2504

Open
kratos0718 wants to merge 1 commit into
huggingface:mainfrom
kratos0718:add-beit-normalized-config
Open

kratos0718 wants to merge 1 commit into
huggingface:mainfrom
kratos0718:add-beit-normalized-config

Conversation

@kratos0718

Copy link
Copy Markdown

Summary

Part of #351. BEiT already has an ONNX export config but was missing from NormalizedConfigManager, so ORTOptimizer can't run on it yet.

  • Added "beit": NormalizedVisionConfig to _conf (alphabetically, between bart and bert)
  • Removed beit from the TODO: missing normalized configs comment above it
  • BeitConfig exposes image_size and num_channels directly, which is exactly what NormalizedVisionConfig expects, so no custom subclass was needed

Test plan

  • Added two tests to tests/utils/test_normalized_config.py: one confirming beit resolves to NormalizedVisionConfig, and one instantiating a real BeitConfig() and asserting the normalized image_size/num_channels match the underlying config
  • Ran both locally against the actual transformers.BeitConfig (not mocked) — both pass

BEiT has an ONNX export config but was missing from NormalizedConfigManager.
Its config exposes image_size and num_channels directly, matching
NormalizedVisionConfig, so no custom subclass is needed.
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.

1 participant