facebookresearch / fairseq2

FAIR Sequence Modeling Toolkit 2
https://facebookresearch.github.io/fairseq2/
MIT License
613 stars 59 forks source link

Move model arch definitions from factory.py #595

Closed cbalioglu closed 2 weeks ago

cbalioglu commented 2 weeks ago

This PR includes two changes (1) moves model architecture definitions to a separate archs.py per model and explicitly registers them in __init__.py instead of relying on implicit import statements (2) refactors NLLB model definition and defines a vanilla Transformer model that NLLB is now based on (i.e. load_transformer_model() instead of load_nllb_model()). In order to preserve backwards compatibility load_nllb_model() still exists though.