How to set a constant learning rate in HuggingFace Trainer class?

302 views Asked by At

How to use the get_constant_schedule from transformers to set a constant learning rate in the Trainer class?

1

There are 1 answers

0
cronoik On

Just set the TrainingArguments parameter lr_scheduler_type to constant

from transformers import TrainingArguments

training_args = TrainingArguments(
    output_dir="bla", 
    evaluation_strategy="epoch", 
    lr_scheduler_type="constant"
)