Als nächstesNächster Leitfaden
Feinabstimmung der Ablehnungsstichprobe
Sprach-KI
Sprach-KI-GUIDE
Speculative sampling uses a draft model to propose tokens and a target model to verify them.
Hören Sie sich diesen Leitfaden anKI-erzählt · ~2 min
With the exact rejection-sampling correction, it preserves the target distribution; speedup depends on draft cost, acceptance, target verification and workload.
Autoregressive generation is slow because each token needs a full forward pass of a huge model. Speculative sampling fixes this by pairing a cheap draft model with the expensive target model. The draft proposes a short run of tokens (say 4-8); the target then scores all of them in one parallel forward pass. A modified rejection-sampling rule accepts the longest prefix that is consistent with the target's own distribution and resamples at the first rejected position. Because acceptance is probabilistic and corrected, the final token stream is provably distributed exactly as if the target had generated alone, no quality loss. Speedups vary with draft cost, acceptance rate, target verification, batching and hardware. A parallel verification pass can confirm multiple tokens, but is not free.
Bereitstellung eines 70B-Chat-Modells mit einem 7B-Entwurfsmodell, um die Antwortlatenz bei identischer Ausgabequalität etwa um die Hälfte zu reduzieren.
Köpfe im Medusa-Stil basieren auf einem einzigen Modell, das mehrere zukünftige Token vorhersagt und diese dann ohne ein separates Entwurfsnetzwerk überprüft.
Baumbasierte spekulative Dekodierung, die mehrere Verzweigungsfortsetzungen vorschlägt und sie alle in einem Zieldurchlauf überprüft.
Beschleunigung von Code-Vervollständigungsassistenten, bei denen das Entwurfsmodell vorhersehbare Standardwerte verarbeitet, die das große Modell schnell bestätigt.
Die spekulative Dekodierung wird in Inferenzstapeln zum Standard. Neuere Varianten verzichten auf das separate Draft-Modell: Die Selbstspekulation verwendet Early-Exit- oder zusätzliche Vorhersageköpfe (Medusa, EAGLE), das baumbasierte Drafting überprüft viele Kandidatenfortsetzungen auf einmal und die Lookahead-Dekodierung parallelisiert N-Gramm-Vermutungen. Erwarten Sie eine engere Integration mit Batch- und KV-Cache-Management, hardwarebewusster Entwurfsgröße und einen breiteren Einsatz in latenzempfindlichen Produkten wie Chat-Assistenten und Codierungstools, bei denen jede Millisekunde zählt.
Kostenloser Newsletter
Drei verifizierte KI-Geschichten jeden Werktagmorgen, in einfachem Englisch geschrieben. Für immer kostenlos, keine Werbung.
Eine E‑Mail jeden Werktag. Abmelden mit einem Klick. Wir verkaufen oder teilen Ihre Adresse nie.
Testen Sie sich selbst
Sofortiges Feedback zu jeder Antwort und ein teilbares Zertifikat mit verifizierbarer ID, sobald Sie einen Kurs bestanden haben.
Unterstützen Sie kostenlose KI-Bildung. AI Understanding ist eine 501(c)(3) gemeinnützige Organisation – keine Werbung, keine Paywall, nie. Machen Sie eine Spende
Speculative sampling uses a draft model to propose tokens and a target model to verify them. With the exact rejection-sampling correction, it preserves the target distribution; speedup depends on draft cost, acceptance, target verification and workload.
Ein billiges Entwurfsmodell errät mehrere Token im Voraus, und das teure Zielmodell prüft sie alle in einem einzigen parallelen Vorwärtsdurchlauf.
Die modifizierte Rejection-Sampling-Korrektur garantiert, dass die akzeptierten Token genau so verteilt werden, wie das Zielmodell allein produziert hätte.
Exact speculative sampling uses a rejection-sampling correction and discards the later draft suffix.
The rejection-sampling rule preserves the target distribution; this does not guarantee the same sampled string for each random seed.
The target pass scores the draft proposals and supplies target probabilities used by the acceptance rule and residual correction; it has a computation cost.
Lerne weiter
Weitere Leitfäden zu diesem Thema ausgewählt
Als nächstesNächster Leitfaden
Feinabstimmung der Ablehnungsstichprobe
Sprach-KI