Standardize, Don’t Abstract
This explains the design principles (s) and recent engineering changes that make 1M+ Python LOC and 400+ model architectures "maintainable despite continuous additions."
transformers aims to be the Source of Truth for each model implementation, prioritizing performance and reproducibility. Since users are mostly researchers/power users, code is the 'product' and must be easy to read, debug, and modify.Standardize, Don't Abstract: only commonize infrastructure, keep model semantics inside model files. DRY*: deduplication isn't always good (* (DO Repeat Yourself). Strategic duplication is allowed for user readability and local semantics. The essence is: "Keep model seantics transparent in one file (for readability/hackability), while reducing maintenance burden through modular definitions and config-based composition."
huggingface.co
https://huggingface.co/spaces/transformers-community/Transformers-tenets
Seonglae Cho