Ururimi AI

Kugenzura Icyitegererezo

Speculative sampling uses a draft model to propose tokens and a target model to verify them.

Umva iki gitaboAI-byavuzwe · ~2 min

Kuriyi page2 min soma
  1. Incamake
  2. Kwibira cyane
  3. Gushyira mu bikorwa Isi
  4. Ejo hazaza h'icyitegererezo cyo kugenzura
  5. Kubishyira mubikorwa
  6. Komeza Ubushakashatsi
  7. Ibibazo bikunze kubazwa

Incamake

With the exact rejection-sampling correction, it preserves the target distribution; speedup depends on draft cost, acceptance, target verification and workload.

Kwibira cyane

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.

Gushyira mu bikorwa Isi

Gukora moderi ya 70B yo kuganira hamwe na 7B yerekana icyitegererezo kugirango ugabanye gutinda gusubiza hafi kabiri hamwe nubwiza busohoka.

Imiterere ya Medusa kumutwe umwe uhanura ibimenyetso byinshi bizaza, hanyuma ukabigenzura udafite umushinga wihariye.

Igiti gishingiye ku gutondeka ibiti bitanga amashami menshi kandi bikagenzurwa byose muburyo bumwe.

Kwihutisha abafasha-kurangiza abafasha aho umushinga wikitegererezo ukemura ibyateganijwe byavuzwe ko moderi nini yemeza vuba.

Ejo hazaza h'icyitegererezo cyo kugenzura

Gukoresha decoding yibintu birahinduka mubisanzwe. Impinduka nshya zireka umushinga wintangarugero: kwiyitirira gukoresha hakiri kare-gusohoka cyangwa imitwe yinyongera yo guhanura (Medusa, EAGLE), igishushanyo mbonera cyibiti kigenzura abakandida benshi icyarimwe, kandi decodehead decoding igereranya n-garama. Tegereza kwishyira hamwe hamwe nogucunga hamwe na KV-cache, gucunga ibyuma bingana, hamwe no gukoresha mugukoresha ibicuruzwa bitinda cyane nkabafasha kuganira hamwe nibikoresho bya code aho buri milisegonda ibara.

Kubishyira mubikorwa

Impamvu ari ngombwa

  • Umuvuduko n'igipimo. Ururimi rwakazi rushobora kugenda byihuse nta gutamba guhuzagurika.
  • Kugera no kugera. Yagura uburyo bwindimi nuburyo bwo gutumanaho.
  • Ibyemezo bisobanutse. Amakipe arashobora kumara umwanya munini murubanza mugihe automatike ikora gusubiramo.

Witondere

  • Ibintu bifatika bishobora kwinjiza bucece raporo, gushyigikira imigendekere, cyangwa ibisubizo byubushakashatsi.
  • Kwihuta byihuse birashobora gukora ibisubizo bidahuye mubisabwa bisa.
  • Ibyanditswe byumvikana birashobora kugaragara niba kugenzura kugenzura ari ntege.

Intambwe ikurikira

  1. Sobanura imiterere isohoka, amajwi, hamwe nubuziranenge mbere yo gutangira.
  2. Ibisubizo byibanze hamwe nisoko yizewe igihe cyose ukuri kwingirakamaro.
  3. Komeza kugenzura abantu kugenzura ibisubizo byinshi.
  4. Kurikirana uburyo bwo kunanirwa no kongera imyitozo cyangwa akazi gahoraho.

Komeza Ubushakashatsi

Ibaruwa y'amakuru y'ubuntu

Ibuka amakuru ya buri munsi ya AI

Inkuru eshatu zizewe za AI buri gitondo cy'iminsi y'akazi, zanditse mu rurimi rworoshye. Ubuntu iteka ryose, nta kwamamaza.

Imeri imwe buri munsi y'akazi. Kwiyimura mu buryo bumwe. Ntitwigera tugurisha cyangwa ngo dusangire aderesi yawe.

Isuzume

Take the Speculative Sampling Verification quiz

Ibisubizo ako kanya kuri buri kibazo, n'icyemezo gishobora gusangirwa gifite ID yagenzurwa umaze gutsinda isomo.

Tangira ikibazo

Fasha uburezi bwa AI bw'ubuntu. AI Understanding ni umuryango utegamiye kuri leta wa 501(c)(3) — nta kwamamaza, nta kwishyura, iteka ryose. Tanga impano

Ibibazo bikunze kubazwa

Kugenzura Icyitegererezo ni iki?

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.

Ni ikihe gitekerezo cyibanze inyuma yicyitegererezo?

Inyandiko ihendutse yerekana urugero rwerekana ibimenyetso byinshi imbere, kandi intego ihenze yerekana igenzura byose muburyo bumwe bubangikanye imbere.

Ni ukubera iki icyitegererezo cyo gutesha agaciro kidatesha agaciro ubuziranenge?

Guhindura kwangwa-gutoranya gukosora byemeza ibimenyetso byemewe bitangwa neza nkuko intego yabigenewe yabyaye wenyine.

In exact speculative sampling, what happens when a drafted token is rejected?

Exact speculative sampling uses a rejection-sampling correction and discards the later draft suffix.

Under exact speculative sampling, what is guaranteed about the output distribution?

The rejection-sampling rule preserves the target distribution; this does not guarantee the same sampled string for each random seed.

What information does the target verification pass provide in exact speculative sampling?

The target pass scores the draft proposals and supplies target probabilities used by the acceptance rule and residual correction; it has a computation cost.