how should i check which optimizer a huggingface model uses? i remember it has something…
- User
how should i check which optimizer a huggingface model uses? i remember it has something to do with model.config
- Assistant
To check which optimizer a Hugging Face model is using, you generally won't find that information directly in the model's configuration (
model.config). The optimizer is usually specified separately when you create the training setup (like using theTrainerclass) or when you define your training loop. - User
what optimizer is by default in TrainingArguments, Trainer from transformers?
- Assistant
In the Hugging Face Transformers library, the default optimizer used when you create a
Trainerinstance is the AdamW optimizer. This optimizer is a variant of the Adam optimizer with weight decay, which is suitable for training deep learning models.Here’s a quick breakdown of how this works:
-
Initializing the Trainer: When you create an instance of a , it will automatically use AdamW as the optimizer unless you specify a different optimizer.
-