evo-simpo-code-reproduction

evo-simpo-code-reproduction is a skill for Claude Code, Codex from OpenLAIR/OpenSkill. It costs 36 tokens per session (915 once invoked), scanned A, original, Apache-2.0.

A code-reproduction package that implements the SimPO preference-learning loss described in a 2024 research paper and runs its setup, tests, and result-saving steps. SimPO is a method for training language models from preferred and rejected answers.

In plain words
What is it for?
Use it to implement and test the SimPO loss function in a machine-learning reproduction task.
Why use it?
It gives researchers a repeatable way to recreate the paper's calculation and check that important details such as score averaging and constants are handled correctly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to implement and test the SimPO loss function in a machine-learning reproduction task.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openlair/openskill/evo-simpo-code-reproduction
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OpenLAIR/OpenSkill --skill evo-simpo-code-reproduction
Clone the repo
git clone --depth 1 https://github.com/OpenLAIR/OpenSkill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for evo-simpo-code-reproduction

README.md
[![agentmods](https://agentmods.dev/badge/skills/openlair/openskill/evo-simpo-code-reproduction/github.svg)](https://agentmods.dev/skills/openlair/openskill/evo-simpo-code-reproduction)
Your own site
<a href="https://agentmods.dev/skills/openlair/openskill/evo-simpo-code-reproduction"><img src="https://agentmods.dev/badge/skills/openlair/openskill/evo-simpo-code-reproduction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for evo-simpo-code-reproduction

Your own site · 80×15
<a href="https://agentmods.dev/skills/openlair/openskill/evo-simpo-code-reproduction"><img src="https://agentmods.dev/badge/skills/openlair/openskill/evo-simpo-code-reproduction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 915 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00915
Opus 5 $0.00018 $0.00458
Sonnet 5 $0.00007 $0.00183
Haiku 4.5 $0.00004 $0.00092

Measured today against content hash 13ff0160e30c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

evo-simpo-code-reproduction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/run_and_save.py, scripts/simpo_loss_impl.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

tasks-evolved/simpo-code-reproduction/environment/skills/evo-simpo-code-reproduction/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

evo-simpo-code-reproduction

Overview

Complete skill for reproducing the SimPO (Simple Preference Optimization) loss function from the paper by Meng et al. (2024). Handles implementation of the simpo_loss method, environment setup, unit test execution, and saving results.

Key Concepts (from the paper)

SimPO Loss Formula

L_SimPO = -log(sigmoid(beta/|y_w| * sum(log π(y_w|x)) - beta/|y_l| * sum(log π(y_l|x)) - gamma))

Critical Implementation Details

  1. Inputs are pre-normalized: policy_chosen_logps and policy_rejected_logps are already length-averaged (mean log probs per token) before entering simpo_loss. The averaging happens in get_batch_logps with average_log_prob=True.

  2. Margin factoring: The code computes logits = pi_logratios - gamma/beta, then applies beta * logits inside logsigmoid. This is algebraically equivalent to beta * pi_logratios - gamma.

  3. gamma computation: In the SimPO trainer, gamma = self.gamma_beta_ratio * self.beta (where gamma_beta_ratio defaults to ~0.25, giving gamma≈0.5 for beta=2.0). The paper recommends gamma/beta ≈ 0.5.

  4. Loss types:

    • Sigmoid (default): losses = -F.logsigmoid(beta * logits) * (1 - label_smoothing) - F.logsigmoid(-beta * logits) * label_smoothing
    • Hinge: losses = torch.relu(1 - beta * logits)
  5. Rewards are detached: chosen_rewards = beta * chosen_logps.detach(), rejected_rewards = beta * rejected_logps.detach()

  6. Return shape: Per-example losses of shape (batch_size,) — reduction happens upstream.

Sigmoid Loss with Label Smoothing (label_smoothing=0 by default)

When label_smoothing=0, the second term vanishes, leaving pure SimPO loss:

losses = -F.logsigmoid(self.beta * logits)

When label_smoothing > 0:

losses = (
    -F.logsigmoid(self.beta * logits) * (1 - self.label_smoothing)
    - F.logsigmoid(-self.beta * logits) * self.label_smoothing
)

Environment Setup

  • Python 3.10+
  • pip install torch transformers 'trl==0.8.6' datasets accelerate peft numpy
  • trl>=0.29 removed CPOTrainer; use trl==0.8.6 for compatibility with the SimPO codebase

Read the full file on GitHub · 77 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 77 lines · 36 tokens per session scan A 13ff0160e30c

Subscribe to this mod's changes

evo-simpo-code-reproduction is a skill published in the GitHub repository OpenLAIR/OpenSkill (88 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 915 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.