SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.04975 · NeurIPS · 2025

SuffixDecoding: Extreme Speculative Decoding for Emerging AI Applications

Daniel Campos, Zhihao Jia, Gabriele Oliaro, Aurick Qiao

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2411.04975.json · badge: /api/ran/2411.04975.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
snowflakedb/ArcticInference canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
snowflakedb/arcticinference canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
arctic_inference_effective_enabled Ran
ran, violated the contract we drafted
snowflakedb/ArcticInference/arctic_inference/envs.py
code served (permissive licence) · get_code("a43ab21695912010")
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 bool, 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 os

# Clear any existing environment variable to have a clean state
if 'ARCTIC_INFERENCE_ENABLED' in os.environ:
    del os.environ['ARCTIC_INFERENCE_ENABLED']

# Test case 1: extra_env is None (default)
ARGS = {
    'extra_env': None
}
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 bool, 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
count Ran
ran; our contract draft was wrong, not the code
snowflakedb/ArcticInference/arctic_inference/dynasor/entropy.py
code served (permissive licence) · get_code("a5020ff014095b56")
How it ran

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

import torch
from collections import defaultdict
from typing import List, Dict, Any, Union, Optional

torch.manual_seed(0)

# The function count() takes a List[Any] and counts occurrences of each unique element
# It iterates through the list, increments counts in a defaultdict, then returns list of counts
# We need to provide a list with some elements that can be counted

# Example 1: Simple list with integers
Olist_example1 = [1, 2, 2, 3, 3, 3, 1, 4]

# Example 2: List with strings
Olist_example2 = ["apple", "banana", "apple", "cherry", "banana", "apple"]

# Example 3: List with tuples (hashable)
Olist_example3 = [(1, 2), (1, 2), (3, 4), (1, 2)]

# Example 4: List with mixed hashable types
Olist_example4 = [1, "a", 1, "b", "a", 1]

# We'll use example 1 for the ARGS
ARGS = {
    "Olist": [1, 2, 2, 3, 3, 3, 1, 4]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
entropy Ran
ran; our contract draft was wrong, not the code
snowflakedb/ArcticInference/arctic_inference/dynasor/entropy.py
code served (permissive licence) · get_code("e29c5d4b90190e5f")
How it ran

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

import math
from typing import List

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# Construct valid arguments for the entropy function
# The function takes a list of probabilities and calculates Shannon entropy

# Create a valid probability distribution (sums to 1)
prob_dist = [0.25, 0.25, 0.25, 0.25]

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

torch.manual_seed(0)

ARGS = {
    "generated_text": "Let me think about this problem step by step.\n</think>\nNow I can solve it.",
    "answer": "42"
}
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 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
format_prompt_for_completions Ran
ran; our contract draft was wrong, not the code
snowflakedb/ArcticInference/arctic_inference/dynasor/cot.py
code served (permissive licence) · get_code("2e50f3c70e76e32f")
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 torch

torch.manual_seed(0)

sys = 'You are a helpful assistant.'

default_probing_suffix = '... Oh, I suddenly got the answer to the whole problem, **Final Answer**\n\n\\[ \\boxed{'

def format_prompt_for_completions(prompt: str, generated: str) -> str:
    text = f'<|begin▁of▁sentence|>{sys}<|User|>{prompt}<|Assistant|><think>\n{generated} {default_probing_suffix}'
    return text

ARGS = {
    'prompt': 'What is 2 + 2?',
    'generated': 'Let me think about this step by step. Two plus two equals four.'
}
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 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
norm Ran
ran, violated the contract we drafted
snowflakedb/ArcticInference/arctic_inference/dynasor/entropy.py
code served (permissive licence) · get_code("eefac2aaeeae2778")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a list of floats and normalizes them to sum to 1
# We need to provide a simple list of numbers

ARGS = {
    "Olist": [1.0, 2.0, 3.0, 4.0]
}
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 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
obtain_answer Ran
ran; our contract draft was wrong, not the code
snowflakedb/ArcticInference/arctic_inference/dynasor/cot.py
code served (permissive licence) · get_code("28379cada3d7f0cf")
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 torch

def obtain_answer(s):
    """# Find first unpaired } by counting { and }"""
    stack = []
    for i, c in enumerate(s):
        if c == '{':
            stack.append(c)
        elif c == '}':
            if not stack:
                return s[:i]
            stack.pop()
    return ''

ARGS = {
    's': 'hello { world } test } extra'
}
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 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
padding_size Ran
ran, honoured the contract we drafted
snowflakedb/arcticinference/arctic_inference/vllm/spec_dec/arctic_speculator.py
code served (permissive licence) · get_code("f6826d57d2283a63")
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 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

torch.manual_seed(0)

# The function padding_size takes a single integer parameter 'size'
# and rounds it up to the nearest multiple of 4 (or a power-of-2 divisor of 4)
# Let's test with a few different sizes to ensure it works

ARGS = {
    "size": 5
}
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 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
parse_args Ran
ran; our contract draft was wrong, not the code
snowflakedb/ArcticInference/arctic_inference/dynasor/openai_server.py
code served (permissive licence) · get_code("be2bd376825af0a1")
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 ProxyConfig. 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 argparse
from dataclasses import dataclass
from typing import Optional, List

@dataclass
class ProxyConfig:
    """Configuration for the OpenAI proxy server.
    
    Attributes:
        host: Host address to bind the server to
        port: Port number to run the server on
        target_base_url: Base URL of the target OpenAI API server
        api_key: API key for authentication (defaults to "EMPTY")
    """
    host: str
    port: int
    target_base_url: str
    api_key: str = 'EMPTY'

def make_parser() -> argparse.ArgumentParser:
    """Create and configure the argument parser for the server.
    
    Returns:
        argparse.ArgumentParser: Configured argument parser
    """
    parser = argparse.ArgumentParser(description='OpenAI API Proxy Server')
    parser.add_argument('--host', type=str, default='0.0.0.0', help='Host to bind the server to (default: 0.0.0.0)')
    parser.add_argument('--port', type=int, default=8001, help='Port to run the server on (default: 8001)')
    parser.add_argument('--target-base-url', type=str, default='http://localhost:8000', help='Base URL of the target OpenAI API server (default: http://localhost:8000)')
    return parser

def parse_args(args_: Optional[List[str]]=None) -> ProxyConfig:
    """Parse command line arguments and create a ProxyConfig instance.
    
    Args:
        args_: Optional list of command line arguments
        
    Returns:
        ProxyConfig: Configuration object with parsed arguments
    """
    parser = make_parser()
    args = parser.parse_args(args=args_)
    return ProxyConfig(host=args.host, port=args.port, target_base_url=args.target_base_url)

ARGS = {
    'args_': ['--host', '127.0.0.1', '--port', '9000', '--target-base-url', 'http://api.example.com:8000']
}
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 ProxyConfig — a ProxyConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ProxyConfig 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
check_health Not yet run
unverified (harvested, no recorded run)
snowflakedb/ArcticInference/arctic_inference/dynasor/vllm_server.py
code served (permissive licence) · get_code("e0604cca9bcedcc6")
How it ran

no invocation recorded.

speculator_ln Not yet run
unverified (harvested, no recorded run)
snowflakedb/ArcticInference/arctic_inference/py_custom_ops.py
code served (permissive licence) · get_code("fc01e317bc5d7ff4")
How it ran

no invocation recorded.

sum_lstm Not yet run
unverified (harvested, no recorded run)
snowflakedb/ArcticInference/arctic_inference/py_custom_ops.py
code served (permissive licence) · get_code("7ef155488e539909")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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 12 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 is widely adopted to reduce latency in large language model (LLM) inference by leveraging smaller draft models capable of handling diverse user tasks. However, emerging AI applications, such as LLM-based agents, present unique workload characteristics: instead of diverse independent requests, agentic frameworks typically submit repetitive inference requests, such as multi-agent pipelines performing similar subtasks or self-refinement loops iteratively enhancing outputs. These workloads result in long and highly predictable sequences, which current speculative decoding methods do not effectively exploit. To address this gap, we introduce SuffixDecoding, a novel method that utilizes efficient suffix trees to cache long token sequences from prompts and previous outputs. By adaptively speculating more tokens when acceptance likelihood is high and fewer when it is low, SuffixDecoding effectively exploits opportunities for longer speculations while conserving computation when those opportunities are limited. Evaluations on agentic benchmarks, including SWE-Bench and Text-to-SQL, demonstrate that SuffixDecoding achieves speedups of up to 5.3×, outperforming state-of-the-art methods-2.8× faster than model-based approaches like EAGLE-2/3 and 1.9× faster than model-free approaches such as Token Recycling. SuffixDecoding is open-sourced at https://github.com/snowflakedb/ArcticInference.

For agents

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

get_harvested_code_for_paper("2411.04975")
get_code_for_paper("2411.04975")
have("2411.04975")

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

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

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

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

Connect an agent — have() is free.