Moe-Zbeeb/TAPS

SPIGM @ICML https://arxiv.org/abs/2603.27027

8

stars

36

commits

Python

primary language

Apr 4, 2026

updated

README

TAPS: Task-Aware Proposal Distributions for Speculative Sampling

Project Page · March 2026

Mohamad Zbib, Mohamad Bazzi, Ammar Mohanna, Bernard Ghanem*, Hasan Abed Al Kader Hammoud* (*equal advising)
KAUST · AUB — Contacts: mbz02@mail.aub.edu, hasanabedalkader.hammoud@kaust.edu.sa


Task-aware drafts that speed up speculative decoding without sacrificing quality.

HF Weights HF Datasets

Contents

OverviewAbstractHighlightsFiguresResults snapshotRepository mapSetupCitationLicense


Overview

TAPS studies how the draft training distribution shapes speculative decoding quality. Using Meta-Llama-3-8B-Instruct as the verifier and lightweight LLaMA-style drafters (HASS and EAGLE-2, ~0.8B params, shared tokenizer), the work compares single-domain training, mixed-domain training, and inference-time composition (confidence routing, merged-tree verification).

TL;DR (At a glance)

  • Goal: Quantify how draft training data and specialist composition affect speculative decoding.
  • Verifier: Meta-Llama-3-8B-Instruct.
  • Drafts: HASS and EAGLE-2 (single-layer, ~0.8B params, shared tokenizer).
  • Workloads: MT-Bench (chat), GSM8K, MATH-500, SVAMP (reasoning).
  • Metric: acceptance length (lossless speculative decoding).
  • Compute: single node, 4×A100.

Abstract

Speculative decoding speeds up autoregressive generation by letting a lightweight drafter propose tokens that a larger verifier checks in parallel. We study how much draft quality depends on the training distribution using HASS and EAGLE-2 drafts trained on MathInstruct, ShareGPT, and mixed variants, evaluated on MT-Bench, GSM8K, MATH-500, and SVAMP. Task-matched drafts specialize; mixed data aids robustness but is not uniformly dominant across temperatures. Among composition strategies, weight averaging underperforms, confidence routing improves, and merged-tree verification attains the highest acceptance length. Confidence is a stronger routing signal than entropy. Results show speculative decoding quality hinges on both draft architecture and the alignment between draft training data and downstream workload.

Highlights

  • Task-aware specialization: ShareGPT drafts lead MT-Bench (e.g., HASS 3.98 vs. 2.90 for MathInstruct), while MathInstruct drafts dominate GSM8K/MATH-500/SVAMP.
  • Mixed data is nuanced: Mixed 70k+70k (HASS) peaks at temperature 0 with average acceptance length 5.18 but drops at temperature 1 (3.69), where Mixed 35k+35k is steadier.
  • Composition wins: Weight-space averaging is weakest (≈2.4–2.6). Confidence routing reaches ~4.8 average acceptance length; merged-tree verification is strongest (HASS 5.11, EAGLE-2 5.02 at temperature 0).
  • Routing signal: Confidence cleanly separates workloads (MathInstruct chosen for 90.8% of GSM8K; ShareGPT for 81.2% of MT-Bench). Entropy is diagnostic but weaker for routing.

Figures

Speculative decoding pipeline with draft proposals verified by the target model Merged-tree verification combining MathInstruct and ShareGPT draft trees
Speculative decoding pipeline.Merged-tree verification packs MathInstruct and ShareGPT trees for one-pass verification.

Interpolation sweep for checkpoint averaging between MathInstruct and ShareGPT drafts
Checkpoint averaging is unstable across interpolation weights and remains weaker than inference-time composition.

Acceptance by speculative depth across backbones, benchmarks, and temperatures Accepted vs. rejected token entropy for EAGLE-2 drafts
Acceptance declines with depth but specialization persists.Rejected tokens show higher entropy; confidence remains the stronger routing signal.

Results snapshot

Benchmarks: MT-Bench (chat), GSM8K, MATH-500, SVAMP. Metric: average acceptance length (higher is better) under lossless speculative decoding. Tables stay inline (no collapses).

Temperature 0

Model VariantMethodMT-BenchGSM8KMATH-500SVAMPAverage
MathInstructHASS2.905.025.353.134.10
MathInstructEAGLE-22.545.045.284.814.42
ShareGPTHASS3.984.093.984.444.12
ShareGPTEAGLE-23.573.723.813.713.70
Mixed 35k+35kHASS3.924.775.024.154.47
Mixed 35k+35kEAGLE-23.374.124.444.164.02
Mixed 70k+70kHASS4.135.535.675.385.18
Mixed 70k+70kEAGLE-23.754.684.854.644.48
AveragedHASS2.292.803.122.132.59
AveragedEAGLE-22.072.532.572.502.42
Confidence RoutedHASS3.935.015.374.894.80
Confidence RoutedEAGLE-23.634.915.254.714.63
Merged TreesHASS4.055.425.655.315.11
Merged TreesEAGLE-23.935.325.635.255.02

Temperature 1

Model VariantMethodMT-BenchGSM8KMATH-500SVAMPAverage
MathInstructHASS2.314.754.632.463.54
MathInstructEAGLE-22.434.714.614.534.07
ShareGPTHASS3.504.033.613.953.77
ShareGPTEAGLE-23.383.723.433.653.54
Mixed 35k+35kHASS3.464.664.474.574.29
Mixed 35k+35kEAGLE-23.104.084.024.033.81
Mixed 70k+70kHASS3.174.163.424.013.69
Mixed 70k+70kEAGLE-22.993.763.203.083.26
AveragedHASS2.102.782.902.692.62
AveragedEAGLE-22.012.492.422.452.34
Confidence RoutedHASS3.514.724.554.714.37
Confidence RoutedEAGLE-23.364.654.624.464.27
Merged TreesHASS3.765.214.985.054.75
Merged TreesEAGLE-23.555.014.794.934.57

Repository map

FolderWhat lives here
Taps-draft1/Paper figures and assets
Hass-Code/HASS draft training/eval scripts (feature build, training, routing, merged-tree)
Eagle-Code/EAGLE-2/3 draft code, training configs, eval utilities, Gradio demo

Setup

  • Python 3.10+; GPU memory sufficient for Meta-Llama-3-8B-Instruct plus draft checkpoints (paper used 4×A100).
  • Prefer per-project virtualenvs to avoid dependency clashes.

HASS install:

python -m venv .venv && source .venv/bin/activate
pip install -r Hass-Code/requirements.txt

EAGLE install:

python -m venv .venv && source .venv/bin/activate
pip install -r Eagle-Code/requirements.txt
pip install -e Eagle-Code

Citation

@article{zbib2026taps,
  title={TAPS: Task Aware Proposal Distributions for Speculative Sampling},
  author={Zbib, Mohamad and Bazzi, Mohamad and Mohanna, Ammar and Hammoud, Hasan Abed Al Kader and Ghanem, Bernard},
  journal={arXiv preprint arXiv:2603.27027},
  year={2026}
}

Contributors

Moe-Zbeeb

36 commits

Moe-Zbeeb/TAPS

SPIGM @ICML https://arxiv.org/abs/2603.27027

8

stars

36

commits

Python

primary language

Apr 4, 2026

updated

README

TAPS: Task-Aware Proposal Distributions for Speculative Sampling

Project Page · March 2026

Mohamad Zbib, Mohamad Bazzi, Ammar Mohanna, Bernard Ghanem*, Hasan Abed Al Kader Hammoud* (*equal advising)
KAUST · AUB — Contacts: mbz02@mail.aub.edu, hasanabedalkader.hammoud@kaust.edu.sa


Task-aware drafts that speed up speculative decoding without sacrificing quality.

HF Weights HF Datasets

Contents

OverviewAbstractHighlightsFiguresResults snapshotRepository mapSetupCitationLicense


Overview

TAPS studies how the draft training distribution shapes speculative decoding quality. Using Meta-Llama-3-8B-Instruct as the verifier and lightweight LLaMA-style drafters (HASS and EAGLE-2, ~0.8B params, shared tokenizer), the work compares single-domain training, mixed-domain training, and inference-time composition (confidence routing, merged-tree verification).

TL;DR (At a glance)

  • Goal: Quantify how draft training data and specialist composition affect speculative decoding.
  • Verifier: Meta-Llama-3-8B-Instruct.
  • Drafts: HASS and EAGLE-2 (single-layer, ~0.8B params, shared tokenizer).
  • Workloads: MT-Bench (chat), GSM8K, MATH-500, SVAMP (reasoning).
  • Metric: acceptance length (lossless speculative decoding).
  • Compute: single node, 4×A100.

Abstract

Speculative decoding speeds up autoregressive generation by letting a lightweight drafter propose tokens that a larger verifier checks in parallel. We study how much draft quality depends on the training distribution using HASS and EAGLE-2 drafts trained on MathInstruct, ShareGPT, and mixed variants, evaluated on MT-Bench, GSM8K, MATH-500, and SVAMP. Task-matched drafts specialize; mixed data aids robustness but is not uniformly dominant across temperatures. Among composition strategies, weight averaging underperforms, confidence routing improves, and merged-tree verification attains the highest acceptance length. Confidence is a stronger routing signal than entropy. Results show speculative decoding quality hinges on both draft architecture and the alignment between draft training data and downstream workload.

Highlights

  • Task-aware specialization: ShareGPT drafts lead MT-Bench (e.g., HASS 3.98 vs. 2.90 for MathInstruct), while MathInstruct drafts dominate GSM8K/MATH-500/SVAMP.
  • Mixed data is nuanced: Mixed 70k+70k (HASS) peaks at temperature 0 with average acceptance length 5.18 but drops at temperature 1 (3.69), where Mixed 35k+35k is steadier.
  • Composition wins: Weight-space averaging is weakest (≈2.4–2.6). Confidence routing reaches ~4.8 average acceptance length; merged-tree verification is strongest (HASS 5.11, EAGLE-2 5.02 at temperature 0).
  • Routing signal: Confidence cleanly separates workloads (MathInstruct chosen for 90.8% of GSM8K; ShareGPT for 81.2% of MT-Bench). Entropy is diagnostic but weaker for routing.

Figures

Speculative decoding pipeline with draft proposals verified by the target model Merged-tree verification combining MathInstruct and ShareGPT draft trees
Speculative decoding pipeline.Merged-tree verification packs MathInstruct and ShareGPT trees for one-pass verification.

Interpolation sweep for checkpoint averaging between MathInstruct and ShareGPT drafts
Checkpoint averaging is unstable across interpolation weights and remains weaker than inference-time composition.

Acceptance by speculative depth across backbones, benchmarks, and temperatures Accepted vs. rejected token entropy for EAGLE-2 drafts
Acceptance declines with depth but specialization persists.Rejected tokens show higher entropy; confidence remains the stronger routing signal.

Results snapshot

Benchmarks: MT-Bench (chat), GSM8K, MATH-500, SVAMP. Metric: average acceptance length (higher is better) under lossless speculative decoding. Tables stay inline (no collapses).

Temperature 0

Model VariantMethodMT-BenchGSM8KMATH-500SVAMPAverage
MathInstructHASS2.905.025.353.134.10
MathInstructEAGLE-22.545.045.284.814.42
ShareGPTHASS3.984.093.984.444.12
ShareGPTEAGLE-23.573.723.813.713.70
Mixed 35k+35kHASS3.924.775.024.154.47
Mixed 35k+35kEAGLE-23.374.124.444.164.02
Mixed 70k+70kHASS4.135.535.675.385.18
Mixed 70k+70kEAGLE-23.754.684.854.644.48
AveragedHASS2.292.803.122.132.59
AveragedEAGLE-22.072.532.572.502.42
Confidence RoutedHASS3.935.015.374.894.80
Confidence RoutedEAGLE-23.634.915.254.714.63
Merged TreesHASS4.055.425.655.315.11
Merged TreesEAGLE-23.935.325.635.255.02

Temperature 1

Model VariantMethodMT-BenchGSM8KMATH-500SVAMPAverage
MathInstructHASS2.314.754.632.463.54
MathInstructEAGLE-22.434.714.614.534.07
ShareGPTHASS3.504.033.613.953.77
ShareGPTEAGLE-23.383.723.433.653.54
Mixed 35k+35kHASS3.464.664.474.574.29
Mixed 35k+35kEAGLE-23.104.084.024.033.81
Mixed 70k+70kHASS3.174.163.424.013.69
Mixed 70k+70kEAGLE-22.993.763.203.083.26
AveragedHASS2.102.782.902.692.62
AveragedEAGLE-22.012.492.422.452.34
Confidence RoutedHASS3.514.724.554.714.37
Confidence RoutedEAGLE-23.364.654.624.464.27
Merged TreesHASS3.765.214.985.054.75
Merged TreesEAGLE-23.555.014.794.934.57

Repository map

FolderWhat lives here
Taps-draft1/Paper figures and assets
Hass-Code/HASS draft training/eval scripts (feature build, training, routing, merged-tree)
Eagle-Code/EAGLE-2/3 draft code, training configs, eval utilities, Gradio demo

Setup

  • Python 3.10+; GPU memory sufficient for Meta-Llama-3-8B-Instruct plus draft checkpoints (paper used 4×A100).
  • Prefer per-project virtualenvs to avoid dependency clashes.

HASS install:

python -m venv .venv && source .venv/bin/activate
pip install -r Hass-Code/requirements.txt

EAGLE install:

python -m venv .venv && source .venv/bin/activate
pip install -r Eagle-Code/requirements.txt
pip install -e Eagle-Code

Citation

@article{zbib2026taps,
  title={TAPS: Task Aware Proposal Distributions for Speculative Sampling},
  author={Zbib, Mohamad and Bazzi, Mohamad and Mohanna, Ammar and Hammoud, Hasan Abed Al Kader and Ghanem, Bernard},
  journal={arXiv preprint arXiv:2603.27027},
  year={2026}
}

Contributors

Moe-Zbeeb

36 commits

Languages

Python

94.4%

Shell

5.6%