SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.27980 · 2026

Periodic RoPE for Infinite Context LLMs

Simin Huo

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2605.27980.json · badge: /api/ran/2605.27980.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
Cominder/miniwin community
Papers with Code archive
8 ran · 3 no recorded run
FunctionStatusWhere it lives
MiniWinConfig Ran
ran on a synthesized input · constructed an object; no result was computed
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("e5f51248584cde6f")
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, MiniWinConfig: 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)

ARGS = {
    'dropout': 0.1,
    'bos_token_id': 1,
    'eos_token_id': 2,
    'hidden_act': 'silu',
    'hidden_size': 768,
    'intermediate_size': 2048,
    'max_position_embeddings': 32768,
    'num_attention_heads': 8,
    'num_hidden_layers': 8,
    'num_key_value_heads': 2,
    'vocab_size': 6400,
    'rms_norm_eps': 1e-06,
    'rope_theta': 1000000.0,
    'flash_attn': True,
    'sliding_window_size': 64,
    'attention_pattern': 'SSSL',
    'attention_pattern_force_last_global': True,
    'sliding_pe_type': 'rope',
    'nope_logit_log_base': None,
    'use_moe': False,
    'num_experts_per_tok': 1,
    'n_routed_experts': 4,
    'n_shared_experts': 0,
    'scoring_func': 'softmax',
    'aux_loss_alpha': 0.01,
    'seq_aux': True,
    'norm_topk_prob': True,
    'max_seq_len': None,
    'partial_rotary_factor': 1.0,
    'tie_word_embeddings': True,
    'head_dim': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MiniWinConfig — 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 MiniWinConfig 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
_manual_sliding_attention_bh_td Ran
ran; our contract draft was wrong, not the code
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("826432df4642eeda")
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 4, dtype family float, shape (2, 3, 4, 7) 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)

# Construct small tensors for q, k, v
# q shape: (B, H, Tq, d) = (2, 3, 4, 5)
# k shape: (B, H, Tk, d) = (2, 3, 6, 5)
# v shape: (B, H, Tk, d_v) = (2, 3, 6, 7)

B, H = 2, 3
Tq, Tk = 4, 6
d_q = 5
d_v = 7

q = torch.randn(B, H, Tq, d_q)
k = torch.randn(B, H, Tk, d_q)
v = torch.randn(B, H, Tk, d_v)

window_left = 2

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "window_left": window_left,
}
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 4, dtype family float, shape (2, 3, 4, 7) — shape (2, 3, 4, 7) 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
_sdpa_sliding_window_bh_td Ran
ran; our contract draft was wrong, not the code
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("42979d064d6a8c57")
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 4, dtype family float, shape (2, 4, 3, 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 small tensors with distinct dimensions
# Shape: (batch, heads, seq_len, dim)
batch = 2
heads = 4
seq_len_q = 3
seq_len_k = 5
dim = 4

q = torch.randn(batch, heads, seq_len_q, dim)
k = torch.randn(batch, heads, seq_len_k, dim)
v = torch.randn(batch, heads, seq_len_k, dim)

# window_left parameter - set to a valid window size
window_left = 2

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "window_left": window_left,
}
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 4, dtype family float, shape (2, 4, 3, 4) — shape (2, 4, 3, 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
build_sliding_alibi_bias Ran
ran; our contract draft was wrong, not the code
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("090abf20005fc0dc")
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 4, dtype family float, shape (1, 4, 3, 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

torch.manual_seed(0)

# slopes: tensor of slope values for ALiBi bias
# The function applies slopes via broadcasting: slopes.view(-1, 1, 1)
# So slopes should be a 1D tensor
slopes = torch.tensor([0.1, 0.2, 0.3, 0.4], dtype=torch.float32)

# q_len: query length (integer)
q_len = 3

# k_len: key length (integer)
k_len = 5

# window_left: window size for local attention (integer)
# The function uses: (rel <= window_left) to mask valid positions
window_left = 2

# device: torch device (CPU only)
device = torch.device('cpu')

# dtype: torch dtype for computations
dtype = torch.float32

ARGS = {
    'slopes': slopes,
    'q_len': q_len,
    'k_len': k_len,
    'window_left': window_left,
    'device': device,
    'dtype': dtype,
}
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 4, dtype family float, shape (1, 4, 3, 5) — shape (1, 4, 3, 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
flash_attn_func_miniwin Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("13547885b46dfbfd")
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 4, dtype family float, shape (2, 4, 3, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create tiny tensors with distinct dimensions
batch_size = 2
num_heads = 3
seq_len_q = 4
seq_len_k = 5
head_dim = 6

# q, k, v in bthd format (batch, time, heads, head_dim)
q_bthd = torch.randn(batch_size, seq_len_q, num_heads, head_dim)
k_bthd = torch.randn(batch_size, seq_len_k, num_heads, head_dim)
v_bthd = torch.randn(batch_size, seq_len_k, num_heads, head_dim)

causal = True
window_size = (2, -1)  # (left, right) - left window of 2, no right limit

ARGS = {
    "q_bthd": q_bthd,
    "k_bthd": k_bthd,
    "v_bthd": v_bthd,
    "causal": causal,
    "window_size": window_size,
}
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 4, dtype family float, shape (2, 4, 3, 6) — shape (2, 4, 3, 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
precompute_freqs_cis Ran
ran, honoured the contract we drafted
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("2b0c31e541c23409")
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 3, 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 math

torch.manual_seed(0)

ARGS = {
    'dim': 64,
    'end': 128,
    'rope_base': 1000000.0,
    'rope_scaling': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("07d6ef500d143328")
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 4, dtype family float, shape (2, 3, 8, 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

torch.manual_seed(0)

# Create a small tensor with shape (bs, slen, num_key_value_heads, head_dim)
# Using distinct sizes: batch=2, seq_len=3, num_key_value_heads=4, head_dim=5
x = torch.randn(2, 3, 4, 5)

# n_rep determines how many times to repeat the key-value heads
n_rep = 2

ARGS = {
    "x": x,
    "n_rep": n_rep,
}
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 4, dtype family float, shape (2, 3, 8, 5) — shape (2, 3, 8, 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
rope_dim_from_factor Ran
ran, honoured the contract we drafted
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("448b2323b76dd641")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "head_dim": 64,
    "partial_rotary_factor": 0.5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PRoPESlidingAttention Not yet run
unverified (harvested, no recorded run)
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("74612d30ba0b4f4e")
How it ran

no invocation recorded.

apply_partial_rotary_pos_emb Not yet run
unverified (harvested, no recorded run)
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("fc441af0a3b6ab3b")
How it ran

no invocation recorded.

apply_rotary_pos_emb Not yet run
unverified (harvested, no recorded run)
Cominder/miniwin/model/model_miniwin.py
code served (permissive licence) · get_code("41e3bef5aa57fbfa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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
repeat_kv
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases
2601.18537 (2026-01)
SKETCH: Semantic Key-Point Conditioning for Long-Horizon Vessel Trajectory Prediction

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

The ability to process ultra-long contexts is crucial for large language models (LLMs) to perform long-horizon tasks. While recent efforts have extended context windows to 1M and beyond, model performance degrades when sequence length exceeds the pre-trained range of positional encodings (e.g., RoPE), i.e., position exhaustion. This fundamental limitation must be overcome to achieve a truly infinite context. To address it, we propose Periodic RoPE (P-RoPE), a positional encoding mechanism designed to circumvent this exhaustion. It operates in conjunction with sliding window attention (SWA) to capture local dependencies and relative positions within each window. This local layer is then complemented by a global attention layer with No Positional Encoding (NoPE), enabling unbounded interaction across the entire sequence without positional constraints. By stacking these two types of layers, the model avoids the need for positional extrapolation to generalize longer and theoretically supports an infinite context window. Empirical results show that our model, Mini-Win, outperforms MiniMInd with standard GPT architectures in long-context efficiency and stability. Our work provides a possible pathway toward LLMs with genuine infinitecontext understanding. The code is available at https://github.com/Cominder/miniwin.

For agents

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

get_harvested_code_for_paper("2605.27980")
get_code_for_paper("2605.27980")
have("2605.27980")

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

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

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

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

Connect an agent — have() is free.