[ModernBERT
] Never save 'reference_compile' config; should be set based on end user
#36305
+20
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
reference_compile
inModernBertConfig
Details
The ModernBERT architecture uses a
reference_compile
config option to determine whether various model layers are compiled. However, not every system supports this, so we either 1) use the user's provided value, 2) use the option in the config, or 3) set it automatically based on the user's system.However, it seems that if you save a model, it will save
reference_compile
into the config. This is very problematic, as end users who cannot run compilation will be "forced" into compilation (option 2) instead of determining whether compilation is possible (option 3). This is quite annoying for smooth usage.When this is merged and released, I'll consider writing a script that makes PRs on all ~850 ModernBERT models to remove the
reference_compile
option from their configs, so it's always just based on the user's system (or manual parameters).Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@ArthurZucker