ml-energy / zeus

Deep Learning Energy Measurement and Optimization
https://ml.energy/zeus
Apache License 2.0
179 stars 24 forks source link

Example for `SFTTrainer` + `HFGlobalPowerLimitOptimizer` #41

Closed jaywonchung closed 3 months ago

jaywonchung commented 3 months ago

HuggingFace's SFTTrainer (https://huggingface.co/docs/trl/main/en/sft_trainer) inherits from Trainer and supports callbacks, so in theory it should just work with HFGlobalPowerLimitOptimizer (example in https://github.com/ml-energy/zeus/tree/master/examples/huggingface). We should quickly check fine-tuning with SFTTrainer with HFGlobalPowerLimitOptimizer and add an example.