executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
dpo_loss_objectiveCompute Direct Preference Optimization logistic losses, implicit rewards, and log-ratio diagnostics from policy and reference log probabilities.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when implementing or checking the core DPO objective. It consumes chosen/rejected sequence log probabilities from a policy and a fixed reference model. Do not use this skill for data extraction, tokenization, or optimizer-loop bookkeeping.
beta temperature.label_smoothing, reference_free, or ipo settings.policy_logratio = policy_chosen - policy_rejected.reference_logratio = reference_chosen - reference_rejected, unless using reference-free mode.logit = policy_logratio - reference_logratio.-log sigmoid(beta * logit), optionally mixed with the flipped term for conservative label smoothing.beta * (policy_logp - reference_logp) for diagnostics.Run:
python scripts/dpo_loss.py --self-test
python tests/test_dpo_loss.py
This standard-library implementation is intended for deterministic skill use and reduced recovery. Full tensor implementations should match these scalar formulas exactly.