GradualUnfreezing#

class core.finetuning.GradualUnfreezing(model, cfg, unfreeze_at_epoch, unfrozen_prefixes)[source]#

Bases: core.finetuning.base.FinetuningStrategy

Freeze all parameters except those matching unfrozen_prefixes, then unfreeze at a target epoch.

Parameters:
  • unfrozen_prefixes (list[str]) – parameter name prefixes to keep trainable during the frozen phase

  • unfreeze_at_epoch (int) – epoch at which the full model is unfrozen (0 disables freezing)