DeepSeek、DeepSeek-V4 の生成速度を 60〜85% 向上させる推測的デコーディングフレームワーク「DSpark」を公開
DeepSeek は推論速度を劇的に向上させる新しい推測デコーディングフレームワーク「DSpark」およびトレーニングコード「DeepSpec」をオープンソース化し、既存モデルの生成速度を最大 85% 加速する成果を発表した。
キーポイント
ハイブリッド型ドラフティング機構
高速な並列バックボーンと、接尾辞減衰を防ぐ軽量逐次ヘッド(Markov ヘッド)を組み合わせることで、推測の精度と速度の両立を実現している。
実環境での劇的な速度向上
DeepSeek-V4 モデルへの適用により、MTP-1 ベースラインと比較してユーザーあたりの生成速度が 60–85% 向上し、オフラインでは既存手法より受容トークン数が大幅に増加した。
品質劣化のない完全なオープンソース化
推測デコーディングの理論的保証(分布保存)を維持しつつ、チェックポイントとトレーニングコードが MIT ライセンスで公開され、実装の再現性を担保している。
負荷に応じた動的検証
GPU のアイドル状態や混雑状況に応じて検証するトークン数を調整する信頼度ヘッドとスケジューラーを搭載し、リソース効率を最適化している。
信頼度に基づく動的検証とキャリブレーション
各トークンの生存確率を推定する信頼度ヘッドと、過信を補正する逐次温度スケールリングにより、検証エラーを約1%に低減し、負荷に応じた動的な検証長を可能にします。
MTP-1 대비劇的な生成速度向上
実環境でのテストでは、FlashおよびProモデルにおいてユーザーあたりの生成速度がそれぞれ60–85%と57–78%向上し、特にコード生成や構造化ワークロードで高い受容率を示しました。
低コストでの長文ドラフト最適化
シーケンシャルヘッドの追加により、ドラフト長を4から16に拡張してもラウンドあたりのレイテンシは0.2–1.3%のみ増加し、受容長は最大30%改善されます。
影響分析・編集コメントを表示
影響分析
この発表は、大規模言語モデルの実用化における最大のボトルネックである推論コストと遅延を解決する具体的な技術的突破口を示しています。特に既存モデルの重みを流用して高速化できる点は、企業や開発者が即座に導入可能なメリットであり、LLM 推論インフラの標準的な最適手法として急速に普及することが予想されます。
編集コメント
推論速度の向上のみならず、その背後にある「並列と逐次のハイブリッド設計」という技術的洞察が極めて貴重です。MIT ライセンスでの完全公開は、次世代の推論最適化研究における重要な基盤となるでしょう。
DeepSeek は、オープンソースのチェックポイントとトレーニングコードを公開した推測的デコーディングフレームワーク「DSpark」を発表しました。これは新しいモデルではなく、サービング最適化のためのものです。DeepSeek-V4-Pro-DSpark および DeepSeek-V4-Flash-DSpark のチェックポイントは既存の V4 重みを引き継ぎつつ、ドラフトモジュールを付加した構成となっています。
DeepSeek の研究チームはまた、推測的デコーディング用ドラフターのトレーニングと評価を行うための MIT ライセンス付きコードベース「DeepSpec」もオープンソース化しました。この取り組みが解決しようとしているのは、混雑する本番環境でのサービングにおける大規模モデルの推論速度向上という一つの課題です。
TL;DR
DSpark は、並列ドラフトバックボーンと小さな逐次ヘッドを組み合わせることで、サフィックス減衰(suffix decay)を削減します。
信頼度ヘッダーと負荷認識スケジューラーにより、GPU がアイドル状態のときはより多くのトークンを検証し、混雑時は少ない数に抑えます。
オフライン環境では、Eagle3 および DFlash をそれぞれ 26–31%、16–18% 上回る受容長(accepted length)を実現しています。
DeepSeek-V4 上の本番環境では、MTP-1 ベースラインと比較してユーザーごとの生成速度が 60–85% 向上しました。
出力はロスレスであり、チェックポイントと DeepSpec のトレーニングコードはいずれもオープンソースです。
DSpark とは何か?
推測的デコーディング(speculative decoding)では、生成プロセスを二つの役割に分割します。小さなドラフトモデルがトークンのブロックを提案し、その後、完全なターゲットモデルがそのブロックを一回の順方向パスで検証します。
拒否サンプリング(rejection sampling)は最長の有効プレフィックスを受け入れ、ボーナストークンを一つ付加します。このルールはターゲット分布を正確に維持するため、品質の低下はありません。DSpark もこの保証を保持しています。変更されるのは、トークンのドラフト方法と検証されるトークン数です。
最適化するレイテンシの数式
トークンごとのレイテンシは論文の式 L = (Tdraft + Tverify) / τ に従います。ここでτは1サイクルあたりに受け入れられるトークンの数です。高速化は3つのレバーのみによって実現されます。
Tdraft を下げてドラフトを速くするか、τを上げてドラフトを良くするか、あるいは無駄な Tverify を減らすために検証を賢く行うかのいずれかです。DSpark はこれら 3 つのレバーを同時に引き出します。
仕組み:半自己回帰的生成
従来のドラフターはトレードオフを強いられていました。Eagle3 に代表されるような自己回帰的ドラフターでは、各トークンを先行するトークンに条件付けます。これにより高い受け入れ率を得られますが、ブロックサイズが大きくなるにつれてドラフトコストが増大します。
DFlash に代表される並列ドラフターは、1 回のパスでブロック全体を生成します。ドラフトコストは低く抑えられますが、各位置が近傍の情報を無視するため、結果として「多様性衝突」が発生し、接尾辞に沿って受け入れ率が急速に低下します。
DSpark はドラフト工程を 2 つのステージに分割します。まず、重厚な並列バックボーン(設定では DFlash)がすべての位置に対する基本ロジットを生成します。その後、軽量な逐次ヘッドが各トークンをサンプリングする前に、接頭辞依存バイアスを付加します。
デフォルトの逐次ヘッドはマルコフヘッドです。これは直前の 1 トークンのみ参照します。低ランク分解(ランク 256)により、大規模な語彙サイズであってもコストを抑えています。
位置 1 で「of」がサンプリングされると、このヘッドは「course」の確率を押し上げ、「problem」の確率を抑制します。オプションとして RNN ヘッドも存在し、ブロック全体の接頭辞を追跡しますが、得られる効果は限定的であるため、デフォルトとしてマルコフヘッドが採用されます。
その効果は位置ごとに現れます。DSpark は並列バックボーンの高い最初のトークン精度を受け継ぎ、逐次ヘッドはその後のブロックの深部まで受容率を安定させます。
トレーニングではターゲットモデルを凍結し、埋め込み層と出力ヘッドを再利用します。全変動損失(total-variation loss)が鍵となる項です。この距離を最小化することで、ドラフトの受容率を直接的に最大化します。
仕組み:信頼度スケジューリングによる検証
ドラフトトークンが多ければ必ずしも速度が上がるとは限りません。拒否されるトークンを検証することは、負荷が高い場合にバッチ容量を無駄にします。DSpark はこれを修正するために 2 つの要素を追加しました。
1 つ目は、各ドラフト位置に対するスコアを出力する信頼度ヘッドです。このスコアは、受け入れられた先行トークンが与えられた条件下で、そのトークンが検証を通過する確率を推定します。これは、解析的なステップごとの受容率によって教師付けられます。
生来のニューラルネットワークによる信頼度は通常、過信しがちです。そこで研究チームは、事後の較正手順である逐次温度スケーリング(Sequential Temperature Scaling)を適用しました。これにより、期待される較正誤差を 3–8% から約 1% に削減します。
次に、ハードウェアを意識したプレフィックススケジューラが、リクエストごとの検証長を設定します。これは起動時に一度測定されたプロファイル済みスループット曲線 SPS(B) を使用します。GPU がアイドル状態のときはより多くのトークンを検証し、GPU が混雑しているときは fewer のトークンしか検証しません。
スケジューラは損失のない動作を保つために早期停止ルールを採用しています。付録セクションでは、単純なグローバル検索が情報を漏洩する理由を示す反例が提示されています。
評価指標
オフラインテストでは、数学、コード生成、日常会話の各ドメインをカバーしています。対象モデルには Qwen3-4B、8B、14B および Gemma4-12B が含まれます。DSpark はすべてのドメインにおいて、両方のベースラインを上回る受容長(accepted length)を達成しました。
Eagle3 に対しては、3 つの Qwen3 サイズそれぞれでマクロ平均の受容長が 30.9%、26.7%、30.0% 向上しました。DFlash に対する改善幅は 16.3%、18.4%、18.3% です。さらに、2 レイヤー構成の DSpark でさえも、5 レイヤー構成の DFlash を上回っています。
シーケンシャルヘッド(sequential head)による追加コストは極めて微小です。ドラフト長を 4 から 16 にスケールしても、ラウンドあたりのレイテンシはわずか 0.2%〜1.3% の増加に留まります。その見返りとして、受容長は最大で 30% 向上します。
本番環境での結果は、ライブトラフィック下における DeepSeek-V4-Flash および V4-Pro から得られました。ベースラインは、従来の単一トークン設定である MTP-1 です。スループットを同等に保った条件下で、Flash ではユーザーあたりの処理速度が 60%〜85% 向上し、Pro では 57%〜78% の向上を実現しました。実際に導入された構成は、マルコフヘッド(Markov head)を備えた 5 トークンのドラフトブロックである DSpark-5 です。
Drafter | Drafting style | Block cost | Suffix acceptance | Verification length
---|---|---|---|---
Eagle3 | オートレジレス(Autoregressive) | ブロックサイズに依存して増加 | 高いが安定 | 固定
DFlash | パラレル(Parallel) | ほぼ一定 | 急速に減衰 | 固定(フルブロック)
MTP-1 | 単一トークン(MTP) | 低い—静的な 2 トークン | — | —
DSpark | パラレル+シーケンシャルヘッド | ほぼ一定 | 高く安定 | ダイナミック、負荷対応型
ユースケースと具体例
構造化されたワークロードでは、長い検証期間から最も大きな恩恵を受けます。コード生成においては受容率が本来的に高いため、スケジューラーはわずかな無駄で長いプレフィックスを検証でき、コーディングエージェントがより高速に出力をストリーミングできるようになります。
オープンエンドのチャットは異なる挙動を示します。信頼度閾値のスウィープにより、チャットの受容率は 45.7% から 95.7% に向上しました。信頼度ヘッダーが不確実な接尾トークンをフラグ付けし、それらを剪定できるようにしています。
数学的推論は両者の中間に位置します。同じスウィープにおいて、その受容率は 76.9% から 92.5% に上昇しました。長い段階的な追跡プロセスは、安定した深層ブロックの受容率によって恩恵を受けます。
高同時実行サービスが主要なケースです。中程度の負荷下では、スケジューラーはリクエストあたり約 4〜6 トークンを検証済みとして処理します。同時実行性が上昇すると、スループットを保護するためにこの予算を削減します。
Try It
DeepSpec はデータ準備、トレーニング、評価の 3 つの段階で実行されます。設定ファイルによりアルゴリズムと対象モデルが選択され、評価では訓練済みのドラフトチェックポイントが 9 つのデータセットにわたってベンチマークされます。
Copy CodeCopiedUse a different Browser
Install dependencies
python -m pip install -r requirements.txt
Train a DSpark draft against a Qwen3-4B target.
The algorithm and target are chosen by the config, e.g.
config/dspark/dspark_qwen3_4b.py
bash scripts/train/train.sh
Evaluate the trained draft across the 9 benchmark datasets.
Set in the eval config:
target_name_or_path = Qwen/Qwen3-4B
draft_name_or_path = ~/checkpoints/deepspec/dspark_block8_qwen3_4b/step_latest
bash scripts/eval/eval.sh
デフォルトの設定は、1 ノードに 8 つの GPU を備えた環境を前提としています。GPU 数を減らす場合は CUDA_VISIBLE_DEVICES を調整してください。なお、対象モデルのキャッシュ容量は大きくなる可能性があり、Qwen3-4B の設定では約 38 TB に達する場合があります。
本番環境用のチェックポイントでは、ドラフトモジュールは既存の V4 重み付けに接続されます。Hugging Face のカードには、推論フォルダ内に最小限の推論例が含まれています。ターゲットモデルの再学習は不要です。
以下のインタラクティブなデモでその仕組みを確認できます。ドラフター、ドメイン、GPU負荷レベルを選択してください。ドラフトブロック、信頼度スコア、スケジューラの検証予算がリアルタイムでどのように変化するかをご覧ください。数値は論文で報告された挙動をモデル化した例示的なものです。
(function(){
window.addEventListener("message",function(e){
if(e && e.data && e.data.type==="dspark-resize"){
var f=document.getElementById("dspark-sim-frame");
if(f && e.data.height){ f.style.height=e.data.height+"px"; }
}
});
})();
論文、GitHub、および Hugging Face のモデル重みをご覧ください。また、Twitter でフォローすることもできますし、150,000 人以上の ML サブレッドに参加したり、ニュースレターを購読することを忘れないでください。待ってください!Telegram をご利用ですか?今なら Telegram でも参加できます。
GitHub リポジトリや Hugging Face ページ、製品リリース、ウェビナーなどのプロモーションのためにパートナーシップをご検討の場合は、こちらまでご連絡ください。
本記事「DeepSeek が DSpark を発表:MTP-1 に対して DeepSeek-V4 のユーザー別生成を 60–85% 加速する推測的デコーディングフレームワーク」は、MarkTechPost で最初に公開されました。
原文を表示
DeepSeek released DSpark, a speculative decoding framework, with open-source checkpoints and training code. It is a serving optimization, not a new model. The checkpoints DeepSeek-V4-Pro-DSpark and DeepSeek-V4-Flash-DSpark reuse the existing V4 weights, with a draft module attached.
The DeepSeek research team also open-sourced DeepSpec, an MIT-licensed codebase for training and evaluating speculative decoding drafters. The work targets one problem: faster large-model inference in busy production serving.
TL;DR
DSpark pairs a parallel draft backbone with a tiny sequential head to cut suffix decay.
A confidence head and load-aware scheduler verify more tokens when GPUs are idle, fewer when busy.
Offline, accepted length rises 26–31% over Eagle3 and 16–18% over DFlash.
In production on DeepSeek-V4, per-user generation runs 60–85% faster than the MTP-1 baseline.
Output stays lossless, and the checkpoints plus DeepSpec training code are open-source.
What is DSpark?
Speculative decoding splits generation into two roles. A small draft model proposes a block of tokens. The full target model then verifies that block in one forward pass.
Rejection sampling accepts the longest valid prefix and appends one bonus token. Because the rule preserves the target distribution exactly, there is no quality loss. DSpark keeps this guarantee. It changes how tokens are drafted and how many get verified.
The Latency Math it Optimizes
Per-token latency follows one equation from the paper: L = (Tdraft + Tverify) / τ. Here τ is the number of tokens accepted per cycle. Speedup comes from three levers only.
You can draft faster, lowering Tdraft. You can draft better, raising τ. Or you can verify smarter, reducing wasted Tverify. DSpark pulls all three levers at once.
How It Works: Semi-Autoregressive Generation
Earlier drafters force a trade-off. Autoregressive drafters like Eagle3 condition each token on prior ones. That gives strong acceptance, but drafting cost grows with block size.
Parallel drafters like DFlash produce the whole block in one pass. Drafting stays cheap, but each position ignores its neighbors. The result is ‘multi-modal collision’ and rapid acceptance decay along the suffix.
DSpark splits drafting into two stages. A heavy parallel backbone, DFlash in their setup, produces base logits for every position. Then a lightweight sequential head adds a prefix-dependent bias before sampling each token.
The default sequential head is a Markov head. It only looks at the immediately preceding token. A low-rank factorization (rank 256) keeps it cheap, even with large vocabularies.
Once position one samples ‘of’, the head boosts ‘course’ and suppresses ‘problem’. An optional RNN head tracks the full block prefix. It adds only marginal gains, so the Markov head ships as the default.
The payoff shows up position by position. DSpark inherits the parallel backbone’s high first-token accuracy. The sequential head then holds acceptance steady deep into the block.
Training freezes the target model and reuses its embedding and output head. A total-variation loss is the key term. Minimizing that distance directly maximizes the draft’s acceptance rate.
How It Works: Confidence-Scheduled Verification
More draft tokens do not always mean more speed. Verifying tokens that will be rejected wastes batch capacity under heavy load. DSpark adds two parts to fix this.
A confidence head outputs a score for each draft position. The score estimates the chance that token survives verification, given accepted predecessors. It is supervised by the analytical per-step acceptance rate.
Raw neural confidence is usually overconfident. So the research team applies Sequential Temperature Scaling, a post-hoc calibration step. It cuts expected calibration error from 3–8% down to about 1%.
A hardware-aware prefix scheduler then sets the verification length per request. It uses a profiled throughput curve, SPS(B), measured once at startup. When GPUs are idle, it verifies more tokens. When GPUs are busy, it verifies fewer.
The scheduler uses an early-stopping rule to stay lossless. The appendix section gives a counterexample showing why a naive global search would leak information.
Metrics
Offline tests cover math, code, and daily chat. Targets include Qwen3-4B, 8B, 14B, and Gemma4-12B. DSpark beats both baselines on accepted length across every domain.
Against Eagle3, macro-average accepted length rises 30.9%, 26.7%, and 30.0% on the three Qwen3 sizes. Against DFlash, gains are 16.3%, 18.4%, and 18.3%. A 2-layer DSpark even beats a 5-layer DFlash.
The sequential head adds little cost. Scaling draft length from 4 to 16 adds only 0.2–1.3% per-round latency. In return, accepted length improves by up to 30%.
Production results come from DeepSeek-V4-Flash and V4-Pro under live traffic. The baseline is MTP-1, the prior single-token setup. At matched throughput, per-user speed rises 60–85% on Flash and 57–78% on Pro. The shipped configuration is DSpark-5, a five-token draft block with the Markov head.
DrafterDrafting styleBlock costSuffix acceptanceVerification length
Eagle3AutoregressiveGrows with block sizeHigh, stableFixed
DFlashParallelNear-constantDecays fastFixed (full block)
MTP-1Single-token (MTP)Low—Static 2 tokens
DSparkParallel + sequential headNear-constantHigh, stableDynamic, load-aware
Use Cases With Examples
Structured workloads gain the most from longer verification. In code generation, acceptance is naturally high. The scheduler can verify long prefixes with little waste, so coding agents stream output faster.
Open-ended chat behaves differently. A confidence-threshold sweep raised chat acceptance from 45.7% to 95.7%. The confidence head flags uncertain suffix tokens so they can be pruned.
Math reasoning sits between the two. Its acceptance rose from 76.9% to 92.5% in the same sweep. Long step-by-step traces benefit from steady deep-block acceptance.
High-concurrency serving is the headline case. At moderate load, the scheduler runs roughly 4–6 verified tokens per request. As concurrency rises, it trims that budget to protect throughput.
Try It
DeepSpec runs in three stages: data preparation, training, then evaluation. A config selects the algorithm and target model. Evaluation benchmarks a trained draft checkpoint across nine datasets.
Copy CodeCopiedUse a different Browser
Install dependencies
python -m pip install -r requirements.txt
Train a DSpark draft against a Qwen3-4B target.
The algorithm and target are chosen by the config, e.g.
config/dspark/dspark_qwen3_4b.py
bash scripts/train/train.sh
Evaluate the trained draft across the 9 benchmark datasets.
Set in the eval config:
target_name_or_path = Qwen/Qwen3-4B
draft_name_or_path = ~/checkpoints/deepspec/dspark_block8_qwen3_4b/step_latest
bash scripts/eval/eval.sh
The default configs assume one node with 8 GPUs. Reduce CUDA_VISIBLE_DEVICES for fewer. Note the target cache can be large, near 38 TB for the Qwen3-4B setting.
For the production checkpoints, the draft module attaches to the existing V4 weights. The Hugging Face cards include a minimal inference example in the inference folder. No retraining of the target model is required.
The interactive demo below shows the mechanism. Pick a drafter, a domain, and a GPU-load level. Watch the draft block, the confidence scores, and the scheduler’s verification budget change in real time. The numbers are illustrative, modeled on the paper’s reported behavior.
(function(){
window.addEventListener("message",function(e){
if(e && e.data && e.data.type==="dspark-resize"){
var f=document.getElementById("dspark-sim-frame");
if(f && e.data.height){ f.style.height=e.data.height+"px"; }
}
});
})();
Check out the Paper, GitHub and Model weight on HF. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
The post DeepSeek Releases DSpark, a Speculative Decoding Framework That Accelerates DeepSeek-V4 Per-User Generation 60–85% Over MTP-1 appeared first on MarkTechPost.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み