TRL documentation
MergeModelCallback
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.25.1).
MergeModelCallback
class trl.MergeModelCallback
< source >( merge_config: MergeConfig | None = None merge_at_every_checkpoint: bool = False push_to_hub: bool = False )
Parameters
- merge_config (
experimental.merge_model_callback.MergeConfig, optional) — Configuration used for the merging process. If not provided, the defaultMergeConfigis used. - merge_at_every_checkpoint (
bool, optional, defaults toFalse) — Whether to merge the model at every checkpoint. - push_to_hub (
bool, optional, defaults toFalse) — Whether to push the merged model to the Hub after merging.
A TrainerCallback that merges the policy model (the model being trained) with another model based on a merge configuration.