SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.16682 · 2023

Some things are more CRINGE than others: Iterative Preference Optimization with the Pairwise Cringe Loss

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2312.16682.json · badge: /api/ran/2312.16682.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
facebookresearch/RAM canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
LN Ran
ran; our contract draft was wrong, not the code
facebookresearch/RAM/projects/cocomix/models/modeling_gpt2_cocomix.py
code served (permissive licence) · get_code("e14330ae6c40d236")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function LN takes a tensor x and an optional eps parameter
# It computes layer normalization, returning normalized tensor, mean, and std
# We need to provide:
# - x: a torch.Tensor with shape that allows mean/std computation over last dimension
# - eps: a float (optional, has default value 1e-05)

x = torch.randn(2, 4)  # batch_size=2, feature_dim=4
eps = 1e-05

ARGS = {
    "x": x,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
add_instruct_tokens Ran
ran; our contract draft was wrong, not the code
facebookresearch/RAM/ram/data.py
code served (permissive licence) · get_code("370b85373b9b3300")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Construct arguments for add_instruct_tokens
ex = {
    'input': 'Please translate this sentence.'
}

instr_start_symbol = '[INST] '
instr_end_symbol = ' [/INST]'
key = 'input'

ARGS = {
    'ex': ex,
    'instr_start_symbol': instr_start_symbol,
    'instr_end_symbol': instr_end_symbol,
    'key': key
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
attention_flops_per_token Ran
ran, honoured the contract we drafted
facebookresearch/RAM/projects/mta/transformer.py
code served (permissive licence) · get_code("26ff74d6538ab161")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "n_layers": 12,
    "seq_len": 128,
    "dim": 768,
    "causal": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cross_entropy Ran
ran; our contract draft was wrong, not the code
facebookresearch/RAM/projects/mta/transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/lst, is pointer only (licence: NOASSERTION) · get_code("1d34daf1ab8748db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/lst, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_content_key Ran
ran; our contract draft was wrong, not the code
facebookresearch/RAM/projects/mta/single_json.py
code served (permissive licence) · get_code("62134cd7798c1a00")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary file with a JSON line containing a 'text' key
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'test.jsonl')

with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(json.dumps({'text': 'hello world'}) + '\n')

ARGS = {
    'path': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_prompt_template Not yet run
unverified (harvested, no recorded run)
facebookresearch/RAM/ram/data.py
code served (permissive licence) · get_code("712ef575ecebd0ef")
How it ran

no invocation recorded.

load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
facebookresearch/RAM/projects/cocomix/models/modeling_gpt2_cocomix.py
code served (permissive licence) · get_code("9a0a23caa628b0b9")
How it ran

no invocation recorded.

tqdm_distributed Not yet run
unverified (harvested, no recorded run)
facebookresearch/RAM/projects/cocomix/utils.py
code served (permissive licence) · get_code("e8baf90dada23a73")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
load_tf_weights_in_gpt2 11 other papers
1 dated earlier, 10 later
2310.09753 (2023-10)
When can transformers reason with abstract symbols?
2402.04852 (2024-02)
Multi-Patch Prediction: Adapting LLMs for Time Series Representation Learning
2402.10787 (2024-02)
Squat: Quant Small Language Models on the Edge
and 8 more not named here
LN 3 other papers
3 later
2406.04093 (2024-06)
Scaling and evaluating sparse autoencoders
2409.04185 (2024-09)
Residual Stream Analysis with Multi-Layer SAEs
2411.07122 (2024-11)
SCAR: Sparse Conditioned Autoencoders for Concept Detection and Steering in LLMs
attention_flops_per_token 2 other papers
2 later
2412.09871 (2024-12)
Byte Latent Transformer: Patches Scale Better Than Tokens
2605.20670 (2026-05)
LT2: Linear-Time Looped Transformers
cross_entropy 2 other papers
2 later
2412.09871 (2024-12)
Byte Latent Transformer: Patches Scale Better Than Tokens
2510.06195 (2025-10)
Latent Speech-Text Transformer
tqdm_distributed 1 other paper
1 later
2403.04317 (2024-03)
Online Adaptation of Language Models with a Memory of Amortized Contexts

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Practitioners commonly align large language models using pairwise preferences, i.e., given labels of the type response A is preferred to response B for a given input. Perhaps less commonly, methods have also been developed for binary feedback, i.e. training models given labels of type response A is good or bad. We show how an existing performant binary feedback method, the Cringe Loss (Adolphs et al., 2022), can be generalized to the pairwise preference setting using a simple soft margin extension. Pairwise Cringe Loss is straightforward to implement and efficient to train, and we find it outperforms state-of-the-art preference optimization algorithms such as PPO and DPO on the AlpacaFarm benchmark. We show that iterations of training of our model are important for improved results, and that we can generalize DPO to Iterative DPO in the same way.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.16682")
get_code_for_paper("2312.16682")
have("2312.16682")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2312.16682.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2312.16682.svg)](https://syntology.ai/paper/2312.16682)

Connect an agent — have() is free.