Papers
Topics
Authors
Recent
Search
2000 character limit reached

Token Map Drafting Methods

Updated 7 July 2026
  • Token Map Drafting is a framework that uses precomputed maps, token canvases, or databases to propose, constrain, verify, or explain token sequences across domains.
  • In transformer-based ASR, the method replaces a draft model with an n-gram token map, achieving up to 1.37× speed-up with minimal impact on word error rate.
  • Variants like bidirectional report infill, hierarchical drafting, and token-wise multimodal explanation highlight its versatility in structured, low-perplexity settings.

Token Map Drafting denotes a family of token-centric procedures in which precomputed maps, token canvases, or token databases are used to propose, constrain, verify, or explain token sequences. In its most specific recent usage, it names a model-free speculative decoding method for transformer-based automatic speech recognition (ASR), where a precomputed n-gram token map derived from domain-specific training data replaces a separate draft model (Ho et al., 29 Jul 2025). Recent literature also uses closely related token-map constructions for bidirectional report infill in discrete diffusion LLMs, hierarchical database drafting in speculative decoding, parallel multi-token drafting, and token-wise multimodal explanation (Puyvelde et al., 1 Jul 2026, Cho et al., 8 Feb 2025, Hui et al., 1 Feb 2026, Li et al., 29 Jun 2025).

1. Conceptual scope and core abstractions

Across the literature, a “token map” is not a single canonical object. In ASR, the token map is a dictionary

T={h[c1,c2,,cK]}\mathcal{T}=\{h\to[c_1,c_2,\dots,c_K]\}

where each hh is an n-gram key and each cjc_j is a high-confidence continuation. In discrete diffusion report drafting, the analogous structure is a fixed-length token canvas x{1K}Lx\in\{1\ldots K\}^L with reserved slots that can be clamped as anchors. In hierarchical drafting for LLMs, the map is distributed across three databases, Dc\mathcal{D}_c, Dm\mathcal{D}_m, and Ds\mathcal{D}_s, ordered by temporal locality. In P-EAGLE, drafting is organized around a parallel input matrix UtRK×dU_t\in\mathbb{R}^{K\times d} that yields logits for the next KK tokens in one forward pass. In Token Activation Map, the “map” is a token-wise multimodal activation object MiM_i built from visual activations, context correction, and denoising (Ho et al., 29 Jul 2025, Puyvelde et al., 1 Jul 2026, Cho et al., 8 Feb 2025, Hui et al., 1 Feb 2026, Li et al., 29 Jun 2025).

Paradigm Token structure Operational role
ASR Token Map Drafting hh0 draft continuations for speculative verification
Diffusion token-canvas drafting hh1 any-order infill with fixed anchors
Hierarchical Drafting hh2 sequential database lookup before verification
P-EAGLE hh3 parallel multi-token prediction
Token Activation Map hh4 token-wise explanation and visualization

This suggests a family resemblance rather than a single algorithm: token-level structure is externalized into a map-like object, and that object is then used either to reduce decoding cost, to support constrained infill, or to isolate token-specific evidence.

2. Token Map Drafting in transformer-based ASR

The ASR formulation introduced in “Model-free Speculative Decoding for Transformer-based ASR with Token Map Drafting” targets end-to-end transformer systems such as Whisper, whose autoregressive decoding is computationally expensive on CPU-based and resource-constrained devices (Ho et al., 29 Jul 2025). The method replaces the draft-model step in standard speculative decoding with lookups into a precomputed n-gram token map built from domain-specific text.

Construction begins by collecting a domain-specific text corpus hh5, normalizing text, and tokenizing each sentence with the pretrained Whisper tokenizer. For each token sequence, all contiguous n-grams with hh6 are extracted. For each n-gram hh7, the method records the sequence of tokens that immediately follow it in the corpus,

hh8

Empirical probabilities are computed by maximum likelihood estimate,

hh9

with optional Katz back-off or add-one smoothing,

cjc_j0

Candidate continuations are ranked by a score that trades off frequency and length, for example

cjc_j1

and low-score or short candidates are pruned so that speculative batches exceed the empirical threshold, such as cjc_j2 tokens for cjc_j3 and cjc_j4 for cjc_j5.

At inference time, the current transcript prefix cjc_j6 is used to extract the last cjc_j7 tokens as context. If the context is in cjc_j8, the decoder retrieves up to cjc_j9 candidate continuations, forms a speculative batch, and runs the main model decoder on that batch in parallel up to length x{1K}Lx\in\{1\ldots K\}^L0. The algorithm then accepts the full continuation if no mismatch occurs, or otherwise accepts the longest matching prefix and queries the main model autoregressively for the first mismatching token. In prose, the method extracts the last n-gram context x{1K}Lx\in\{1\ldots K\}^L1, retrieves up to x{1K}Lx\in\{1\ldots K\}^L2 candidate continuations from x{1K}Lx\in\{1\ldots K\}^L3, verifies them in one batched decoder pass, and accepts the longest matching prefix; correction invokes the full model only when needed.

The candidate-selection probability is written as

x{1K}Lx\in\{1\ldots K\}^L4

Verification by the main model is expressed per proposed token x{1K}Lx\in\{1\ldots K\}^L5 as

x{1K}Lx\in\{1\ldots K\}^L6

where x{1K}Lx\in\{1\ldots K\}^L7 is a threshold, often set very low or simply replaced by exact-match acceptance.

3. Efficiency, accuracy, and trade-offs

The ASR paper states the decoding complexity for standard autoregressive decoding as

x{1K}Lx\in\{1\ldots K\}^L8

where x{1K}Lx\in\{1\ldots K\}^L9 is sequence length and Dc\mathcal{D}_c0 is per-token decoder cost. For speculative decoding with a token map, the complexity is

Dc\mathcal{D}_c1

where Dc\mathcal{D}_c2 is average accepted speculative length, Dc\mathcal{D}_c3 is a batched verification cost factor, and Dc\mathcal{D}_c4 is map lookup overhead (Ho et al., 29 Jul 2025). The corresponding speed-up approximation is

Dc\mathcal{D}_c5

with Dc\mathcal{D}_c6. As Dc\mathcal{D}_c7 grows, Dc\mathcal{D}_c8; in the worst case, if suggestions diverge and Dc\mathcal{D}_c9, then Dm\mathcal{D}_m0.

The reported implementation uses C++ with CTranslate2 on an Intel Core i5 CPU with 4 cores at 2.4 GHz and 16 GB RAM. Datasets are CI-AVSR, described as Cantonese audio-visual in-car commands, and an internal maintenance dataset with structured phrases such as device names and measurements. The main model is Whisper-large-v3, with additional experiments on Whisper-medium and Whisper-small; the baseline speculative decoder is “Distill-spec” with Whisper-turbo-v3 as draft model.

The metrics are speed-up Dm\mathcal{D}_m1, acceptance rate Dm\mathcal{D}_m2, average acceptance length Dm\mathcal{D}_m3, and word error rate (WER). On CI-AVSR, Token Map Drafting with the large main model achieves Dm\mathcal{D}_m4 speed-up, versus Dm\mathcal{D}_m5 for distill-spec, with Dm\mathcal{D}_m6 and Dm\mathcal{D}_m7 tokens. On the internal dataset, speed-up reaches Dm\mathcal{D}_m8, versus Dm\mathcal{D}_m9 for distill-spec, with Ds\mathcal{D}_s0 and Ds\mathcal{D}_s1. Using Whisper-medium or Whisper-small as the main model yields approximately Ds\mathcal{D}_s2 average speed-up. No statistically significant degradation in WER was observed, with Ds\mathcal{D}_s3. The abstract also reports a Ds\mathcal{D}_s4 absolute improvement in decoding speed over the Distill-spec baseline running on CPU (Ho et al., 29 Jul 2025).

These results define the method’s intended operating regime: structured, low-perplexity domains in which token co-occurrences repeat and speculative prefixes can be accepted with nontrivial length.

4. Bidirectional, hierarchical, and parallel variants

Related work shows that token-map drafting is not restricted to a single left-to-right speculative-decoding template. In “Discrete Diffusion LLMs for Interactive Radiology Report Drafting,” the relevant object is a token canvas of fixed maximum report length Ds\mathcal{D}_s5 tokens, where any subset of positions can be frozen as anchors and the remaining slots are filled by a discrete diffusion denoising process (Puyvelde et al., 1 Jul 2026). The forward noising process uses the D3PM categorical transition

Ds\mathcal{D}_s6

and the reverse model predicts

Ds\mathcal{D}_s7

The paper emphasizes that because the canvas is denoised bidirectionally, a radiologist can fix report fragments and have the model fill the text between them. On one NVIDIA H100 in bf16, generating approximately 256 tokens, autoregressive greedy decoding takes 6.43 s at 24.6 tok/s, whereas diffusion takes 1.46 s at 175.3 tok/s for 16 steps, 1.74 s at 147.4 tok/s for 32 steps, and 1.84 s at 139.4 tok/s for 48 steps, corresponding to Ds\mathcal{D}_s8, Ds\mathcal{D}_s9, and UtRK×dU_t\in\mathbb{R}^{K\times d}0 speedups. On MIMIC-CXR any-order infill, diffusion bidirectional token-F1 is 0.320 versus 0.211 for diffusion left, and judge accuracy is 0.285 versus 0.157, both with UtRK×dU_t\in\mathbb{R}^{K\times d}1.

“Lossless Acceleration of LLMs with Hierarchical Drafting based on Temporal Locality in Speculative Decoding” organizes drafting into three databases: the context-dependent database UtRK×dU_t\in\mathbb{R}^{K\times d}2, the model-dependent database UtRK×dU_t\in\mathbb{R}^{K\times d}3, and the statistics-dependent database UtRK×dU_t\in\mathbb{R}^{K\times d}4 (Cho et al., 8 Feb 2025). The decoding procedure first queries UtRK×dU_t\in\mathbb{R}^{K\times d}5, then UtRK×dU_t\in\mathbb{R}^{K\times d}6, then UtRK×dU_t\in\mathbb{R}^{K\times d}7, truncating to a draft-set size UtRK×dU_t\in\mathbb{R}^{K\times d}8 before speculative verification. The database order is justified by temporal locality: high local recurrence is assigned to UtRK×dU_t\in\mathbb{R}^{K\times d}9, moderate cross-run recurrence to KK0, and broad corpus statistics to KK1. On Spec-Bench with 7B and 13B models, the paper reports greedy-decoding speedups of KK2 for Vicuna-7B, KK3 for Vicuna-13B, KK4 for Llama-2-7B, and KK5 for Llama-2-13B, with average draft latency of 2.17 ms and acceptance ratio KK6, KK7 for Vicuna-7B.

“P-EAGLE: Parallel-Drafting EAGLE with Scalable Training” turns autoregressive EAGLE into parallel multi-token prediction by introducing a shared learnable hidden state and mask-token embedding, then forming

KK8

so that one forward pass yields logits for the next KK9 tokens (Hui et al., 1 Feb 2026). The paper precomputes a maximal attention mask MiM_i0 and slices it at training time, and it uses sequence partitioning with within-sequence gradient accumulation for long contexts. Across GPT-OSS 120B, GPT-OSS 20B, and Qwen3-Coder 30B, P-EAGLE reports end-to-end speedups of MiM_i1 to MiM_i2 over autoregressive EAGLE-3.

A plausible implication is that “drafting” in current token-map literature spans at least three distinct operational modes: batched verification of externally proposed continuations, bidirectional denoising of a constrained token canvas, and parallel multi-position prediction.

5. Token-wise explanation and other non-decoding uses

The phrase also appears in work where the primary goal is not acceleration. “Token Activation Map to Visually Explain Multimodal LLMs” defines a token-wise explanation pipeline that isolates the unique visual footprint of each generated token by estimating and subtracting context interference (Li et al., 29 Jun 2025). Given a raw visual activation

MiM_i3

the method constructs a context stack, computes textual relevance scores, forms an estimated interference

MiM_i4

solves for a least-squares scale factor

MiM_i5

and produces a causal activation map

MiM_i6

A Rank Gaussian Filter then denoises transformer activations. The resulting multimodal map MiM_i7 is presented as suitable for object localization, failure-case analysis, video visualization, visual comparison, and model understanding. Here, “token map drafting” is explanatory rather than generative.

Outside language and multimodal generation, “token map” can denote still different objects. In “Token Composition: A Graph Based on EVM Logs,” token composition is represented as a directed graph MiM_i8 in which an edge MiM_i9 means “token hh00 is tokenised by token hh01” (Harrigan et al., 2024). The guide describes extraction from EVM Transfer logs, graph construction, computation of in-degree, out-degree, weakly and strongly connected components, longest directed path, and cycle detection. In this setting, drafting a token map means extracting and visualizing token-to-token relationships on Ethereum.

In “Unveiling the Hidden: Online Vectorized HD Map Construction with Clip-Level Token Interaction and Propagation,” the relevant structure is a set of clip tokens hh02 and memory tokens used to unveil occluded static map elements in autonomous driving (Kim et al., 2024). The system compresses per-frame map queries into compact clip tokens via cross-attention, updates BEV features through interaction with those tokens, and propagates memory across clips. With temporal window hh03, stride hh04, memory size hh05, clip token size hh06, and inference speed of approximately 12.7 FPS on an A100, the method reaches 68.0 mAP on nuScenes versus 61.5 for MapTRv2 and 63.8 on the heavily occluded split versus 53.1 for StreamMapNet.

These usages do not define a single shared algorithm. They do, however, share a recurring design pattern: token-level state is externalized into a compact structure and then reused for inference, interaction, or analysis.

6. Applicability, limitations, and conceptual boundaries

The ASR paper states directly that Token Map Drafting is best suited for structured, low-perplexity domains where token co-occurrences repeat, such as command sets, formulas, and measurement logs (Ho et al., 29 Jul 2025). In highly open-domain or high-perplexity text, n-gram coverage and acceptance length hh07 shrink, reducing speed-up. The same source identifies a map-size versus memory-footprint trade-off: larger hh08 or richer candidate lists improve coverage but increase storage and lookup cost.

The broader literature establishes several conceptual boundaries. First, drafting need not require a smaller learned draft model: the ASR method explicitly eliminates the need for a separate draft model. Second, drafting need not be strictly left-to-right: the diffusion token canvas allows any-order infill by clamping arbitrary anchors and filling the remaining slots bidirectionally (Puyvelde et al., 1 Jul 2026). Third, not every token map is a decoding accelerator: TAM uses token maps for explanation, Ethereum token maps for graph analysis, and MapUnveiler uses clip tokens for vectorized HD map construction (Li et al., 29 Jun 2025, Harrigan et al., 2024, Kim et al., 2024).

The limitations are equally heterogeneous. In ASR, performance depends on domain repetition and token-map coverage. In hierarchical drafting, overall benefit depends on acceptance ratio, draft latency, and the ordering of databases by locality (Cho et al., 8 Feb 2025). In parallel drafting, training complexity scales with sequence length and parallel positions, which motivates mask pre-computation and sequence partitioning (Hui et al., 1 Feb 2026). In diffusion report drafting, inference quality is traded against latency by the choice of denoising steps hh09 to hh10 (Puyvelde et al., 1 Jul 2026). A plausible synthesis is that token-map drafting is most effective when token structure is either highly repetitive, externally constrainable, or directly informative for downstream interpretation.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Token Map Drafting.