SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.09055 · 2023

Exploring the impact of low-rank adaptation on the performance, efficiency, and regularization of RLHF

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 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, 1 violated it and 0 have no contract verdict; 10 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2309.09055.json · badge: /api/ran/2309.09055.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
simengsun/alpaca_farm_lora canonical (classifier label)
classifier basis: census
12 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_reward_modeling_metrics Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/reward_modeling_trainer.py
code served (permissive licence) · get_code("cca45bb9a111ab77")
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 dict. 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
from transformers.trainer_utils import EvalPrediction

torch.manual_seed(0)

# Create small tensors for predictions and labels
# predictions: shape (2,) - logits for 2 samples
# label_ids: a tuple/list where the last element contains labels of shape (2,)
predictions = torch.randn(2, 1).numpy()  # Shape (2, 1) - will be squeezed to (2,)
label_ids = (torch.tensor([[0], [1]]),)  # Tuple with one element containing labels

# Create EvalPrediction object
eval_prediction = EvalPrediction(
    predictions=predictions,
    label_ids=label_ids
)

ARGS = {
    "eval_prediction": eval_prediction
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
create_scheduler Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/trainer_utils.py
code served (permissive licence) · get_code("42596ac916e883a5")
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 LambdaLR. 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
from torch.optim import Adam

torch.manual_seed(0)

# Create a minimal optimizer
model = nn.Linear(4, 3)
optimizer = Adam(model.parameters(), lr=1e-4)

# Create a minimal args object with required attributes and methods
class Args:
    def __init__(self):
        self.lr_scheduler_type = "linear"
    
    def get_warmup_steps(self, num_training_steps):
        return int(0.1 * num_training_steps)

args = Args()

# Set up the remaining parameters
num_training_steps = 1000
lr_scheduler = None

ARGS = {
    "args": args,
    "optimizer": optimizer,
    "lr_scheduler": lr_scheduler,
    "num_training_steps": num_training_steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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
flatten_dict Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/common.py
code served (permissive licence) · get_code("f5ff77db7757bc92")
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 dict. 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)

# Construct a nested dictionary with various types of values
nested_dict = {
    'model': {
        'layer1': {
            'weights': torch.randn(2, 4),
            'bias': torch.randn(4)
        },
        'layer2': {
            'weights': torch.randn(3, 4)
        }
    },
    'config': {
        'learning_rate': 0.001,
        'batch_size': 32
    },
    'data': 42
}

# Define a postprocess function that processes values
def my_postprocess(v):
    if isinstance(v, torch.Tensor):
        return v.sum().item()
    return v

ARGS = {
    'nested': nested_dict,
    'sep': '.',
    'postprocess_fn': my_postprocess
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
format_output Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/data_preprocessor.py
code served (permissive licence) · get_code("46af3eb303562401")
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
import torch.nn as nn

torch.manual_seed(0)

# The function format_output takes:
# - example: dict (must contain the key specified by output_key)
# - eos_token: Optional[str] (defaults to None)
# - output_key: str (defaults to 'output')

# Construct example dict with the output_key
example = {
    'output': 'Hello world',
    'other_field': 'some_value'
}

# eos_token is optional, test with a string value
eos_token = '</s>'

# output_key specifies which key in example dict to use
output_key = 'output'

ARGS = {
    'example': example,
    'eos_token': eos_token,
    'output_key': output_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
format_prompt Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/data_preprocessor.py
code served (permissive licence) · get_code("5ef0d2db8e674cd5")
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
import numpy as np

# Setup for format_prompt function
# The function requires:
# 1. example: dict with keys "instruction" and "input"
# 2. prompt_dict: dict with keys "prompt_noinputs" and "prompt_inputs"

# Case 1: Empty input (should use prompt_noinputs)
example_empty = {
    "instruction": "What is 2+2?",
    "input": ""
}

prompt_dict_empty = {
    "prompt_noinputs": "Instruction: {instruction}",
    "prompt_inputs": "Instruction: {instruction}\nInput: {input}"
}

ARGS = {
    "example": example_empty,
    "prompt_dict": prompt_dict_empty
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
format_prompt_with_data_frame Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/data_preprocessor.py
code served (permissive licence) · get_code("27d54a5b1d488ca0")
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 pandas as pd
import torch

torch.manual_seed(0)

# Create a simple dataframe with required 'instruction' and 'input' columns
df = pd.DataFrame([
    {'instruction': 'What is 2+2?', 'input': ''},
    {'instruction': 'Translate to French', 'input': 'Hello world'},
    {'instruction': 'Summarize this', 'input': 'The quick brown fox jumps over the lazy dog'}
])

# Create a prompt_dict with both template variations
prompt_dict = {
    'prompt_noinputs': 'Instruction: {instruction}\n\nResponse:',
    'prompt_inputs': 'Instruction: {instruction}\n\nInput: {input}\n\nResponse:'
}

# Optional postprocessor function that processes the dataframe
def df_postprocessor(df_input):
    # Simple postprocessor that just returns the dataframe as-is
    return df_input.copy()

ARGS = {
    'df': df,
    'prompt_dict': prompt_dict,
    'df_postprocessor': df_postprocessor,
    'return_dict': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, 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
get_logger Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/logging.py
code served (permissive licence) · get_code("043cf4a6fd60480b")
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 MultiProcessAdapter. 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 logging
import os

# Mock the is_main_process function that's used in MultiProcessAdapter
def is_main_process():
    return True

# Set up logging module with basic configuration
logging.basicConfig(level=logging.INFO)

# Define ARGS with all parameters for get_logger
ARGS = {
    "name": "__main__",
    "log_level": "INFO"
}
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 MultiProcessAdapter — a MultiProcessAdapter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiProcessAdapter 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
let_model_save_mem_when_zero_grad Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/common.py
code served (permissive licence) · get_code("9a1871dd5c967ac1")
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 SimpleModel. 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
from torch import nn
import types

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create some dummy data to trigger gradient computation
x = torch.randn(2, 4, requires_grad=False)
y = torch.randn(2, 2)

# Forward pass and compute gradients
output = model(x)
loss = ((output - y) ** 2).sum()
loss.backward()

# Verify that gradients exist before calling the function
for p in model.parameters():
    if p.grad is not None:
        p.grad = torch.randn_like(p.grad)

ARGS = {
    "model": model
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
make_rl_data_module Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/data_utils.py
code served (permissive licence) · get_code("0612fd8d6b151bf4")
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 dict. 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 numpy as np
import pandas as pd
import datasets
import transformers
from unittest.mock import Mock, MagicMock
import tempfile
import json
import os

torch.manual_seed(0)

# Create minimal stand-in classes
class StandInTokenizer:
    def __init__(self):
        self.vocab_size = 1000
        self.model_max_length = 512
        self.pad_token_id = 0
        self.eos_token_id = 2
    
    def encode(self, text, max_length=None, padding=False, truncation=False):
        return [1, 2, 3, 0]
    
    def __call__(self, text, max_length=None, padding=False, truncation=False, return_tensors=None):
        ids = self.encode(text)
        if return_tensors == "pt":
            return {"input_ids": torch.tensor([ids]), "attention_mask": torch.tensor([[1]*len(ids)])}
        return {"input_ids": ids, "attention_mask": [1]*len(ids)}

class RewardConditioningPromptPostprocessor:
    def __call__(self, prompt):
        return prompt

class QueryDataset:
    def __init__(self, df, prompt_dict, tokenizer, query_len, prompt_postprocessor=None):
        self.df = df
        self.prompt_dict = prompt_dict
        self.tokenizer = tokenizer
        self.query_len = query_len
        self.prompt_postprocessor = prompt_postprocessor
    
    def __len__(self):
        return len(self.df)
    
    def __getitem__(self, idx):
        return {"input_ids": torch.tensor([1, 2, 3, 0]), "attention_mask": torch.tensor([1, 1, 1, 1])}

class DataCollatorForStackableDataset:
    def __call__(self, batch):
        return batch

# Create temporary files and directories
temp_dir = tempfile.mkdtemp()
prompt_dict_path = os.path.join(temp_dir, "prompts.json")
dataset_path = os.path.join(temp_dir, "dataset")

# Write minimal prompt dict
with open(prompt_dict_path, "w") as f:
    json.dump({"prompt": "Instruction:\n{instruction}\n\nResponse:\n", "key_order": ["instruction", "input", "output"]}, f)

# Mock utils module
class utils:
    @staticmethod
    def jload(path):
        with open(path, "r") as f:
            return json.load(f)

# Inject utils into globals for the function
import sys
current_module = sys.modules[__name__]
current_module.utils = utils
current_module.QueryDataset = QueryDataset
current_module.DataCollatorForStackableDataset = DataCollatorForStackableDataset
current_module.RewardConditioningPromptPostprocessor = RewardConditioningPromptPostprocessor

# Create mock data arguments
class DataArgs:
    def __init__(self):
        self.prompt_dict_path = prompt_dict_path
        self.dataset_path = "wikitext"
        self.dataset_name = "wikitext-2-v1"
        self.train_splits = ["train"]
        self.eval_splits = ["validation"]

# Create mock training arguments
class TrainingArgs:
    def __init__(self):
        self.query_len = 64
        self.num_reward_tokens = 0
        self.train_on_best_quantile = True

# Create mock dataset
mock_dataset = {
    "train": datasets.Dataset.from_dict({
        "instruction": ["What is 2+2?", "Explain gravity"],
        "input": ["", ""],
        "output": ["4", "Gravity is a force"]
    }),
    "validation": datasets.Dataset.from_dict({
        "instruction": ["Tell a joke"],
        "input": [""],
        "output": ["Why did the chicken cross the road?"]
    })
}

# Patch datasets.load_dataset
original_load_dataset = datasets.load_dataset
datasets.load_dataset = lambda path, name: mock_dataset

ARGS = {
    "tokenizer": StandInTokenizer(),
    "data_args": DataArgs(),
    "training_args": TrainingArgs(),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, numpy, pandas, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
requires_chatml Ran
ran, violated the contract we drafted
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/openai_utils.py
code served (permissive licence) · get_code("9bd28dd37074fcb1")
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 bool, 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

ARGS = {
    "model": "gpt-4-turbo"
}
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 bool, 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
setup Ran
ran, honoured the contract we drafted
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/distributed_utils.py
code served (permissive licence) · get_code("80675b2c65496f66")
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 1, dtype family int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 os
import sys
import torch
import torch.distributed as dist

torch.manual_seed(0)

# Set environment variables to simulate single-process setup
os.environ['LOCAL_RANK'] = '0'
os.environ['WORLD_SIZE'] = '1'

ARGS = {
    'rank': None,
    'world_size': None,
}
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 1, dtype family int — 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
string_to_dict Ran
ran; our contract draft was wrong, not the code
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/openai_utils.py
code served (permissive licence) · get_code("58d5d20497232727")
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 dict. 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

def string_to_dict(to_convert):
    """Converts a string with equal signs to dictionary. E.g.
    >>> string_to_dict(" name=user university=stanford")
    {'name': 'user', 'university': 'stanford'}
    """
    return {s.split('=', 1)[0]: s.split('=', 1)[1] for s in to_convert.split(' ') if len(s) > 0}

ARGS = {
    "to_convert": "name=user university=stanford"
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
make_binary_reward_modeling_data_module Not yet run
unverified (harvested, no recorded run)
simengsun/alpaca_farm_lora/alpaca_farm/src/alpaca_farm/data_utils.py
code served (permissive licence) · get_code("5451705c3c9a6d15")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 10 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 10 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
create_scheduler 4 other papers
4 later
2310.05910 (2023-10)
SALMON: Self-Alignment with Instructable Reward Models
2406.11280 (2024-06)
ISR-DPO: Aligning Large Multimodal Models for Videos by Iterative Self-Retrospective DPO
2406.12030 (2024-06)
SPA-VL: A Comprehensive Safety Preference Alignment Dataset for Vision Language Model
and 1 more not named here
flatten_dict 4 other papers
4 later
2310.11564 (2023-10)
Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging
2402.05133 (2024-02)
Personalized Language Modeling from Personalized Human Feedback
2406.11280 (2024-06)
ISR-DPO: Aligning Large Multimodal Models for Videos by Iterative Self-Retrospective DPO
and 1 more not named here
compute_reward_modeling_metrics 3 other papers
3 later
2310.11564 (2023-10)
Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging
2402.05133 (2024-02)
Personalized Language Modeling from Personalized Human Feedback
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
format_output 3 other papers
3 later
2310.11564 (2023-10)
Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging
2402.05133 (2024-02)
Personalized Language Modeling from Personalized Human Feedback
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
format_prompt_with_data_frame 3 other papers
3 later
2310.11564 (2023-10)
Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging
2402.05133 (2024-02)
Personalized Language Modeling from Personalized Human Feedback
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
let_model_save_mem_when_zero_grad 3 other papers
3 later
2310.11564 (2023-10)
Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging
2402.05133 (2024-02)
Personalized Language Modeling from Personalized Human Feedback
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
get_logger 1 other paper
1 later
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
requires_chatml 1 other paper
1 later
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
setup 1 other paper
1 later
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model Alignment
string_to_dict 1 other paper
1 later
2501.09620 (2025-01)
Beyond Reward Hacking: Causal Rewards for Large Language Model 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-23.

Repositories linked to this paper

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

Abstract

During the last stage of RLHF, a large language model is aligned to human intents via PPO training, a process that generally requires large-scale computational resources. In this technical report, we empirically investigate an efficient implementation of RLHF using low-rank adaptation (LoRA), which allows us to align the LLaMA 7B checkpoint on the Alpaca dataset using only two A100 GPUs instead of the eight required for full model fine-tuning. Despite tuning only 0.2% of LLaMA 7B's parameters, our implementation achieves better performance than the publicly-released AlpacaFarm checkpoint with full model fine-tuning. Next, we analyze several configurations of our LoRA-based PPO implementation, varying the form of the KL regularization term in the training objective. We find that (1) removing this penalty term does not harm performance on the AlpacaFarm evaluation set under our LoRA setup; (2) other regularizers, such as Jensen-Shannon divergence, lead to improved performance; and (3) while PPO training negatively impacts the factuality of model-generated responses, training with LoRA largely mitigates this effect. We release our code and pretrained checkpoints to facilitate future research on more efficient RLHF.

For agents

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

get_harvested_code_for_paper("2309.09055")
get_code_for_paper("2309.09055")
have("2309.09055")

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

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

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

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

Connect an agent — have() is free.