protomotions.agents.peft.sft_model module#

SFT model for PEFT adapters on a frozen discrete-token GPC prior.

class protomotions.agents.peft.sft_model.DiscretePriorPEFTSFTModel(*args, **kwargs)[source]#

Bases: DiscretePriorPEFTModel

Discrete-prior PEFT model used by the supervised SFT agent.

Rollout uses the frozen target encoder as the expert: encode the target motion into prior tokens, decode those tokens to an action, and store the tokens as supervision labels. Optimization replays the batch with teacher forcing and writes latent_logits for the generic supervision loss.

collect_expert_rollout(tensordict)[source]#
materialize(tensordict)[source]#

Run the setup-time pass used to create lazy module parameters.

forward(tensordict)[source]#

Run rollout inference and critic evaluation.