8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.
"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.17421.json · badge: /api/ran/2502.17421.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.
| Repository | Role | Ran |
|---|---|---|
| sail-sg/longspec | canonical (classifier label) classifier basis not recorded on the link |
8 ran · 2 no recorded run |
| Function | Status | Where it lives |
|---|---|---|
| apply_rotary_pos_emb | Ran ran; our contract draft was wrong, not the code |
sail-sg/longspec/longspec/train/models/qwen2.py code served (permissive licence) · get_code("bac65c3dafaec040") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 5, 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.
|
| extract_and_rename | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/trainer_base_ds_mul_fs_tp.py code served (permissive licence) · get_code("bb5b320c91cd4e2d") How it ranRan 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 OrderedDict. 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.
|
| forward_step | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/trainer_base_ds_mul_fs_tp.py code served (permissive licence) · get_code("59492727dafc7ec5") How it ranRan 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.
|
| get_zero_stage | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/trainer_base_ds_mul_fs_tp.py code served (permissive licence) · get_code("c4393aecafc8b841") How it ranRan 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.
|
| maybe_contiguous | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/models/triton_tree_attn.py code served (permissive licence) · get_code("58e6542897e7d424") How it ranRan 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 (4, 2) 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.
|
| rotate_half | Ran ran; our contract draft was wrong, not the code |
sail-sg/longspec/longspec/train/models/qwen2.py code served (permissive licence) · get_code("b99eea6376d1e212") How it ranRan 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, 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.
|
| rounded_multiple | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/models/triton_tree_attn.py code served (permissive licence) · get_code("d0340dda6fca386f") How it ranRan 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.
|
| torch_tree_attention | Ran ran on a synthesized input |
sail-sg/longspec/longspec/train/models/qwen2.py code served (permissive licence) · get_code("a8073503b1d41587") How it ranRan 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, 1, 6, 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.
|
| build_dataloader | Not yet run unverified (harvested, no recorded run) |
sail-sg/longspec/longspec/train/general_util/evaluator.py code served (permissive licence) · get_code("8d0a17385afef041") How it ranno invocation recorded. |
| enable_gradient_checkpointing | Not yet run unverified (harvested, no recorded run) |
sail-sg/longspec/longspec/train/models/utils.py code served (permissive licence) · get_code("a8d00b249de11718") How it ranno invocation recorded. |
Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 4 later) and 6 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.
| Function | Also present in | Earliest-dated | Others named |
|---|---|---|---|
| rotate_half | 360 other papers 240 dated earlier, 9 the same month, 103 later, 5 same year, order not determinable, 3 undated · 30 only as an assembly brick |
1901.02860 (2019-01) Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context |
2203.08913 (2022-03) Memorizing Transformers 2302.13971 (2023-02) LLaMA: Open and Efficient Foundation Language Models and 357 more not named here |
| apply_rotary_pos_emb | 94 other papers 50 dated earlier, 2 the same month, 37 later, 2 same year, order not determinable, 3 undated · 6 only as an assembly brick |
1901.02860 (2019-01) Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context |
2305.17888 (2023-05) LLM-QAT: Data-Free Quantization Aware Training for Large Language Models 2309.11674 (2023-09) A Paradigm Shift in Machine Translation: Boosting Translation Performance of Large Language Models and 91 more not named here |
| maybe_contiguous | 2 other papers 2 later |
2503.02130 (2025-03) Forgetting Transformer: Softmax Attention with a Forget Gate |
2506.00385 (2025-06) MagiCodec: Simple Masked Gaussian-Injected Codec for High-Fidelity Reconstruction and Generation |
| rounded_multiple | 1 other paper 1 later |
2503.02130 (2025-03) Forgetting Transformer: Softmax Attention with a Forget Gate |
Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
As Large Language Models (LLMs) can now process extremely long contexts, efficient inference over these extended inputs has become increasingly important, especially for emerging applications like LLM agents that highly depend on this capability. Speculative decoding (SD) offers a promising lossless acceleration technique compared to lossy alternatives such as quantization and model cascades. However, most state-of-the-art SD methods are trained on short texts (typically fewer than 4k tokens), making them unsuitable for long-context scenarios. Specifically, adapting these methods to long contexts presents three key challenges: (1) the excessive memory demands posed by draft models due to large Key-Value (KV) cache; (2) performance degradation resulting from the mismatch between short-context training and long-context inference; and (3) inefficiencies in tree attention mechanisms when managing long token sequences. This work introduces LongSpec, a framework that addresses these challenges through three core innovations: a memory-efficient draft model with a constant-sized KV cache; novel position indices that mitigate the training-inference mismatch; and an attention aggregation strategy that combines fast prefix computation with standard tree attention to enable efficient decoding. Experimental results confirm the effectiveness of LongSpec, achieving up to a 3.26x speedup over strong Flash Attention baselines across five long-context understanding datasets, as well as a 2.25x reduction in wall-clock time on the AIME24 long reasoning task with the QwQ model, demonstrating significant latency improvements for long-context applications. The code is available at https://github.com/sail-sg/LongSpec.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2502.17421")
get_code_for_paper("2502.17421")
have("2502.17421")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2502.17421.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2502.17421)
Connect an agent — have() is free.