IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo struct

Struct_dspark_draft_sample

struct Struct_dspark_draft_sample

Registers the sampler.dspark_draft_sample graph op.

Draws one draft token per row by Gumbel-max over the tempered softmax of (logits + bias) / T and returns that softmax as the distribution the token was drawn from. The draft proposal is temperature-only by construction: the request's top-k and top-p shape the target's distribution, not the draft's, so the draw and the q the verifier reads stay full-support and cannot disagree.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[_trace_name: StaticString](out_tokens: T, out_dist: T, logits: T, bias: T, temperature: T, seed: T, ctx: DeviceContext)

Was this page helpful?