agentsclimarketplace

Run2 simpo loss implementation

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-gemini-3.1-flash-lite-preview/nlp-paper-reproduction/run2_simpo_loss_implementation

Implements the SimPO loss function using stable log-probability operations in the specified trainer file.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_simpo_loss_implementation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.6 KB, 130 tokens by cl100k_base, as published. Nobody here has run it

  1. Open /root/SimPO/scripts/simpo_trainer.py.
  2. Locate the simpo_loss method within the SimPOTrainer class.
  3. Implement the formula: $L_{SimPO} = -\log(\sigma(\beta(\log \pi_\theta(y_w|x) - \log \pi_\theta(y_l|x)) - \gamma))$.
  4. Ensure all tensor operations explicitly cast inputs to torch.float32 to maintain precision parity with the unit test's fixed tensors.
  5. Use torch.nn.functional.logsigmoid or stable subtraction to prevent overflow during exponentiation.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.