protomotions.agents.peft.prior_setup module#

Shared setup for PEFT agents built on a frozen GPC prior.

class protomotions.agents.peft.prior_setup.DiscretePriorPEFTSetupMixin[source]#

Bases: object

Load the frozen prior and build a PEFT actor around it.

RLFT and SFT use different training loops, but they both need the same frozen prior dependency, adapter initialization, input validation, and slim adapter checkpoint handling. The loading lifecycle itself comes from PretrainedModulesMixin directly for SFT and through FineTuningAgent for RLFT; this mixin only defines the PEFT-specific load contract.

require_reward_norm_on_load = False#
pretrained: Dict[str, <Mock object at 0x7fd69473d190>[]]#
create_model()[source]#
get_inference_state_dict(
state_dict,
model_state_dict=None,
)[source]#

Emit an adapter-only inference checkpoint.

load_adapter_checkpoint(
checkpoint,
strict=True,
)[source]#

Load adapter weights over the model’s existing frozen base prior.