Model configuration classes in 🤗 Transformers are not standardized. Although they provide an attribute_map
attribute
that enables to aleviate that, it does not make it easy to reason on common configuration attributes in the code.
NormalizedConfig classes try to fix that by allowing access to the configuration
attribute they wrap in a standardized way.
While it is possible to create NormalizedConfig
subclasses for common use-cases, it is also possible to overwrite
the original attribute name -> normalized attribute name
mapping directly using the
with_args()
class method.
( config: PretrainedConfig allow_new: bool = False **kwargs )
Handles the normalization of PretrainedConfig
attribute names, allowing to access attributes in a general way.
( config: PretrainedConfig allow_new: bool = False **kwargs )
( config: PretrainedConfig allow_new: bool = False **kwargs )
( config: PretrainedConfig allow_new: bool = False **kwargs )
( config: PretrainedConfig allow_new: bool = False **kwargs )