SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.14135 · 2022

FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness

Stefano Ermon, Christopher Ré, Tri Dao, Atri Rudra, Daniel Fu

arXiv · PDF · Open in the Atlas

Code that ran

24 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 17 have no contract verdict; 6 failures of our instrument; 6 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/2205.14135.json · badge: /api/ran/2205.14135.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
google-research/long-range-arena canonical (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
latkins/trifast community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
lucidrains/flash-cosine-sim-attention community
Papers with Code archive
5 ran · 2 no recorded run
lucidrains/block-recurrent-transformer-pytorch community
Papers with Code archive
3 ran · 2 no recorded run
alibaba/megatron-llama community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
FlashCosineSimAttention Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("836e169269626b2d")
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 an instance of its own class, FlashCosineSimAttention: the run constructed the object and did not call it, so no result was computed. 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)

# Mock forward and backward functions since they're not defined
def mock_forward(q, k, v, mask, scale, causal):
    # Returns (output, inv_l, should_backwards)
    batch, seq_len, dim = q.shape
    o = torch.randn(batch, seq_len, dim)
    inv_l = torch.randn(batch, seq_len, 1)
    should_backwards = True
    return o, inv_l, should_backwards

def mock_backward(do, o, inv_l, q, k, v, mask, scale, causal):
    # Returns (dq, dk, dv)
    dq = torch.randn_like(q)
    dk = torch.randn_like(k)
    dv = torch.randn_like(v)
    return dq, dk, dv

# Inject the mock functions into the module
import sys
current_module = sys.modules[__name__]
current_module.forward = mock_forward
current_module.backward = mock_backward

# Create test tensors
batch_size = 2
seq_len_q = 4
seq_len_kv = 4
dim = 3

q = torch.randn(batch_size, seq_len_q, dim, requires_grad=True)
k = torch.randn(batch_size, seq_len_kv, dim, requires_grad=True)
v = torch.randn(batch_size, seq_len_kv, dim, requires_grad=True)
mask = torch.ones(batch_size, seq_len_q, seq_len_kv, dtype=torch.bool)
scale = 1.0 / (dim ** 0.5)
causal = False

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "mask": mask,
    "scale": scale,
    "causal": causal
}
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 FlashCosineSimAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FlashCosineSimAttention 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
FlashSelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
alibaba/megatron-llama/megatron/model/transformer.py
pointer only (licence: NOASSERTION) · get_code("3a48757821245a9c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, alibaba/megatron-llama (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.

and_reduce Ran
ran, violated the contract we drafted
lucidrains/block-recurrent-transformer-pytorch/block_recurrent_transformer_pytorch/block_recurrent_transformer_pytorch.py
code served (permissive licence) · get_code("5e1eae834b42ab87")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 and_reduce takes a List[torch.Tensor] and performs bitwise AND
# reduction across all tensors in the list. It expects torch.Tensor objects
# that support the & operator.

# Create small boolean/integer tensors that support bitwise operations
tensor1 = torch.tensor([[True, False, True, False],
                        [False, True, False, True]], dtype=torch.bool)
tensor2 = torch.tensor([[True, True, False, False],
                        [True, False, True, False]], dtype=torch.bool)
tensor3 = torch.tensor([[True, False, False, True],
                        [False, False, True, True]], dtype=torch.bool)

# Create the list of tensors
tensor_list = [tensor1, tensor2, tensor3]

ARGS = {
    "arr": tensor_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
beartype, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
attention_reference Ran
ran on a synthesized input
latkins/trifast/src/trifast/equiv.py
code served (permissive licence) · get_code("7ec53192aa7f5504")
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 Tensor, ndim 5, dtype family float, shape (2, 3, 4, 4, 5) 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
from jaxtyping import Bool, Float

torch.manual_seed(0)

# Define dimensions
b = 2  # batch size
h = 3  # num heads
n = 4  # sequence length
d = 5  # head dimension

# Construct q, k, v tensors with shape 'b h n n d'
q = torch.randn(b, h, n, n, d, dtype=torch.float32)
k = torch.randn(b, h, n, n, d, dtype=torch.float32)
v = torch.randn(b, h, n, n, d, dtype=torch.float32)

# Construct bias tensor with shape 'b h n n'
bias = torch.randn(b, h, n, n, dtype=torch.float32)

# Construct mask tensor with shape 'b n n' (boolean)
# All True mask to allow all positions
mask = torch.ones(b, n, n, dtype=torch.bool)

ARGS = {
    'q': q,
    'k': k,
    'v': v,
    'bias': bias,
    'mask': mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, jaxtyping, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 3, 4, 4, 5) — shape (2, 3, 4, 4, 5) 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
create_band_mask_from_inputs Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/models/bigbird/bigbird_attention.py
code served (permissive licence) · get_code("e370fc6ece6221ed")
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 ArrayImpl, ndim 5, dtype family float, shape (2, 1, 4, 4, 9) 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 jax.numpy as jnp

# Set up the arguments for create_band_mask_from_inputs
# The function expects:
# - from_blocked_mask: 3D tensor of shape [batch_size, from_seq_length//from_block_size, from_block_size]
# - to_blocked_mask: 3D tensor of shape [batch_size, to_seq_length//to_block_size, to_block_size]

batch_size = 2
from_block_size = 4
to_block_size = 3

# Create from_blocked_mask with shape [batch_size, num_from_blocks, from_block_size]
# We need enough blocks so that [:, 2:-2] gives us valid slices
# With 8 blocks, 2:-2 gives us blocks 2,3,4,5 (4 blocks)
num_from_blocks = 8
from_blocked_mask = jnp.ones((batch_size, num_from_blocks, from_block_size), dtype=jnp.float32)

# Create to_blocked_mask with shape [batch_size, num_to_blocks, to_block_size]
# We need [:, 1:-3], [:, 2:-2], [:, 3:-1] to all be valid
# With 8 blocks: 1:-3 gives us blocks 1,2,3,4 (4 blocks)
#                2:-2 gives us blocks 2,3,4,5 (4 blocks)
#                3:-1 gives us blocks 3,4,5,6 (4 blocks)
num_to_blocks = 8
to_blocked_mask = jnp.ones((batch_size, num_to_blocks, to_block_size), dtype=jnp.float32)

ARGS = {
    "from_blocked_mask": from_blocked_mask,
    "to_blocked_mask": to_blocked_mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 5, dtype family float, shape (2, 1, 4, 4, 9) — shape (2, 1, 4, 4, 9) 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
disable_tf32 Ran
ran on a synthesized input
latkins/trifast/src/trifast/utils.py
code served (permissive licence) · get_code("e70a5be792d21381")
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 torch.nn as nn
from functools import wraps

torch.manual_seed(0)

def disable_tf32(fn):
    @wraps(fn)
    def wrapped(*args, **kwargs):
        cuda, cudnn = (torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32)
        torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32 = (False, False)
        try:
            return fn(*args, **kwargs)
        finally:
            torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32 = (cuda, cudnn)
    return wrapped

# Create a simple function to decorate
def simple_compute(x, y):
    """A simple function that performs computation."""
    return x + y

# The decorator takes a function as its parameter
ARGS = {
    'fn': simple_compute
}
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 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
enable_tf32 Ran
ran on a synthesized input
latkins/trifast/src/trifast/utils.py
code served (permissive licence) · get_code("8c357c18a7a5df9f")
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 torch.nn as nn
from functools import wraps

def enable_tf32(fn):
    @wraps(fn)
    def wrapped(*args, **kwargs):
        cuda, cudnn = (torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32)
        torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32 = (True, True)
        try:
            return fn(*args, **kwargs)
        finally:
            torch.backends.cuda.matmul.allow_tf32, torch.backends.cudnn.allow_tf32 = (cuda, cudnn)
    return wrapped


torch.manual_seed(0)


def dummy_function(x, y=5):
    """A simple function to decorate with enable_tf32"""
    return x + y


decorated_fn = enable_tf32(dummy_function)

ARGS = {
    "fn": decorated_fn
}
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 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
flash_cosine_sim_attention Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("445b382660c20892")
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) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 4, 8) 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 math

torch.manual_seed(0)

# Create small tensors for q, k, v
# q: (batch=2, heads=1, seq_len_q=4, dim=8)
# k: (batch=2, heads=1, seq_len_k=5, dim=8)
# v: (batch=2, heads=1, seq_len_k=5, dim=8)
q = torch.randn(2, 1, 4, 8, dtype=torch.float32)
k = torch.randn(2, 1, 5, 8, dtype=torch.float32)
v = torch.randn(2, 1, 5, 8, dtype=torch.float32)

# Create a mask (optional, shape: batch=2, seq_len_k=5)
mask = torch.ones(2, 5, dtype=torch.bool)

# Scale parameter
scale = 8

# Groups parameter
groups = 1

# Causal parameter
causal = False

# L2norm_qk parameter
l2norm_qk = True

# Use triton parameter
use_triton = False

# Sequence parallel parameter
sequence_parallel = True

ARGS = {
    'q': q,
    'k': k,
    'v': v,
    'mask': mask,
    'scale': scale,
    'groups': groups,
    'causal': causal,
    'l2norm_qk': l2norm_qk,
    'use_triton': use_triton,
    'sequence_parallel': sequence_parallel,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
flash_cosine_sim_attention, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 4, 8) — shape (2, 1, 4, 8) 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
gen_tensors Ran
ran on a synthesized input
latkins/trifast/src/trifast/utils.py
code served (permissive licence) · get_code("f6a5967228c7a9d2")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    "n": 4,
    "d": 3,
    "h": 2,
    "use_mask": True,
    "device": torch.device("cpu"),
    "dtype": torch.float32,
    "batch": 2,
    "std": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_tsv_dataset Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/matching/build_vocab.py
code served (permissive licence) · get_code("0d78a4ebde5b96c9")
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 DatasetV1Adapter. 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 tensorflow.compat.v1 as tf
import tempfile
import os

# Disable TF v2 behavior
tf.disable_v2_behavior()

# Create a temporary TSV file with valid data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.tsv")

# Write sample TSV data with 5 columns (label, id1, id2, text1, text2)
with open(temp_file, 'w') as f:
    f.write("pos\tid_001\tid_002\tthis is text one\tthis is text two\n")
    f.write("neg\tid_003\tid_004\tanother text sample\tyet another sample\n")

ARGS = {
    'file_path': temp_file,
    'batch_size': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DatasetV1Adapter — a DatasetV1Adapter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatasetV1Adapter 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_tsv_dataset Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/matching/input_pipeline.py
code served (permissive licence) · get_code("64a65eaa8e65ea8c")
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 DatasetV1Adapter. 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 tensorflow.compat.v1 as tf
import tempfile
import os

# Disable TF v2 behavior
tf.disable_v2_behavior()

# Create a temporary TSV file with test data
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, "test_data.tsv")

# Write sample TSV data with tab-delimited values
# Format: label\tid1\tid2\ttext1\ttext2
with open(file_path, 'w') as f:
    f.write("0.5\tid_1\tid_2\tsome text\tmore text\n")
    f.write("0.8\tid_3\tid_4\tanother text\tdifferent text\n")
    f.write("0.2\tid_5\tid_6\thello world\tgoodbye world\n")

batch_size = 2

ARGS = {
    'file_path': file_path,
    'batch_size': batch_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DatasetV1Adapter — a DatasetV1Adapter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatasetV1Adapter 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
grouped_l2norm Ran
ran; our contract draft was wrong, not the code
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("bf71ddb7b6318152")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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.functional as F

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch=2, features=4)
# This will be reshaped internally based on groups parameter
t = torch.randn(2, 4)

# Define ARGS dict with all parameters for grouped_l2norm
ARGS = {
    "t": t,
    "groups": 1
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
l2norm Ran
ran; our contract draft was wrong, not the code
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("ebc7297040578822")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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.functional as F

torch.manual_seed(0)

# Create a small tensor for testing
# The function expects a tensor with shape (..., dim) where it normalizes along the last dimension
# Let's use shape (2, 4) - batch of 2, dimension 4
t = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    "t": t
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
l2norm_cpu Ran
ran; our contract draft was wrong, not the code
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("ccb62a80e7c1e0af")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 l2norm_cpu takes a tensor t and normalizes it along the last dimension
# It computes the L2 norm, clamps it to avoid division by zero, and divides the tensor by the norm

# Create a small tensor with shape (2, 4) - batch size 2, feature dimension 4
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
neg_inf Ran
ran on a synthesized input
latkins/trifast/src/trifast/equiv.py
code served (permissive licence) · get_code("dfce9c8c32b2f721")
How it ran

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

import torch

torch.manual_seed(0)

# The function takes a dtype parameter and calls torch.finfo(dtype).min
# So we need to provide a valid torch dtype

ARGS = {
    "dtype": torch.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
once Ran
ran; our contract draft was wrong, not the code
lucidrains/block-recurrent-transformer-pytorch/block_recurrent_transformer_pytorch/block_recurrent_transformer_pytorch.py
code served (permissive licence) · get_code("2ae574072ec6f776")
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 functools

def once(fn):
    called = False

    @functools.wraps(fn)
    def inner(x):
        nonlocal called
        if called:
            return
        called = True
        return fn(x)
    return inner

# Create a simple test function to pass to once
def sample_fn(x):
    return x * 2

ARGS = {
    "fn": sample_fn
}
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 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
parse_int_list Ran
ran on a synthesized input
latkins/trifast/src/trifast/tune.py
code served (permissive licence) · get_code("405da6c9ec4f68dd")
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 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 argparse

def parse_int_list(value: str) -> list[int]:
    try:
        return [int(x.strip()) for x in value.split(',')]
    except ValueError:
        raise argparse.ArgumentTypeError('Invalid format. Please provide comma-separated integers (e.g., "256,512,1024")')

ARGS = {
    'value': '256,512,1024'
}
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 list, ndim 1, dtype family int — 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
preprocess_dataset Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/listops/input_pipeline.py
code served (permissive licence) · get_code("59e4e06672a6c268")
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 DatasetV1Adapter. 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 tensorflow.compat.v1 as tf
import tempfile
import os

# Disable v2 behavior for compatibility
tf.disable_v2_behavior()

# Create a temporary TSV file with sample data
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, "sample_data.tsv")

# Write sample TSV data with Source and Target columns
with open(file_path, 'w') as f:
    f.write("Source\tTarget\n")
    f.write("hello [world]\t1\n")
    f.write("test (data)\t2\n")
    f.write("sample ]bracket]\t3\n")

ARGS = {
    'file_path': file_path,
    'batch_size': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DatasetV1Adapter — a DatasetV1Adapter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatasetV1Adapter 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
rename_close_brackets Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/listops/input_pipeline.py
code served (permissive licence) · get_code("1affbc4020c2fc7b")
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 tensorflow.compat.v1 as tf

# Disable TF v2 behavior to use v1 API
tf.disable_v2_behavior()

# Create a simple dictionary with 'Source' and 'Target' keys
# The function expects x to be a dict with these keys containing string tensors
source_string = tf.constant(['hello]world(test)', 'foo]bar(baz)'])
target_string = tf.constant(['output1', 'output2'])

x = {
    'Source': source_string,
    'Target': target_string
}

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
sinusoidal_init Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/models/layers/common_layers.py
code served (permissive licence) · get_code("60bb0fb77bbdfb3e")
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 jax.numpy as jnp
import numpy as np

def sinusoidal_init(max_len=2048):
    """1D Sinusoidal Position Embedding Initializer.

  Args:
      max_len: maximum possible length for the input

  Returns:
      output: init function returning `(1, max_len, d_feature)`
  """

    def init(key, shape, dtype=np.float32):
        """Sinusoidal init."""
        del key, dtype
        d_feature = shape[-1]
        pe = np.zeros((max_len, d_feature), dtype=np.float32)
        position = np.arange(0, max_len)[:, np.newaxis]
        div_term = np.exp(np.arange(0, d_feature, 2) * -(np.log(10000.0) / d_feature))
        pe[:, 0::2] = np.sin(position * div_term)
        pe[:, 1::2] = np.cos(position * div_term)
        pe = pe[np.newaxis, :, :]
        return jnp.array(pe)
    return init


ARGS = {
    "max_len": 128
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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
triangle_attention_simple Ran
ran on a synthesized input
latkins/trifast/src/trifast/equiv.py
code served (permissive licence) · get_code("1b603b0ef7263401")
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 Tensor, ndim 5, dtype family float, shape (2, 3, 4, 4, 6) 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
from jaxtyping import Bool, Float

torch.manual_seed(0)

# Define dimensions
batch = 2
heads = 3
n = 4
k_dim = 5
d = 6

# q: '... h n n d'
# Shape: (batch, heads, n, n, d)
q = torch.randn(batch, heads, n, n, d)

# k: '... h n n d'
# Shape: (batch, heads, n, n, d)
k = torch.randn(batch, heads, n, n, d)

# v: '... h n n d'
# Shape: (batch, heads, n, n, d)
v = torch.randn(batch, heads, n, n, d)

# bias: '... h n m'
# Shape: (batch, heads, n, n)
bias = torch.randn(batch, heads, n, n)

# mask: '... n m'
# Shape: (batch, n, n)
# Boolean mask where True indicates positions to mask (set to -inf)
mask = torch.zeros(batch, n, n, dtype=torch.bool)

ARGS = {
    'q': q,
    'k': k,
    'v': v,
    'bias': bias,
    'mask': mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, jaxtyping, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 3, 4, 4, 6) — shape (2, 3, 4, 4, 6) 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
unpack_one Ran
ran; our contract draft was wrong, not the code
lucidrains/block-recurrent-transformer-pytorch/block_recurrent_transformer_pytorch/block_recurrent_transformer_pytorch.py
code served (permissive licence) · get_code("a0902e24bf5299e7")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 einops import rearrange, repeat, pack, unpack

torch.manual_seed(0)

# unpack_one takes three parameters: t (tensor), ps (packed shapes), and pattern (string)
# Looking at the function body, it calls unpack(t, ps, pattern)[0]
# unpack is from einops and expects:
# - t: a tensor to unpack
# - ps: a list of shapes (from a previous pack operation)
# - pattern: a string describing the packing pattern

# Create a small tensor
t_original = torch.randn(2, 4, 3)

# Pack it to get the packed tensor and packed shapes
packed_t, ps = pack([torch.randn(2, 4), torch.randn(2, 3)], 'batch *')

# Define the pattern used for packing
pattern = 'batch *'

ARGS = {
    't': packed_t,
    'ps': ps,
    'pattern': pattern
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
valid_dtypes Ran
ran on a synthesized input
latkins/trifast/src/trifast/tune.py
code served (permissive licence) · get_code("7f47b6e7368cff8b")
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 argparse

torch.manual_seed(0)

# The function takes a single parameter: value (a string)
# It parses comma-separated dtype names and returns a list of torch.dtype objects

ARGS = {
    'value': 'float32,bfloat16'
}
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 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
whitespace_tokenize Ran
ran on a synthesized input
google-research/long-range-arena/lra_benchmarks/matching/build_vocab.py
code served (permissive licence) · get_code("fbeafd410f521a6f")
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

def whitespace_tokenize(text):
    """Splits an input into tokens by whitespace."""
    return text.strip().split()

ARGS = {
    "text": "hello world this is a test"
}
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 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
Attend Not yet run
unverified (harvested, no recorded run)
lucidrains/block-recurrent-transformer-pytorch/block_recurrent_transformer_pytorch/block_recurrent_transformer_pytorch.py
code served (permissive licence) · get_code("a91304b317adcfe6")
How it ran

no invocation recorded.

create_rand_mask_from_inputs Not yet run
unverified (harvested, no recorded run)
google-research/long-range-arena/lra_benchmarks/models/bigbird/bigbird_attention.py
code served (permissive licence) · get_code("5aedb376f0772dfe")
How it ran

no invocation recorded.

flash_cosine_sim_attention_cpu Not yet run
unverified (harvested, no recorded run)
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("69095fe94801bb6a")
How it ran

no invocation recorded.

get_block_rand_mask Not yet run
unverified (harvested, no recorded run)
google-research/long-range-arena/lra_benchmarks/models/bigbird/bigbird_attention.py
code served (permissive licence) · get_code("5e965cd1402c118a")
How it ran

no invocation recorded.

l2norm_tensors Not yet run
unverified (harvested, no recorded run)
lucidrains/flash-cosine-sim-attention/flash_cosine_sim_attention/flash_cosine_sim_attention.py
code served (permissive licence) · get_code("518990c8ea44ffc6")
How it ran

no invocation recorded.

pack_one Not yet run
unverified (harvested, no recorded run)
lucidrains/block-recurrent-transformer-pytorch/block_recurrent_transformer_pytorch/block_recurrent_transformer_pytorch.py
code served (permissive licence) · get_code("86ca4a3f9ab20a35")
How it ran

no invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 25 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
once
brick of this paper's assembly: helper
19 other papers
3 dated earlier, 16 later · 4 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2202.01855 (2022-02)
Self-Supervised Learning with Random-Projection Quantizer for Speech Recognition
2203.07852 (2022-03)
Block-Recurrent Transformers
and 16 more not named here
pack_one
brick of this paper's assembly: helper
16 other papers
1 dated earlier, 15 later · 4 only as an assembly brick
2203.07852 (2022-03)
Block-Recurrent Transformers
2206.11990 (2022-06)
Equiformer: Equivariant Graph Attention Transformer for 3D Atomistic Graphs
2302.01327 (2023-02)
Dual PatchNorm
and 13 more not named here
unpack_one
brick of this paper's assembly: helper
11 other papers
1 dated earlier, 10 later · 4 only as an assembly brick
2203.07852 (2022-03)
Block-Recurrent Transformers
2206.11990 (2022-06)
Equiformer: Equivariant Graph Attention Transformer for 3D Atomistic Graphs
2302.03655 (2023-02)
Reducing SO(3) Convolutions to SO(2) for Efficient Equivariant GNNs
and 8 more not named here
Attend
brick of this paper's assembly: entry
1 other paper
1 dated earlier · 1 only as an assembly brick
2203.07852 (2022-03)
Block-Recurrent Transformers
and_reduce
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2203.07852 (2022-03)
Block-Recurrent Transformers

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

Transformers are slow and memory-hungry on long sequences, since the time and memory complexity of self-attention are quadratic in sequence length. Approximate attention methods have attempted to address this problem by trading off model quality to reduce the compute complexity, but often do not achieve wall-clock speedup. We argue that a missing principle is making attention algorithms IOaware-accounting for reads and writes between levels of GPU memory. We propose FlashAttention, an IO-aware exact attention algorithm that uses tiling to reduce the number of memory reads/writes between GPU high bandwidth memory (HBM) and GPU on-chip SRAM. We analyze the IO complexity of FlashAttention, showing that it requires fewer HBM accesses than standard attention, and is optimal for a range of SRAM sizes. We also extend FlashAttention to block-sparse attention, yielding an approximate attention algorithm that is faster than any existing approximate attention method. FlashAttention trains Transformers faster than existing baselines: 15% end-to-end wall-clock speedup on BERT-large (seq. length 512) compared to the MLPerf 1.1 training speed record, 3× speedup on GPT-2 (seq. length 1K), and 2.4× speedup on long-range arena (seq. length 1K-4K). FlashAttention and block-sparse FlashAttention enable longer context in Transformers, yielding higher quality models (0.7 better perplexity on GPT-2 and 6.4 points of lift on long-document classification) and entirely new capabilities: the first Transformers to achieve better-than-chance performance on the Path-X challenge (seq. length 16K, 61.4% accuracy) and Path-256 (seq. length 64K, 63.1% accuracy).

For agents

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

get_harvested_code_for_paper("2205.14135")
get_code_for_paper("2205.14135")
have("2205.14135")

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

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

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

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

Connect an agent — have() is free.