Skip to content

[models] - fix: model loading - #89

Merged
JulesBelveze merged 2 commits into
mainfrom
fix/models-loading
Jul 23, 2026
Merged

[models] - fix: model loading#89
JulesBelveze merged 2 commits into
mainfrom
fix/models-loading

Conversation

@JulesBelveze

Copy link
Copy Markdown
Owner

Summary

The custom model wrappers were loading a pretrained model, then replacing it with a new custom encoder.

This PR loads the custom encoder once and reuses it across BERT, DeeBERT, BERxiT, and Theseus. It also removes the DeeBERT and BERxiT weight initialization that was wiping loaded weights.

Added offline checkpoint tests for DeeBERT, BERxiT, and Theseus.

Testing

  • pytest -q tests/test_custom_model_initialization.py

 - Standardizes the model initialization process in multiple classes to ensure consistency and reduce redundancy.
 - Simplifies the model building logic by directly using the provided model instead of re-instantiating it.
 - Implement tests to verify that custom transformer models load and utilize pretrained encoders correctly.
 - Ensure that the model configurations and outputs are validated for different model types.
@JulesBelveze
JulesBelveze merged commit 831876f into main Jul 23, 2026
@JulesBelveze
JulesBelveze deleted the fix/models-loading branch July 23, 2026 07:11
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