SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14718 · ICLR · 2024

Leftover Lunch: Advantage-based Offline Reinforcement Learning for Language Models

Ronan Le Bras, Ximing Lu, Mark Riedl, Ashutosh Baheti

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 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 1 has no contract verdict; 1 failure of our instrument; 4 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/2305.14718.json · badge: /api/ran/2305.14718.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
abaheti95/LoL-RL canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
abaheti95/lol-rl canonical (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
FunctionStatusWhere it lives
dpo_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
abaheti95/LoL-RL/dpo_qlora_llama_hh.py
code served (permissive licence) · get_code("1ed7c9ceaa90eb2c")
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, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.functional as F

torch.manual_seed(0)

# Create small batch of log probabilities
batch_size = 2

# Log probabilities should be small negative numbers (log of probabilities between 0 and 1)
policy_chosen_logps = torch.tensor([-0.5, -0.3], dtype=torch.float32)
policy_rejected_logps = torch.tensor([-1.2, -0.9], dtype=torch.float32)
reference_chosen_logps = torch.tensor([-0.6, -0.4], dtype=torch.float32)
reference_rejected_logps = torch.tensor([-1.1, -0.8], dtype=torch.float32)

beta = 0.25
reference_free = False

ARGS = {
    "policy_chosen_logps": policy_chosen_logps,
    "policy_rejected_logps": policy_rejected_logps,
    "reference_chosen_logps": reference_chosen_logps,
    "reference_rejected_logps": reference_rejected_logps,
    "beta": beta,
    "reference_free": reference_free,
}
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, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
get_bleu Ran
ran, honoured the contract we drafted
abaheti95/LoL-RL/metrics_hh.py
pointer only (licence: MIT); the stored copy get_code serves, from calubkk/clha, is pointer only (licence: NONE) · get_code("0d49b060dc9012dc")
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 calubkk/clha, and GitHub detected no licence in that repository when it was checked. 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_dialog_eval_gpt4_prompt Ran
ran on a synthesized input
abaheti95/LoL-RL/gpt4_as_evaluator.py
code served (permissive licence) · get_code("435cfa92ef8948b2")
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

# Define ARGS dictionary with valid arguments for get_dialog_eval_gpt4_prompt
ARGS = {
    "prefix": " User: How do I make a simple recipe?",
    "model_A_suffix": " Here is a simple recipe for pasta. Boil water, add pasta, cook for 10 minutes, drain, and serve with sauce.",
    "model_B_suffix": " You can make many recipes. A simple one is pasta. First, boil water in a pot. Then add the pasta to the boiling water. Cook the pasta for about 10 minutes until it is tender. Then drain the pasta using a colander. Finally, serve the pasta with your favorite sauce. Enjoy!"
}
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
evaluate_on_filepath Not yet run
unverified (harvested, no recorded run)
abaheti95/LoL-RL/ppo_hh_eval.py
code served (permissive licence) · get_code("7f871e5508a7fdc7")
How it ran

no invocation recorded.

evaluate_on_validation Not yet run
unverified (harvested, no recorded run)
abaheti95/lol-rl/lolrl_qlora_llama_hh.py
code served (permissive licence) · get_code("9f0767f2b4b829f2")
How it ran

no invocation recorded.

evaluate_on_validation Not yet run
unverified (harvested, no recorded run)
abaheti95/LoL-RL/ppo_qlora_llama_hh.py
code served (permissive licence) · get_code("779a33c6be2f093a")
How it ran

no invocation recorded.

get_advantage_predictions_on_dataset Not yet run
unverified (harvested, no recorded run)
abaheti95/lol-rl/lolrl_qlora_llama_hh.py
code served (permissive licence) · get_code("e25a71c9cadcfd3f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 5 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
dpo_loss 6 other papers
6 later
2309.16240 (2023-09)
Beyond Reverse KL: Generalizing Direct Preference Optimization with Diverse Divergence Constraints
2312.00267 (2023-12)
Sample Efficient Preference Alignment in LLMs via Active Exploration
2405.05008 (2024-05)
ADELIE: Aligning Large Language Models on Information Extraction
and 3 more not named here
get_bleu 2 other papers
2 later
2403.11124 (2024-03)
Scaling Data Diversity for Fine-Tuning Language Models in Human Alignment
2403.16649 (2024-03)
CLHA: A Simple yet Effective Contrastive Learning Framework for Human Alignment

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

Reinforcement Learning with Human Feedback (RLHF) is the most prominent method for Language Model (LM) alignment. However, RLHF is an unstable and data-hungry process that continually requires new high-quality LM-generated data for finetuning. We introduce Advantage-Leftover Lunch RL (A-LOL), a new class of offline policy gradient algorithms that enable RL training on any pre-existing data. By assuming the entire LM output sequence as a single action, A-LOL allows incorporating sequence-level classifiers or human-designed scoring functions as rewards. Subsequently, by using LM's value estimate, A-LOL only trains on positive advantage (leftover) data points, making it resilient to noise. Overall, A-LOL is an easy-to-implement, sample-efficient, and stable LM training recipe. We demonstrate the effectiveness of A-LOL and its variants with a set of four different language generation tasks. We compare against both online RL (PPO) and recent preference-based (DPO, PRO) and reward-based (GOLD) offline RL baselines. On the commonly-used RLHF benchmark, Helpful and Harmless Assistant (HHA), LMs trained with A-LOL methods achieve the highest diversity while also being rated more safe and helpful than the baselines according to humans. Additionally, in the remaining three tasks, A-LOL could optimize multiple distinct reward functions even when using noisy or suboptimal training data.

For agents

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

get_harvested_code_for_paper("2305.14718")
get_code_for_paper("2305.14718")
have("2305.14718")

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

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

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

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

Connect an agent — have() is free.