GitHub DeepSeek-AI/DeepSpec DeepSeek-AI released DeepSpec, an open-source codebase for training and evaluating draft models for speculative decoding, supporting three draft model algorithms (DSpark, DFlash, Eagle3) and requiring up to 38 TB of storage for target cache preparation. The project, licensed under MIT, aims to accelerate inference by enabling efficient speculative decoding with target models like Qwen3 and Gemma. DeepSpec is a full-stack codebase for training and evaluating draft models for speculative decoding. It contains data preparation utilities, draft model implementations, training code, and evaluation scripts. Install the Python dependencies: python -m pip install -r requirements.txt Data preparation additionally requires an inference engine to serve the target model when regenerating answers; see scripts/data/README.md /deepseek-ai/DeepSpec/blob/main/scripts/data/README.md for details. Run the stages in order — each stage's output feeds the next: Data Preparation — download prompts, regenerate target answers, and build the target cache. Training — train a draft model against the cached target outputs. Evaluation — measure speculative-decoding acceptance on benchmark tasks. See scripts/data/README.md /deepseek-ai/DeepSpec/blob/main/scripts/data/README.md for the step-by-step data pipeline: - download and split training data, - regenerate answers, - prepare the target cache storage warning: this can be very large — roughly 38 TB for the default Qwen/Qwen3-4B setting . bash scripts/train/train.sh train.sh launches train.py , which spawns one worker per visible GPU. Select the algorithm and target model by pointing config path at one of the configs under config/ /deepseek-ai/DeepSpec/blob/main/config e.g. config/dspark/dspark qwen3 4b.py ; see the script header for the full list of configs, how to override config path / target cache dir , and how to use --opts to override individual config fields. Checkpoints are written to ~/checkpoints/