How to use optuna or raytune to search for parameters not in TrainingArguments?

All the exaples I saw are searching for parameters in TrainingArguments. For instance, what should I do if I want to search for the parameters in model.generate to optimize BLEU with optuna or raytune? Thank you in advance for any reply.

2 Likes