# DeepSpec

A full-stack codebase for training and evaluating draft models used in speculative decoding, covering data preparation, training and benchmark evaluation.

DeepSpec is a full-stack codebase for training and evaluating draft models for speculative decoding, containing data preparation utilities, draft model implementations, training code and evaluation scripts. Its workflow runs in three stages, each feeding the next: data preparation downloads prompts, regenerates target-model answers, and builds a target cache (which can require tens of terabytes of storage for a default configuration); training then trains a draft model against that cached target output; and evaluation measures speculative-decoding acceptance on benchmark tasks.

Training launches one worker per visible GPU, with the algorithm and target model selected by pointing a config path at one of the project's provided configuration files, and default configs assume a single node with 8 GPUs. Evaluation runs a trained draft checkpoint against benchmarks including gsm8k, math500, aime25, humaneval, mbpp, livecodebench, mt-bench, alpaca and arena-hard-v2, and released checkpoints from the project's paper are available as Hugging Face repositories.

Website: https://github.com/deepseek-ai/DeepSpec
