core.trainers.dpo.trainer
core.trainers.dpo.trainer
DPO trainer for axolotl
Classes
Name | Description |
---|---|
AxolotlDPOTrainer | Extend the base DPOTrainer for axolotl helpers |
AxolotlDPOTrainer
core.trainers.dpo.trainer.AxolotlDPOTrainer(self,
*args,
=None,
dataset_tags**kwargs,
)
Extend the base DPOTrainer for axolotl helpers
Methods
Name | Description |
---|---|
evaluation_loop | Overriding built-in evaluation loop to store metrics for each batch. |
push_to_hub | Overwrite the push_to_hub method in order to force-add the tags when pushing the |
evaluation_loop
core.trainers.dpo.trainer.AxolotlDPOTrainer.evaluation_loop(
dataloader,
description,=None,
prediction_loss_only=None,
ignore_keys='eval',
metric_key_prefix )
Overriding built-in evaluation loop to store metrics for each batch.
Prediction/evaluation loop, shared by Trainer.evaluate()
and Trainer.predict()
.
Works both with or without labels.
push_to_hub
*args, **kwargs) core.trainers.dpo.trainer.AxolotlDPOTrainer.push_to_hub(
Overwrite the push_to_hub
method in order to force-add the tags when pushing the
model on the Hub. Please refer to ~transformers.Trainer.push_to_hub
for more details.