СледваСледващо ръководство
Спекулативно декодиране с EAGLE
технически
Техническо РЪКОВОДСТВО
Спекулативното дедиране може да ускори генерирането от големи модели, като позволи на по-бърз проект да предложи токени за проверка от целевия модел на партиди.
Чуйте това ръководствоAI-разказан · ~2 min
Exact speculative sampling can preserve the target distribution, but speedup depends on draft cost, acceptance rate, batching and hardware.
Normally an LLM generates text one token at a time: each token requires a full forward pass through the giant model, and you can't start the next until the current one finishes. For large models at low batch sizes, decoding can be memory-bandwidth bound: each token step reads many weights, so moving data may dominate arithmetic. Other batch sizes and workloads can have different bottlenecks. Speculative decoding breaks the bottleneck. A small, cheap draft model proposes a chunk of, say, five candidate tokens. The large 'target' model then processes all five in a single parallel forward pass and checks them. In greedy decoding, the target accepts the matching prefix and uses its own token at the first mismatch, discarding the remaining draft. Exact sampling uses a rejection-sampling correction to preserve the target distribution; acceptance is not always simple token equality. The target can verify a drafted block in a parallel pass, but verification still costs computation. Net speedup depends on draft-model cost, how many tokens are accepted, and the hardware and workload.
7B проект на модел, предлагащ токени за 70B чат модел за намаляване на забавянето на отговора в асистент за производство
Главите на Medusa са завинтени към LLM, така че предсказва няколко бъдещи токена наведнъж без отделен модел на чернова
vLLM, позволяващ спекулативно декодиране за повишаване на пропускателната способност на токени за секунда на обслужващ клъстер
EAGLE чертае в пространството на скритите функции на модела, за да увеличи степента на приемане и общата скорост
Serving frameworks offer speculative decoding and self-drafting variants, but the best method depends on the target model, workload and hardware. Systems should measure latency, throughput, acceptance rate, memory use and output-distribution requirements rather than assume a fixed speedup. Some methods use a separate drafter; others add heads or use feature-space proposals. Continued research is likely to improve these tradeoffs, but deployment gains must be measured on the actual service.
Безплатен бюлетин
Три проверени AI истории всяка делнична сутрин, написани на достъпен език. Безплатно завинаги, без реклами.
Един имейл всеки делничен ден. Отписване с едно кликване. Никога не продаваме и не споделяме вашия имейл адрес.
Тествайте себе си
Незабавна обратна връзка за всеки отговор и сертификат за споделяне с подлежащ на проверка идентификационен номер, след като преминете курс.
Подкрепете безплатното AI образование. AI Understanding е 501(c)(3) с нестопанска цел — без реклами, без платен достъп, никога. Направете дарение
Speculative decoding can speed up large-model generation by letting a faster drafter propose tokens for a target model to verify in batches. Exact speculative sampling can preserve the target distribution, but speedup depends on draft cost, acceptance rate, batching and hardware.
Бързият чернови модел предлага множество токени, а големият целеви модел ги проверява всички в едно паралелно преминаване.
For large models at low batch sizes, repeatedly reading weights can dominate arithmetic, though the bottleneck depends on workload.
In greedy verification, the target corrects the first mismatch and the remaining drafted suffix is discarded; exact sampling uses a rejection-sampling correction instead.
The exact rejection-sampling correction preserves the target model’s distribution; this is distinct from relaxed variants.
Колкото повече изготвени токени приеме целевият модел на стъпка за проверка, толкова по-голямо е ускоряването.
Продължавай да учиш
Още ръководства, избрани за тази тема
СледваСледващо ръководство
Спекулативно декодиране с EAGLE
технически