SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.10661 · 2026

Unlocking Parallelism in Autoregressive Language Models via Speculative Decoding with Progressive Tree Drafting

Enhong Chen, Tong Xu, Qingrong Xia, Zhefeng Wang, Ziwei Zhao, Zhi Zheng, Zipeng Gao, Junda Lin

arXiv · PDF · Open in the Atlas

Code that ran

6 of 15 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 0 have no contract verdict; 6 failures of our instrument; 9 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/2607.10661.json · badge: /api/ran/2607.10661.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
MINE-USTC/PTD canonical (classifier label)
classifier basis: census
6 ran · 9 no recorded run
FunctionStatusWhere it lives
ini_model_paras Ran
ran; our contract draft was wrong, not the code
MINE-USTC/PTD/tree_draft/utils.py
code served (permissive licence) · get_code("2433571e21d295f1")
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 MinimalModel. 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 argparse import Namespace

torch.manual_seed(0)

# Create a minimal nn.Module to serve as the model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = MinimalModel()

# Create args Namespace with all required attributes
args = Namespace(
    run_mode='inference',
    inference_id='test_inference_001',
    model_arch='transformer',
    dist_workers=2,
    use_flash=True
)

ARGS = {
    'model': model,
    'args': args
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
prepare_guess_tree_mask Ran
ran; our contract draft was wrong, not the code
MINE-USTC/PTD/tree_draft/models/ptd_common.py
code served (permissive licence) · get_code("60b49d8a8dbfc24d")
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 (7, 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 as nn

torch.manual_seed(0)

class SimpleTree:
    """Stand-in for the tree object within GuessTree"""
    def __init__(self, node_count, attn_mask):
        self.node_count = node_count
        self.attn_mask = attn_mask

class GuessTree:
    """Stand-in for GuessTree object"""
    def __init__(self, tree):
        self.tree = tree

# Create a small attention mask for the tree (3x3)
tree_attn_mask = torch.zeros((3, 3), dtype=torch.float32)
tree_attn_mask[0, 0] = 1.0
tree_attn_mask[1, 1] = 1.0

# Create the tree with 3 nodes
simple_tree = SimpleTree(node_count=3, attn_mask=tree_attn_mask)

# Create GuessTree
guess_tree = GuessTree(tree=simple_tree)

# dtype for the mask
dtype = torch.float32

# Target length (should be larger than node_count)
tgt_len = 7

# Base mask matrix (7x7) - initialized with ones
mask = torch.ones((7, 7), dtype=dtype)

ARGS = {
    "guess_tree": guess_tree,
    "dtype": dtype,
    "tgt_len": tgt_len,
    "mask": mask,
}
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 (7, 7) — shape (7, 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
receive_all_data Ran
ran; our contract draft was wrong, not the code
MINE-USTC/PTD/tree_draft/decode_strategy/utils.py
code served (permissive licence) · get_code("b1b06ed67e9d2c50")
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 bytes. 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 socket
from unittest.mock import Mock

# Create a mock connection object that simulates receiving data
mock_conn = Mock()

# Simulate receiving data in chunks that end with b'END'
test_data = b'Hello World Test Data'
chunks = [
    b'Hello ',
    b'World ',
    b'Test ',
    b'Data',
    b'END'
]

# Set up the mock to return chunks sequentially, then empty bytes
mock_conn.recv.side_effect = chunks + [b'']

ARGS = {
    'conn': mock_conn
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
set_lower_triangular_true_efficient Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MINE-USTC/PTD/tree_draft/models/ptd_common.py
code served (permissive licence) · get_code("d991a4c5cc5a0e7a")
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 (5, 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)

# Create a small matrix to modify
matrix = torch.ones(5, 4, dtype=torch.float32)

# Define arguments for the function
ARGS = {
    "matrix": matrix,
    "start_row": 1,
    "start_col": 0,
    "end_row": 4,
    "end_col": 3,
    "set_value": 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 Tensor, ndim 2, dtype family float, shape (5, 4) — shape (5, 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
set_lower_triangular_true_efficient_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MINE-USTC/PTD/tree_draft/models/ptd_common.py
code served (permissive licence) · get_code("837b56a8a4089b82")
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 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 a small batch matrix with distinct dimensions
# batch_size=2, rows=4, cols=3
matrix = torch.randn(2, 4, 3)

# Define arguments for the function
ARGS = {
    "matrix": matrix,
    "start_row": 1,
    "start_col": 0,
    "end_row": 3,
    "end_col": 2,
    "set_value": 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 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
topk_sampling Ran
ran; our contract draft was wrong, not the code
MINE-USTC/PTD/tree_draft/decode_strategy/utils.py
code served (permissive licence) · get_code("5a1733d144a87bd6")
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 int, shape (1, 1) 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 logits tensor
# Shape: (batch_size=2, sequence_length=1, vocab_size=4)
# The function expects logits that can be passed to softmax on dim=-1
logits = torch.randn(2, 1, 4)

# k parameter for top-k sampling
k = 2

ARGS = {
    "logits": logits,
    "k": k,
}
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 int, shape (1, 1) — shape (1, 1) 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
autoregressive_decode Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/decode_strategy/autoregressive.py
code served (permissive licence) · get_code("dc565f177bfb3594")
How it ran

no invocation recorded.

get_device Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/utils.py
code served (permissive licence) · get_code("a284f42a11a435c8")
How it ran

no invocation recorded.

greedy_search Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/decode_strategy/autoregressive.py
code served (permissive licence) · get_code("d509548acb6dcc24")
How it ran

no invocation recorded.

greedy_search_proxy Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/utils.py
code served (permissive licence) · get_code("41c6b35175d09cf4")
How it ran

no invocation recorded.

prepare_decoder_attention_mask Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/models/Qwen3/qwen3_ptd.py
code served (permissive licence) · get_code("f4c485aaa0f9003b")
How it ran

no invocation recorded.

profile_timed Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/inference_profile.py
code served (permissive licence) · get_code("96f43a6742784d01")
How it ran

no invocation recorded.

remove_pad_tokens Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/decode_strategy/progressive_tree_drafting.py
code served (permissive licence) · get_code("05adfc95b7bdac80")
How it ran

no invocation recorded.

sample Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/decode_strategy/autoregressive.py
code served (permissive licence) · get_code("ee5d756445a741d2")
How it ran

no invocation recorded.

top_p_sampling Not yet run
unverified (harvested, no recorded run)
MINE-USTC/PTD/tree_draft/decode_strategy/utils.py
code served (permissive licence) · get_code("2dbd80d6d766a541")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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.

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

Speculative decoding has significantly accelerated Large Language Model (LLM) inference by alleviating memory-bound bottlenecks. However, traditional speculative decoding typically relies on auxiliary draft modules, incurring significant training and communication overhead. Although recent methods attempt to generate drafts within the target model itself, they often fail to fully exploit its latent parallel capacity due to a lack of structural coordination. In this paper, we propose Progressive Tree Drafting (PTD), which employs a structured, guided parallel drafting strategy to harness the model's parallel potential. By coupling a progressive tree structure with a stepwise pruning mechanism, PTD actively guides the LLM to explore multiple semantic paths in a single forward pass, ensuring both draft diversity and coherence. Experiments demonstrate that PTD achieves up to 2× decoding speedup across various benchmarks while remaining training-free and model-agnostic. Our code is available at: https://github.com/MINE-USTC/PTD.

For agents

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

get_harvested_code_for_paper("2607.10661")
get_code_for_paper("2607.10661")
have("2607.10661")

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

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

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

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

Connect an agent — have() is free.