SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.12517 · CVPR · 2023

FFCV: Accelerating Training by Removing Data Bottlenecks

Guillaume Leclerc, Logan Engstrom, Andrew Ilyas, Aleksander Ądry, Hadi Salman, Sung Park

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 0 honoured the contract we drafted, 1 violated it and 6 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2306.12517.json · badge: /api/ran/2306.12517.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
libffcv/ffcv community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
align_to_page Ran
ran on a synthesized input
libffcv/ffcv/ffcv/utils.py
code served (permissive licence) · get_code("ac8f88c5ed1a7e4e")
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

torch.manual_seed(0)

# The function align_to_page takes two parameters:
# - ptr: an integer representing a pointer/address
# - page_size: an integer representing the page size
# The function aligns a pointer to the next page boundary

ARGS = {
    "ptr": 1000,
    "page_size": 256
}
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 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
benchmark Ran
ran on a synthesized input
libffcv/ffcv/ffcv/benchmarks/decorator.py
code served (permissive licence) · get_code("fa27dedd4c856c14")
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 torch
import numpy as np
from itertools import product

torch.manual_seed(0)

# The benchmark function takes arg_values as a dict
# where keys are parameter names and values are iterables of argument options
# It creates a product of all combinations and wraps a class decorator

# Example: we want to benchmark different configurations
# Let's create a simple test class that the decorator would wrap
class SimpleBenchmarkClass:
    def __init__(self, learning_rate, batch_size, model_dim):
        self.learning_rate = learning_rate
        self.batch_size = batch_size
        self.model_dim = model_dim

# Define the arg_values dict with different parameter options to benchmark
ARGS = {
    "arg_values": {
        "learning_rate": [0.001, 0.01],
        "batch_size": [2, 4],
        "model_dim": [8, 16]
    }
}
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 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
count_samples_in_shard Ran
ran on a synthesized input
libffcv/ffcv/ffcv/writer.py
code served (permissive licence) · get_code("9f1865dbe4eaa56f")
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 as np
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock shard - this would normally be a path to a tar/wds file
shard = "mock_shard_path"

# Create a mock pipeline that processes datasets
# The pipeline is called with a dataset and returns a processed dataset
def pipeline(dataset):
    # The pipeline receives a WebDataset and returns an iterable
    # We need to return something that can be iterated over
    return dataset

# We need to mock WebDataset to return an iterable with a few samples
class MockWebDataset:
    def __init__(self, shard):
        self.shard = shard
        # Return a few mock samples when iterated
        self.samples = [
            {"__key__": "sample_0", "jpg": b"fake_image_0", "json": b'{"label": 0}'},
            {"__key__": "sample_1", "jpg": b"fake_image_1", "json": b'{"label": 1}'},
            {"__key__": "sample_2", "jpg": b"fake_image_2", "json": b'{"label": 2}'},
        ]
    
    def __iter__(self):
        return iter(self.samples)

# Monkey-patch webdataset.WebDataset for testing
import sys
from unittest.mock import MagicMock

webdataset_mock = MagicMock()
webdataset_mock.WebDataset = MockWebDataset
sys.modules['webdataset'] = webdataset_mock

ARGS = {
    "shard": "mock_shard_path",
    "pipeline": lambda dataset: dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, webdataset — 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
decode_null_terminated_string Ran
ran on a synthesized input
libffcv/ffcv/ffcv/utils.py
code served (permissive licence) · get_code("ff4894129b57ea47")
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 numpy as np

# Create a numpy array of bytes containing ASCII text with a null terminator
byte_string = b'Hello World\x00Extra data after null'
bytes_array = np.frombuffer(byte_string, dtype=np.uint8)

ARGS = {
    'bytes': bytes_array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
from_shard Ran
ran on a synthesized input
libffcv/ffcv/ffcv/writer.py
code served (permissive licence) · get_code("4b59626add23c6e9")
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 MockWebDataset. 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock WebDataset that the function will instantiate
# We need to mock the webdataset.WebDataset import
import sys
from unittest.mock import patch

# Create a simple mock dataset class
class MockWebDataset:
    def __init__(self, shard):
        self.shard = shard
        self.data = [
            {"input": torch.randn(2, 4), "label": torch.randint(0, 2, (2,))},
            {"input": torch.randn(2, 4), "label": torch.randint(0, 2, (2,))}
        ]
    
    def __iter__(self):
        return iter(self.data)
    
    def __call__(self, *args, **kwargs):
        return self

# Mock the webdataset module
mock_webdataset = MagicMock()
mock_webdataset.WebDataset = MockWebDataset
sys.modules['webdataset'] = mock_webdataset

# Create a simple pipeline function that processes the dataset
def simple_pipeline(dataset):
    """Pipeline that takes a dataset and returns it (or processes it)"""
    # The pipeline is called with the dataset as argument
    # It should return a processed dataset
    return dataset

# Create the shard parameter - just a string path
shard = "mock://dataset-shard-001"

# Create the pipeline parameter - a callable that takes a dataset
pipeline = simple_pipeline

ARGS = {
    "shard": shard,
    "pipeline": pipeline
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, webdataset — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockWebDataset — a MockWebDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockWebDataset 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
is_power_of_2 Ran
ran, violated the contract we drafted
libffcv/ffcv/ffcv/utils.py
code served (permissive licence) · get_code("9760951c9f233ba8")
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

torch.manual_seed(0)

ARGS = {
    "n": 8
}
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
read Ran
ran on a synthesized input
libffcv/ffcv/ffcv/libffcv.py
code served (permissive licence) · get_code("d0961aca2f9c9628")
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; 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 numpy as np
import ctypes
import os

# Create a small numpy array as destination
destination = np.zeros(10, dtype=np.float32)

# Use stdin file descriptor (0) as a valid file number
fileno = 0

# Offset for reading
offset = 0

# Mock the read_c function since it's a C library function
def read_c(fileno, data_ptr, size, offset):
    # This would normally call a C function
    # We'll create a mock that returns a value
    return 0

# Patch it into the module namespace for the read function to find
import sys
current_module = sys.modules[__name__]
current_module.read_c = read_c

ARGS = {
    'fileno': fileno,
    'destination': destination,
    'offset': offset,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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
run_all Not yet run
unverified (harvested, no recorded run)
libffcv/ffcv/ffcv/benchmarks/decorator.py
code served (permissive licence) · get_code("bb327ddf48a3425a")
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, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
is_power_of_2 1 other paper
1 later
2406.02528 (2024-06)
Scalable MatMul-free Language Modeling

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-24.

Repositories linked to this paper

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

Abstract

We present FFCV, a library for easy and fast machine learning model training. FFCV speeds up model training by eliminating (often subtle) data bottlenecks from the training process. In particular, we combine techniques such as an efficient file storage format, caching, data pre-loading, asynchronous data transfer, and just-in-time compilation to (a) make data loading and transfer significantly more efficient, ensuring that GPUs can reach full utilization; and (b) offload as much data processing as possible to the CPU asynchronously, freeing GPU cycles for training. Using FFCV, we train ResNet-18 and ResNet-50 on the ImageNet dataset with a state-of-the-art tradeoff between accuracy and training time. For example, across the range of ResNet-50 models we test, we obtain the same accuracy as the best baselines in half the time. We demonstrate FFCV's performance, ease-of-use, extensibility, and ability to adapt to resource constraints through several case studies. Detailed installation instructions, documentation, and Slack support channel are available at https://ffcv.io/.

For agents

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

get_harvested_code_for_paper("2306.12517")
get_code_for_paper("2306.12517")
have("2306.12517")

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

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

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

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

Connect an agent — have() is free.