█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

DeepSpec

speculative decoding के लिए draft models को ट्रेन और इवैल्यूएट करें

Efficient Trainingओपन सोर्स
अपडेट किया गया
26 जून 2026
भाषा
Python
लाइसेंस
MIT
कवरेज
1 story

नया क्या है

26 जून 2026

DeepSeek open-sourced its speculative-decoding stack: DeepSpec, an MIT-licensed codebase for training and evaluating draft models, together with DSpark speculative-decoding modules published alongside its V4-Pro and V4-Flash checkpoints on Hugging Face.

ताज़ा खबरें

संक्षेप में

DeepSpec क्या है?

DeepSpec speculative decoding के लिए draft models को ट्रेन और इवैल्यूएट करें. यह Training & Fine-Tuning टूल्स की Efficient Training श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और MIT लाइसेंस के तहत है। शुरू करने के लिए: dependencies इंस्टॉल करें.

अपडेट किया गया Markdown वर्शन ↗

सारांश

DeepSpec, DeepSeek का एक full-stack कोडबेस है, जो speculative decoding के लिए draft models को ट्रेन और इवैल्यूएट करने की सुविधा देता है। यह एक ऐसी तकनीक है जिसमें एक छोटा और तेज़ model tokens का अनुमान लगाता है, और बड़ा target model उन्हें verify करता है, ताकि महंगे model को हर स्वीकृत token के लिए कम forward passes चलाने पड़ें। एक ही drafter देने के बजाय, यह पूरी pipeline पैकेज करता है: data-preparation utilities, draft-model implementations, training code और evaluation scripts।

वर्कफ़्लो तीन चरणों में चलता है, जो एक-दूसरे को आगे बढ़ाते हैं। Data preparation prompts को डाउनलोड और split करता है, target model से answers फिर से generate करता है, और target cache बनाता है। यह ऐसा चरण है जिसमें काफ़ी storage लगती है, डिफ़ॉल्ट Qwen3-4B सेटिंग के लिए लगभग 38 TB। फिर training उन cached target outputs के आधार पर draft model फ़िट करती है, और हर visible GPU के लिए एक worker शुरू करती है; डिफ़ॉल्ट configs एक single node पर आठ GPUs मानते हैं। Evaluation एक standard benchmark set पर speculative-decoding acceptance मापता है, जिसमें GSM8K, MATH-500, AIME25, HumanEval, MBPP, LiveCodeBench, MT-Bench, AlpacaEval और Arena-Hard-v2 शामिल हैं।

तीन draft-model algorithms शामिल हैं: DSpark, DFlash और Eagle3। हर एक के configs config/ के अंतर्गत हैं, और Qwen3-4B, Qwen3-8B, Qwen3-14B तथा Gemma-4-12B-it के लिए released checkpoints Hugging Face पर उपलब्ध हैं, जो paper की results table से मेल खाते हैं। यह repository MIT-licensed है और पहले के ओपन सोर्स काम पर आधारित है, खासकर training framework और Eagle3 implementation के लिए SpecForge, तथा DFlash draft-model recipe; इसका attribution NOTICE फ़ाइल में दर्ज है।

यह क्या करता है

  • एंड-टू-एंड पाइपलाइन: एक ही repository में data preparation, draft-model training और speculative-decoding evaluation
  • तीन drafter algorithms शामिल: DSpark, DFlash और Eagle3, जिन्हें config_path को किसी config फ़ाइल पर सेट करके चुना जाता है
  • Qwen3-4B, Qwen3-8B, Qwen3-14B और Gemma-4-12B-it targets के लिए Hugging Face पर released draft checkpoints
  • GSM8K, MATH-500, AIME25, HumanEval, MBPP, LiveCodeBench, MT-Bench, AlpacaEval और Arena-Hard-v2 पर acceptance मापा गया
  • Multi-GPU training, जो हर visible device के लिए एक worker शुरू करती है, और --opts के ज़रिए प्रति-field config overrides
  • MIT-licensed, और NOTICE में SpecForge तथा DFlash के third-party attribution दर्ज

शुरू करें

तीनों चरण क्रम से चलाएँ, क्योंकि हर चरण का output अगले चरण को मिलता है। Data preparation शुरू करने से पहले storage की ज़रूरत नोट कर लें, और पूरी config सूची के लिए script headers देखें।

Dependencies इंस्टॉल करें

Data preparation के लिए अतिरिक्त रूप से एक inference engine चाहिए, जो answers फिर से generate होते समय target model को serve करे; देखें scripts/data/README.md।

bashbash
python -m pip install -r requirements.txt

डेटा तैयार करें

Training data डाउनलोड करके split करें, target model से answers फिर से generate करें, और target cache बनाएँ। यह cache बड़ा होता है: डिफ़ॉल्ट Qwen/Qwen3-4B सेटिंग के लिए लगभग 38 TB।

Draft model ट्रेन करें

train.sh, train.py को लॉन्च करता है, जो हर visible GPU के लिए एक worker शुरू करता है। Algorithm और target model चुनने के लिए config_path को config/ के किसी config पर सेट करें। Checkpoints ~/checkpoints/<project_name>/<exp_name>/step_* में सेव होते हैं।

bashbash
bash scripts/train/train.sh

Acceptance का मूल्यांकन करें

eval.sh, किसी trained checkpoint के लिए benchmark set पर eval.py चलाता है। target_name_or_path को उस target पर सेट करें जिस पर draft ट्रेन हुआ था, और draft_name_or_path को अपने checkpoint या released Hugging Face repo IDs में से किसी एक पर।

bashbash
bash scripts/eval/eval.sh

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • ऐसे target के लिए draft model ट्रेन करें जिसे आप पहले से serve करते हैं, ताकि आपके अपने workload पर speculative decoding उसकी latency कम करे
  • तीन अलग codebases की जगह एक ही training और evaluation setup में DSpark, DFlash और Eagle3 की तुलना करें
  • released checkpoints और matching configs की मदद से प्रकाशित acceptance numbers दोबारा बनाएँ या आगे बढ़ाएँ
  • किसी खास domain के लिए drafter को fine-tune करें, जिसकी सलाह लेखक सामान्य checkpoint दोबारा इस्तेमाल करने के बजाय देते हैं

How DeepSpec compares

DeepSpec alongside other open-source efficient training tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
DeepSpeed★ 43.4kZeRO मेमोरी पार्टिशनिंग और ऑफ़लोडिंग के साथ कई GPU पर बहुत बड़े मॉडल ट्रेन करें
Megatron-LM★ 18.6kबड़े पैमाने पर transformer मॉडल ट्रेनिंग के लिए GPU-optimized लाइब्रेरी
Accelerate★ 10kउसी PyTorch ट्रेनिंग कोड को CPU, multi-GPU और TPU पर चलाएँ
DeepSpec★ 7.3kspeculative decoding के लिए draft models को ट्रेन और इवैल्यूएट करें
TorchTitan★ 6kबड़े पैमाने पर generative AI मॉडल ट्रेनिंग के लिए PyTorch-native प्लेटफ़ॉर्म
LightlySSL★ 3.8kPyTorch-style लाइब्रेरी, जिसमें self-supervised learning के building blocks हैं — MoCo और SimCLR से लेकर DINOv2, CAPI और LeJEPA तक 20+ methods
Nanotron★ 2.9k3D parallelism के साथ transformer LLM प्रीट्रेन करने के लिए मिनिमल और पढ़ने में आसान लाइब्रेरी
Lingvo★ 2.9kGoogle का TensorFlow framework, जिससे MNIST से लेकर trillion-parameter GShard तक के sequence models बनाए और train किए जाते हैं