# Normalized configurations

## Normalized Configurations

Model configuration classes in 🌍 Transformers are not standardized. Although Transformers implements an `attribute_map` attribute that mitigates the issue to some extent, it does not make it easy to reason on common configuration attributes in the code. [NormalizedConfig](https://huggingface.co/docs/optimum/main/en/utils/normalized_config#optimum.utils.NormalizedConfig) classes try to fix that by allowing access to the configuration attribute they wrap in a standardized way.

### Base class

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.

#### class optimum.utils.NormalizedConfig

[\<source>](https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L23)

( config: typing.Union\[transformers.configuration\_utils.PretrainedConfig, typing.Dict]allow\_new: bool = False\*\*kwargs )

Parameters

* **config** (`PretrainedConfig`) — The config to normalize.

Handles the normalization of `PretrainedConfig` attribute names, allowing to access attributes in a general way.

### Existing normalized configurations

#### class optimum.utils.NormalizedTextConfig

[\<source>](https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L80)

( config: typing.Union\[transformers.configuration\_utils.PretrainedConfig, typing.Dict]allow\_new: bool = False\*\*kwargs )

#### class optimum.utils.NormalizedSeq2SeqConfig

[\<source>](https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L88)

( config: typing.Union\[transformers.configuration\_utils.PretrainedConfig, typing.Dict]allow\_new: bool = False\*\*kwargs )

#### class optimum.utils.NormalizedVisionConfig

[\<source>](https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L95)

( config: typing.Union\[transformers.configuration\_utils.PretrainedConfig, typing.Dict]allow\_new: bool = False\*\*kwargs )

#### class optimum.utils.NormalizedTextAndVisionConfig

[\<source>](https://github.com/huggingface/optimum/blob/main/optimum/utils/normalized_config.py#L100)

( config: typing.Union\[transformers.configuration\_utils.PretrainedConfig, typing.Dict]allow\_new: bool = False\*\*kwargs )
