SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.01889 · 2023

Ring Attention with Blockwise Transformers for Near-Infinite Context

arXiv · PDF · Open in the Atlas

Code that ran

20 of 28 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; 3 honoured the contract we drafted, 4 violated it and 4 have no contract verdict; 9 failures of our instrument; 8 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/2310.01889.json · badge: /api/ran/2310.01889.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
forhaoliu/ringattention canonical (classifier label)
classifier basis: census
1 ran · 2 no recorded run
seongho608/ringformer community (classifier label)
classifier basis not recorded on the link
13 ran · 4 no recorded run
exists-forall/striped_attention extension (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
jzhang38/EasyContext extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
sandai-org/magiattention extension (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
haonan3/anchorcontext extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
below_or_on_diag Ran
ran, violated the contract we drafted
forhaoliu/ringattention/ringattention/ringattention_jax.py
code served (permissive licence) · get_code("7f87411d8cd00fb8")
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 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 jax
import jax.numpy as jnp

# The function takes integer-like arguments that are used in arithmetic operations
# and JAX operations. We need to provide valid values for:
# r, r_blk_size, c, c_blk_size, causal_block_size

# These appear to be block indices and sizes used in attention computation
# Let's use small integer values that make sense for block-based operations

ARGS = {
    "r": jnp.int32(2),           # row block index
    "r_blk_size": jnp.int32(4),  # row block size
    "c": jnp.int32(3),           # column block index
    "c_blk_size": jnp.int32(5),  # column block size
    "causal_block_size": jnp.int32(8),  # causal block size (typically larger)
}
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 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
calc_same_padding Ran
ran, violated the contract we drafted
seongho608/ringformer/conformer/conformer.py
code served (permissive licence) · get_code("a41cb31b42e919b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple, 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.

ARGS = {
    'kernel_size': 5
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
construct_prompt Ran
ran; our contract draft was wrong, not the code
jzhang38/EasyContext/eval_needle.py
code served (permissive licence) · get_code("2e94fa2078ca5f7c")
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 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 numpy as np

np.random.seed(0)

# Analyze the function:
# - tokenized_haystack: list/array of integers, indexed and sliced
# - tokenized_prefix: list/array of integers, concatenated
# - tokenized_postfix: list/array of integers, concatenated
# - tokenized_needle: list/array of integers, concatenated
# - context_length: int, used for slicing
# - tokenized_distractor_list: list of lists/arrays of integers, iterated and concatenated
# - depth: int/float, used in comparison and arithmetic

# Create small token sequences (lists of integers)
tokenized_haystack = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 29889, 110, 111, 112, 113, 114, 115, 116, 117, 118]
tokenized_prefix = [1, 2, 3]
tokenized_postfix = [4, 5, 6]
tokenized_needle = [50, 51, 52]
context_length = 15
tokenized_distractor_list = [
    [200, 201],
    [202, 203, 204],
    [205]
]
depth = 0.5

ARGS = {
    "tokenized_haystack": tokenized_haystack,
    "tokenized_prefix": tokenized_prefix,
    "tokenized_postfix": tokenized_postfix,
    "tokenized_needle": tokenized_needle,
    "context_length": context_length,
    "tokenized_distractor_list": tokenized_distractor_list,
    "depth": depth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
convert_pad_shape Ran
ran, honoured the contract we drafted
seongho608/ringformer/commons.py
pointer only (licence: MIT); the stored copy get_code serves, from isletennos/mmvc_trainer, is pointer only (licence: NONE) · get_code("59ae0708b1e8d94b")
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 isletennos/mmvc_trainer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

default Ran
ran, violated the contract we drafted
seongho608/ringformer/conformer/conformer.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("60fff7c3c400d7ff")
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 ThomasMrY/VCT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

discriminator_loss Ran
ran; our contract draft was wrong, not the code
seongho608/ringformer/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from wxzyd123/pivotal_objective_perturbation, is pointer only (licence: NONE) · get_code("896f7aae82a62114")
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 wxzyd123/pivotal_objective_perturbation, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

exists Ran
ran, violated the contract we drafted
seongho608/ringformer/conformer/conformer.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
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 ThomasMrY/VCT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

feature_loss Ran
ran; our contract draft was wrong, not the code
seongho608/ringformer/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from wxzyd123/pivotal_objective_perturbation, is pointer only (licence: NONE) · get_code("24e8b4731dc3e070")
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 wxzyd123/pivotal_objective_perturbation, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_padding Ran
ran, honoured the contract we drafted
seongho608/ringformer/commons.py
pointer only (licence: MIT); the stored copy get_code serves, from isletennos/mmvc_trainer, is pointer only (licence: NONE) · get_code("a26f85d7c72ef39a")
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 isletennos/mmvc_trainer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

intersperse Ran
ran; our contract draft was wrong, not the code
seongho608/ringformer/commons.py
pointer only (licence: MIT); the stored copy get_code serves, from wxzyd123/pivotal_objective_perturbation, is pointer only (licence: NONE) · get_code("c01a3efb274ff778")
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 wxzyd123/pivotal_objective_perturbation, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

latest_checkpoint_path Ran
ran on a synthesized input
seongho608/ringformer/utils.py
code served (permissive licence) · get_code("79242eb900957f26")
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
import tempfile
import shutil

# Create a temporary directory with checkpoint files
temp_dir = tempfile.mkdtemp()

# Create some dummy checkpoint files matching the pattern
for i in [10, 5, 20]:
    checkpoint_file = os.path.join(temp_dir, f'G_{i}.pth')
    with open(checkpoint_file, 'w') as f:
        f.write('dummy')

ARGS = {
    'dir_path': temp_dir,
    'regex': 'G_*.pth'
}
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
load_checkpoint Ran
ran on a synthesized input
seongho608/ringformer/utils.py
code served (permissive licence) · get_code("2ad367dd5097b12f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family 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 os
import logging
import torch
import torch.nn as nn
import tempfile

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a simple optimizer
model = SimpleModel()
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)

# Create a checkpoint file
checkpoint_dict = {
    'iteration': 100,
    'learning_rate': 0.001,
    'optimizer': optimizer.state_dict(),
    'models': {
        'model': model.state_dict()
    }
}

with tempfile.NamedTemporaryFile(delete=False, suffix='.pt') as f:
    checkpoint_path = f.name
    torch.save(checkpoint_dict, checkpoint_path)

# Create fresh model and optimizer for loading
loaded_model = SimpleModel()
loaded_optimizer = torch.optim.Adam(loaded_model.parameters(), lr=0.001)

ARGS = {
    'checkpoint_path': checkpoint_path,
    'models': loaded_model,
    'optimizer': loaded_optimizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_haystack Ran
ran, honoured the contract we drafted
jzhang38/EasyContext/eval_needle.py
code served (permissive licence) · get_code("83526663aea6f3a5")
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 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 torch
import tempfile
import os

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def encode(self, text):
        # Simple tokenization: split by spaces and return token list
        # Return list of integers to simulate token IDs
        if not text:
            return [0]
        tokens = text.split()
        return list(range(len(tokens))) + [0]  # +[0] for consistency with function's "- 1"

# Create a minimal accelerator stand-in
class MinimalAccelerator:
    def print(self, *args, **kwargs):
        print(*args, **kwargs)

# Create temporary directory with test files
temp_dir = tempfile.mkdtemp()
test_file_1 = os.path.join(temp_dir, "test1.txt")
test_file_2 = os.path.join(temp_dir, "test2.txt")

with open(test_file_1, 'w') as f:
    f.write("hello world this is a test ")

with open(test_file_2, 'w') as f:
    f.write("another file with some content ")

# Create args object
class Args:
    def __init__(self):
        self.haystack_dir = temp_dir
        self.max_context_length = 50

args = Args()
accelerator = MinimalAccelerator()
tokenizer = MinimalTokenizer()

ARGS = {
    'args': args,
    'accelerator': accelerator,
    'tokenizer': tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
new_decoder_forward Ran
ran; our contract draft was wrong, not the code
haonan3/anchorcontext/anchor_context/ulysses_attn/monkey_patch.py
code served (permissive licence) · get_code("8ba2ad2a8cd08a1e")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create minimal mock modules that satisfy the function's usage
class MockLayerNorm(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.weight = nn.Parameter(torch.ones(hidden_size))
        self.bias = nn.Parameter(torch.zeros(hidden_size))
    
    def forward(self, x):
        return x * self.weight + self.bias

class MockSelfAttention(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states, attention_mask=None, position_ids=None, 
                past_key_value=None, output_attentions=False, use_cache=False, 
                cache_position=None, global_position_ids=None, flex_mask=None, **kwargs):
        batch_size, seq_len, hidden_size = hidden_states.shape
        
        # Return (hidden_states, self_attn_weights, present_key_value)
        attn_output = hidden_states
        attn_weights = None
        if output_attentions:
            attn_weights = torch.ones(batch_size, 1, seq_len, seq_len)
        
        present_key_value = None
        if use_cache:
            present_key_value = (torch.zeros(batch_size, 1, seq_len, hidden_size),
                                torch.zeros(batch_size, 1, seq_len, hidden_size))
        
        return attn_output, attn_weights, present_key_value

class MockMLP(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.linear = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, x):
        return self.linear(x)

class MockDecoder(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.input_layernorm = MockLayerNorm(hidden_size)
        self.self_attn = MockSelfAttention(hidden_size)
        self.post_attention_layernorm = MockLayerNorm(hidden_size)
        self.mlp = MockMLP(hidden_size)
    
    def forward(self, hidden_states, attention_mask=None, position_ids=None, 
                past_key_value=None, output_attentions=False, use_cache=False, 
                cache_position=None, global_position_ids=None, flex_mask=None, **kwargs):
        return new_decoder_forward(self, hidden_states, attention_mask, position_ids,
                                   past_key_value, output_attentions, use_cache,
                                   cache_position, global_position_ids, flex_mask, **kwargs)

def new_decoder_forward(self, hidden_states: torch.Tensor, attention_mask=None, position_ids=None, 
                       past_key_value=None, output_attentions=False, use_cache=False, 
                       cache_position=None, global_position_ids=None, flex_mask=None, **kwargs):
    if 'padding_mask' in kwargs:
        warnings.warn('Passing `padding_mask` is deprecated and will be removed in v4.37. Please make sure use `attention_mask` instead.`')
    residual = hidden_states
    hidden_states = self.input_layernorm(hidden_states)
    hidden_states, self_attn_weights, present_key_value = self.self_attn(hidden_states=hidden_states, attention_mask=attention_mask, position_ids=position_ids, past_key_value=past_key_value, output_attentions=output_attentions, use_cache=use_cache, cache_position=cache_position, global_position_ids=global_position_ids, flex_mask=flex_mask, **kwargs)
    hidden_states = residual + hidden_states
    residual = hidden_states
    hidden_states = self.post_attention_layernorm(hidden_states)
    hidden_states = self.mlp(hidden_states)
    hidden_states = residual + hidden_states
    outputs = (hidden_states,)
    if output_attentions:
        outputs += (self_attn_weights,)
    if use_cache:
        outputs += (present_key_value,)
    return outputs

import warnings

# Create decoder instance
hidden_size = 4
decoder = MockDecoder(hidden_size)

# Create arguments
ARGS = {
    'self': decoder,
    'hidden_states': torch.randn(2, 3, hidden_size),
    'attention_mask': torch.ones(2, 1, 3, 3),
    'position_ids': torch.arange(3).unsqueeze(0).expand(2, -1),
    'past_key_value': None,
    'output_attentions': False,
    'use_cache': False,
    'cache_position': torch.arange(3),
    'global_position_ids': None,
    'flex_mask': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
permute_tokens Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
exists-forall/striped_attention/bpt.py
code served (permissive licence) · get_code("5bc133115aa98fa4")
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 2, dtype family float, shape (2, 12) 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 einops import rearrange

torch.manual_seed(0)

# Construct arguments for permute_tokens function
attention_type = 'striped'
tokens = torch.randn(2, 12)  # batch=2, (n*d)=12 where n=3, d=4
num_devices = 4

ARGS = {
    'attention_type': attention_type,
    'tokens': tokens,
    'num_devices': num_devices
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, 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, 12) — shape (2, 12) 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
phase_loss Ran
ran on a synthesized input
seongho608/ringformer/losses.py
code served (permissive licence) · get_code("9543346026e2f58e")
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 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)

# Create small complex-valued FFT tensors
# x_fft: shape (2, 4) - batch of 2, 4 frequency components
x_fft = torch.randn(2, 4, dtype=torch.complex64)

# g_fft: shape (2, 4) - batch of 2, 4 frequency components
g_fft = torch.randn(2, 4, dtype=torch.complex64)

# reduction mode
reduction = 'mean'

ARGS = {
    'x_fft': x_fft,
    'g_fft': g_fft,
    'reduction': reduction,
}
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 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
reorder_before_reduce_scatter Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sandai-org/magiattention/exps/dist_attn/baselines/ring_attn.py
code served (permissive licence) · get_code("50fa7e0250016b3d")
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 3, dtype family float, shape (2, 4, 3) 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)

# Create input tensor with shape (batch=2, dim1=4, dim2=3)
# This represents data that will be reordered
input_tensor = torch.randn(2, 4, 3)

# Create total_indices tensor with shape (2,)
# These are indices used to gather/reorder the first dimension of input
total_indices = torch.tensor([1, 0], dtype=torch.long)

ARGS = {
    "input": input_tensor,
    "total_indices": total_indices,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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
scan_checkpoint Ran
ran on a synthesized input
seongho608/ringformer/utils.py
code served (permissive licence) · get_code("492b11f3eb615458")
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 os
import tempfile
import glob

# Create a temporary directory with some checkpoint files for testing
temp_dir = tempfile.mkdtemp()

# Create some dummy checkpoint files with numeric patterns
checkpoint_files = [
    os.path.join(temp_dir, "checkpoint_1.pt"),
    os.path.join(temp_dir, "checkpoint_10.pt"),
    os.path.join(temp_dir, "checkpoint_2.pt"),
]

for f in checkpoint_files:
    with open(f, 'w') as file:
        file.write("dummy checkpoint")

# Define arguments for scan_checkpoint function
ARGS = {
    "dir_path": temp_dir,
    "regex": "checkpoint_*.pt"
}
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 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
unconstrained_rational_quadratic_spline Ran
ran; our contract draft was wrong, not the code
seongho608/ringformer/transforms.py
pointer only (licence: MIT); the stored copy get_code serves, from hayeong0/Diff-HierVC, is pointer only (licence: NONE) · get_code("70a7614b3b3eb41f")
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 hayeong0/Diff-HierVC, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

unpermute_outputs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
exists-forall/striped_attention/bpt.py
code served (permissive licence) · get_code("987eb0efeb759f2b")
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 3, dtype family float, shape (2, 12, 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 einops import rearrange

torch.manual_seed(0)

# For 'striped' attention type, the function rearranges outputs
# from shape 'b (d n) x' to 'b (n d) x' where d=num_devices
# So we need outputs with shape (batch, d*n, x) where batch=2, d=num_devices, n=some_value, x=some_value

batch_size = 2
num_devices = 3
n = 4
x_dim = 5

# Create outputs tensor with shape (batch, d*n, x) = (2, 12, 5)
outputs = torch.randn(batch_size, num_devices * n, x_dim)

ARGS = {
    'attention_type': 'striped',
    'outputs': outputs,
    'num_devices': num_devices
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 12, 5) — shape (2, 12, 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
generate_cu_seqlens_kv_ag_causal Not yet run
unverified (harvested, no recorded run)
sandai-org/magiattention/exps/dist_attn/baselines/ring_attn.py
code served (permissive licence) · get_code("24313489651a82bb")
How it ran

no invocation recorded.

piecewise_rational_quadratic_transform Not yet run
unverified (harvested, no recorded run)
seongho608/ringformer/transforms.py
pointer only (licence: MIT); the stored copy get_code serves, from hayeong0/Diff-HierVC, is pointer only (licence: NONE) · get_code("ba6cafc4d658c14f")
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 hayeong0/Diff-HierVC, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

ring_attention Not yet run
unverified (harvested, no recorded run)
exists-forall/striped_attention/bpt.py
code served (permissive licence) · get_code("c486bdb7634db737")
How it ran

no invocation recorded.

ring_attention Not yet run
unverified (harvested, no recorded run)
forhaoliu/ringattention/ringattention/ringattention_jax.py
code served (permissive licence) · get_code("b9b682336560ca14")
How it ran

no invocation recorded.

ring_attention_inference Not yet run
unverified (harvested, no recorded run)
forhaoliu/ringattention/ringattention/ringattention_jax_inference.py
code served (permissive licence) · get_code("157e6d4b3de1fc27")
How it ran

no invocation recorded.

searchsorted Not yet run
unverified (harvested, no recorded run)
seongho608/ringformer/transforms.py
code served (permissive licence) · get_code("e85d747983c4f5d8")
How it ran

no invocation recorded.

stft Not yet run
unverified (harvested, no recorded run)
seongho608/ringformer/stft.py
code served (permissive licence) · get_code("6f15bd47f3cbb1ef")
How it ran

no invocation recorded.

weight_norm_modules Not yet run
unverified (harvested, no recorded run)
seongho608/ringformer/attentions.py
code served (permissive licence) · get_code("0c0b5a033fe98758")
How it ran

no invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 17 are also present in other papers whose code we hold (17 with at least one paper dated earlier, 2 the same month, 14 later) and 11 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
exists 486 other papers
231 dated earlier, 15 the same month, 234 later, 4 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
default 163 other papers
99 dated earlier, 4 the same month, 58 later, 1 same year, order not determinable, 1 undated · 27 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1810.00825 (2018-10)
Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks
1907.01470 (2019-07)
Augmenting Self-attention with Persistent Memory
and 160 more not named here
get_padding 53 other papers
27 dated earlier, 25 later, 1 undated · 4 only as an assembly brick
1910.10838 (2019-10)
Zero-Shot Multi-Speaker Text-To-Speech with State-of-the-art Neural Speaker Embeddings
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2006.06873 (2020-06)
FastPitch: Parallel Text-to-speech with Pitch Prediction
and 50 more not named here
intersperse 13 other papers
8 dated earlier, 5 later
2005.11129 (2020-05)
Glow-TTS: A Generative Flow for Text-to-Speech via Monotonic Alignment Search
2105.06337 (2021-05)
Grad-TTS: A Diffusion Probabilistic Model for Text-to-Speech
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
and 10 more not named here
convert_pad_shape 12 other papers
8 dated earlier, 4 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2109.13821 (2021-09)
Diffusion-Based Voice Conversion with Fast Maximum Likelihood Sampling Scheme
2109.15166 (2021-09)
PortaSpeech: Portable and High-Quality Generative Text-to-Speech
and 9 more not named here
searchsorted 9 other papers
6 dated earlier, 3 later · 1 only as an assembly brick
2007.09390 (2020-07)
Autoregressive flow-based causal discovery and inference
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2206.04658 (2022-06)
BigVGAN: A Universal Neural Vocoder with Large-Scale Training
and 6 more not named here
piecewise_rational_quadratic_transform 7 other papers
4 dated earlier, 3 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2206.04658 (2022-06)
BigVGAN: A Universal Neural Vocoder with Large-Scale Training
2210.06370 (2022-10)
Can we use Common Voice to train a Multi-Speaker TTS system?
and 4 more not named here
unconstrained_rational_quadratic_spline 7 other papers
4 dated earlier, 3 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2206.04658 (2022-06)
BigVGAN: A Universal Neural Vocoder with Large-Scale Training
2210.06370 (2022-10)
Can we use Common Voice to train a Multi-Speaker TTS system?
and 4 more not named here
discriminator_loss 5 other papers
3 dated earlier, 2 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2206.04658 (2022-06)
BigVGAN: A Universal Neural Vocoder with Large-Scale Training
2305.19709 (2023-05)
XPhoneBERT: A Pre-trained Multilingual Model for Phoneme Representations for Text-to-Speech
and 2 more not named here
feature_loss 5 other papers
3 dated earlier, 2 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2206.04658 (2022-06)
BigVGAN: A Universal Neural Vocoder with Large-Scale Training
2305.19709 (2023-05)
XPhoneBERT: A Pre-trained Multilingual Model for Phoneme Representations for Text-to-Speech
and 2 more not named here
calc_same_padding 4 other papers
3 dated earlier, 1 later
2005.08100 (2020-05)
Conformer: Convolution-augmented Transformer for Speech Recognition
2202.01855 (2022-02)
Self-Supervised Learning with Random-Projection Quantizer for Speech Recognition
2203.15149 (2022-03)
CMGAN: Conformer-based Metric GAN for Speech Enhancement
and 1 more not named here
construct_prompt 2 other papers
1 dated earlier, 1 later
2309.14509 (2023-09)
DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models
2406.16852 (2024-06)
Long Context Transfer from Language to Vision
load_haystack 2 other papers
1 dated earlier, 1 later
2309.14509 (2023-09)
DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models
2406.16852 (2024-06)
Long Context Transfer from Language to Vision
weight_norm_modules 2 other papers
1 dated earlier, 1 later
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2601.20330 (2026-01)
PSYCHEPASS: Calibrating LLM Therapeutic Competence via Trajectory-Anchored Tournaments
below_or_on_diag 1 other paper
1 dated earlier
2305.19370 (2023-05)
Blockwise Parallel Transformer for Large Context Models
ring_attention 1 other paper
1 dated earlier
2305.19370 (2023-05)
Blockwise Parallel Transformer for Large Context Models
ring_attention_inference 1 other paper
1 dated earlier
2305.19370 (2023-05)
Blockwise Parallel Transformer for Large Context Models

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

Transformers have emerged as the architecture of choice for many state-of-the-art AI models, showcasing exceptional performance across a wide range of AI applications. However, the memory demands imposed by Transformers limit their ability to handle long sequences, thereby posing challenges in utilizing videos, actions, and other long-form sequences and modalities in complex environments. We present a novel approach, Ring Attention with Blockwise Transformers (Ring Attention), which leverages blockwise computation of self-attention and feedforward to distribute long sequences across multiple devices while fully overlapping the communication of key-value blocks with the computation of blockwise attention. Our approach enables training and inference of sequences that are up to device count times longer than those achievable by prior memory-efficient Transformers, without resorting to approximations or incurring additional communication and computation overheads. Extensive experiments on language modeling and reinforcement learning tasks demonstrate the effectiveness of our approach in allowing millions of tokens context size and improving performance.

For agents

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

get_harvested_code_for_paper("2310.01889")
get_code_for_paper("2310.01889")
have("2310.01889")

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

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

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

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

Connect an agent — have() is free.