Mojo module
topk_fi
Structsβ
- β
ValueCount: A struct that holds a value and a count, used for block reductions.
Functionsβ
- β
apply_min_p_mask_kernel: Zero out probabilities below the per-row min_p threshold. - β
device_sampling_from_prob: Device-level sampling from probability distribution with atomic operations. - β
get_min_max_value: Compute the minimum and maximum values from input data using block reduction. - β
topk_mask_logits: - β
topk_sampling_from_prob: Top-K sampling from probability distribution. - β
topk_softmax_sample: Samples token indices from top-K logits using softmax probabilities. - β
topk_softmax_sample_kernel: - β
topk_topp_sampling_from_prob: Joint top-k + top-p sampling from probability distribution. - β
TopKMaskLogitsKernel: - β
TopKSamplingFromProbKernel: Kernel for top-k sampling from probability distribution. - β
TopKTopPSamplingFromProbKernel: Kernel for joint top-k + top-p sampling from probability distribution.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!