SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.12854 · 2024

Scaling Retrieval-Based Language Models with a Trillion-Token Datastore

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 11 failures of our instrument; 1 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/2407.12854.json · badge: /api/ran/2407.12854.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
rulinshao/retrieval-scaling canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
add_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rulinshao/retrieval-scaling/contriever/passage_retrieval.py
pointer only (licence: MIT); the stored copy get_code serves, from FenQQQ/Fusion-in-decoder, is pointer only (licence: NOASSERTION) · get_code("bc7a7a194c238080")
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 FenQQQ/Fusion-in-decoder, 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.

check_below_lexical_overlap_threshold Ran
ran, violated the contract we drafted
rulinshao/retrieval-scaling/src/decontamination.py
code served (permissive licence) · get_code("ce1279ff0f9d0ad4")
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 numpy as np

# Analyze the function to understand what parameters are needed
# check_below_lexical_overlap_threshold(doc, gold_text, threshold=0.25, mode='longest')

# The function takes:
# - doc: a string (text document)
# - gold_text: a string (reference text)
# - threshold: a float between 0 and 1 (default 0.25)
# - mode: a string, either 'longest' or 'jaccard' (default 'longest')

# Create test data
doc = "the quick brown fox jumps over the lazy dog and runs through the forest"
gold_text = "the quick brown fox jumps over the lazy dog"

ARGS = {
    'doc': doc,
    'gold_text': gold_text,
    'threshold': 0.25,
    'mode': 'longest'
}
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 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
check_endpoint Ran
ran, violated the contract we drafted
rulinshao/retrieval-scaling/api/serve_main_node.py
code served (permissive licence) · get_code("afaf6b8bca6e2795")
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 requests
from unittest.mock import Mock, patch

# The function check_endpoint takes a single parameter: endpoint
# It constructs a URL and makes an HTTP POST request to that endpoint
# Since we cannot make real network requests, we need to mock the requests.post call
# or provide a valid endpoint string that the function can attempt to call

# For this setup, we'll create a mock endpoint string
# The function will attempt to POST to it, but since we're in a sandbox,
# we need to ensure the function can be called with valid arguments

endpoint = "localhost:8000/api"

ARGS = {
    "endpoint": endpoint
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
requests — 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
extract_answer Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/evaluate_perplexity.py
code served (permissive licence) · get_code("290c5134d15244b3")
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

torch.manual_seed(0)

# The function takes two string parameters and performs string operations on them
# raw_inputs: a string that may contain '<|endoftext|>' tokens
# raw_query: a string that may contain '<|endoftext|>' tokens

raw_inputs_value = "This is some text <|endoftext|> with the query inside it"
raw_query_value = "the query"

ARGS = {
    "raw_inputs": raw_inputs_value,
    "raw_query": raw_query_value
}
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
extract_running_endpoints Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/api/serve_main_node.py
code served (permissive licence) · get_code("24e1876e4b2645ed")
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 list, ndim 1, 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 json
import tempfile
import os

# Create a temporary JSONL file with mock endpoint data
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, 'running_ports_massiveds.jsonl')

# Write 13 unique endpoints to the file (matching the assertion in the function)
with open(file_path, 'w') as f:
    for i in range(13):
        data = {
            'endpoint': f'localhost:{8000 + i}',
            'domain_name': f'domain_{i % 3}',
            'chunk_id': i % 5
        }
        f.write(json.dumps(data) + '\n')

ARGS = {
    'file_path': file_path,
    'check_endpoint_before_return': False,
    'remove_invalid_endpoints_after_check': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
requests — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
generate_13word_grams Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/decontamination.py
code served (permissive licence) · get_code("e199a8fd8e8c353f")
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 set. 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

torch.manual_seed(0)

text = "the quick brown fox jumps over the lazy dog and the cat sat on the mat with the bird flying high above"

ARGS = {
    "text": text
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
get_bm25_index_dir Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/index.py
code served (permissive licence) · get_code("71b717cfe94bf7d2")
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 os

class MockConfig:
    def __init__(self):
        self.datastore = MockDatastore()

class MockDatastore:
    def __init__(self):
        self.embedding = MockEmbedding()

class MockEmbedding:
    def __init__(self):
        self.passages_dir = "/tmp/passages"

cfg = MockConfig()
index_shard_ids_list = [0, 1, 2]

ARGS = {
    "cfg": cfg,
    "index_shard_ids_list": index_shard_ids_list,
}
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
get_search_output_path Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/search.py
code served (permissive licence) · get_code("ab7ba9276e2369aa")
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 os
from unittest.mock import MagicMock

class EvalConfig:
    def __init__(self):
        self.eval_output_dir = "/tmp/eval_output"
        self.data = MagicMock()
        self.data.eval_data = "eval_data.jsonl"

class Config:
    def __init__(self):
        self.evaluation = EvalConfig()

cfg = Config()
index_shard_ids = [0, 1, 2]

ARGS = {
    "cfg": cfg,
    "index_shard_ids": index_shard_ids
}
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
get_sharded_passages Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/embed.py
code served (permissive licence) · get_code("00dd34a32eb05634")
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 list, ndim 1, 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 numpy as np

# Create a small stand-in class for args
class ArgsConfig:
    def __init__(self, num_shards, shard_id):
        self.num_shards = num_shards
        self.shard_id = shard_id

# Create sample passages (list of strings or dicts)
all_passages = [
    {"id": i, "text": f"passage_{i}"} 
    for i in range(100)
]

# Create args with specific shard configuration
args = ArgsConfig(num_shards=4, shard_id=1)

# Define ARGS dict with all parameters
ARGS = {
    "args": args,
    "all_passages": all_passages
}
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 list, ndim 1, dtype family float — a list 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
hydra_runner Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/src/hydra_runner.py
code served (permissive licence) · get_code("5cbcb4692500af92")
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 function. 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 functools
import os
import sys
from typing import Any, Callable, Optional
from hydra._internal.utils import _run_hydra, get_args_parser
from hydra.core.config_store import ConfigStore
from hydra.types import TaskFunction
from omegaconf import DictConfig, OmegaConf


# Define a simple task function to use with the decorator
def simple_task(cfg: DictConfig) -> Any:
    """A simple task function for testing."""
    return cfg


# Define a simple schema class for structured config
class SimpleSchema:
    """A minimal structured config schema."""
    learning_rate: float = 0.001
    batch_size: int = 32
    model_name: str = "test_model"


ARGS = {
    'config_path': '.',
    'config_name': 'config',
    'schema': SimpleSchema,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
hydra, omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
max_contiguous_overlap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rulinshao/retrieval-scaling/src/decontamination.py
code served (permissive licence) · get_code("87bbb67c9c88bea4")
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 int, ndim 0, dtype family int, 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 numpy

torch.manual_seed(0)

# The function max_contiguous_overlap takes two lists and finds the maximum
# length of contiguous overlapping sequences where elements match.
# It compares elements directly using ==, so we can use lists of integers, strings, etc.

list1 = [1, 2, 3, 4, 5]
list2 = [3, 4, 5, 6, 7]

ARGS = {
    "list1": list1,
    "list2": list2
}
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 int, ndim 0, dtype family int, 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
rerank_elements Ran
ran; our contract draft was wrong, not the code
rulinshao/retrieval-scaling/api/serve_main_node.py
code served (permissive licence) · get_code("d2a9c470a304b933")
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

torch.manual_seed(0)

# Construct element_list with multiple elements, each containing IDs, passages, and scores
# Using batch_size=2 as an example

element_list = [
    {
        'IDs': [['doc1', 'doc2'], ['doc3', 'doc4']],
        'passages': [['passage about cats', 'passage about dogs'], ['passage about birds', 'passage about fish']],
        'scores': [[0.9, 0.7], [0.8, 0.6]]
    },
    {
        'IDs': [['doc5', 'doc6'], ['doc7', 'doc8']],
        'passages': [['passage about trees', 'passage about flowers'], ['passage about mountains', 'passage about rivers']],
        'scores': [[0.85, 0.75], [0.95, 0.65]]
    },
    {
        'IDs': [['doc9'], ['doc10']],
        'passages': [['passage about stars'], ['passage about clouds']],
        'scores': [[0.88], [0.92]]
    }
]

k = -1  # Return all results

ARGS = {
    'element_list': element_list,
    'k': k
}
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 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
split_data_into_chunks Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rulinshao/retrieval-scaling/src/data.py
code served (permissive licence) · get_code("7b2c46dc9de9bec4")
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 list, ndim 1, 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 numpy as np

# Set seed for reproducibility
torch.manual_seed(0)

# Construct valid arguments for split_data_into_chunks
ARGS = {
    'text': 'the quick brown fox jumps over the lazy dog and then runs through the forest with great speed',
    'chunk_sz': 3,
    'min_chunk_sz': 2,
    'keep_last': True,
    'chunking_strategy': 'fixed_size'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, semantic_text_splitter, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
load_passages Not yet run
unverified (harvested, no recorded run)
rulinshao/retrieval-scaling/src/data.py
code served (permissive licence) · get_code("97e49e2086fde576")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 12 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
add_embeddings 6 other papers
4 dated earlier, 2 later
2012.04584 (2020-12)
Distilling Knowledge from Reader to Retriever for Question Answering
2311.09805 (2023-11)
DocMath-Eval: Evaluating Math Reasoning Capabilities of LLMs in Understanding Long and Specialized Documents
2401.16979 (2024-01)
Re3val: Reinforced and Reranked Generative Retrieval
and 3 more not named here
hydra_runner 2 other papers
1 dated earlier, 1 later
2304.06795 (2023-04)
Efficient Sequence Transduction by Jointly Predicting Tokens and Durations
2025.naacl-long.298 (2025 (year only))
VoiceTextBlender: Augmenting Large Language Models with Speech Capabilities via Single-Stage Joint Speech-Text Supervised Fine-Tuning

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

Scaling laws with respect to the amount of training data and the number of parameters allow us to predict the cost-benefit trade-offs of pretraining language models (LMs) in different configurations. In this paper, we consider another dimension of scaling: the amount of data available at inference time. Specifically, we find that increasing the size of the datastore used by a retrieval-based LM monotonically improves language modeling and several downstream tasks without obvious saturation, such that a smaller model augmented with a large datastore outperforms a larger LM-only model on knowledge-intensive tasks. By plotting compute-optimal scaling curves with varied datastore, model, and pretraining data sizes, we show that using larger datastores can significantly improve model performance for the same training compute budget. We carry out our study by constructing a 1.4 trillion-token datastore named MassiveDS, which is the largest and the most diverse open-sourced datastore for retrieval-based LMs to date, and designing an efficient pipeline for studying datastore scaling in a computationally accessible manner. Finally, we analyze the effect of improving the retriever, datastore quality filtering, and other design choices on our observed scaling trends. Overall, our results show that datastore size should be considered as an integral part of LM efficiency and performance trade-offs. To facilitate future research, we open-source our datastore and code at https://github.com/RulinShao/retrieval-scaling.

For agents

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

get_harvested_code_for_paper("2407.12854")
get_code_for_paper("2407.12854")
have("2407.12854")

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

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

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

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

Connect an agent — have() is free.