Skip to content

Commit 43ffad7

Browse files
committed
Update doc
1 parent 2d62816 commit 43ffad7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/api/python/sampling.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Kernels for LLM sampling.
1313
sampling_from_probs
1414
top_p_sampling_from_probs
1515
top_k_sampling_from_probs
16+
min_p_sampling_from_probs
1617
top_k_top_p_sampling_from_probs
1718
top_p_renorm_prob
1819
top_k_renorm_prob

python/flashinfer/sampling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def min_p_sampling_from_probs(
219219
min_p: torch.Tensor,
220220
deterministic: bool = True,
221221
) -> Tuple[torch.Tensor, torch.Tensor]:
222-
r"""Fused GPU kernel for min_p sampling from probabilities,
222+
r"""Fused GPU kernel for `min_p sampling <https://arxiv.org/abs/2407.01082>`_ from probabilities,
223223
224224
this operator implements GPU-based rejection sampling without explicit sorting.
225225
@@ -235,7 +235,7 @@ def min_p_sampling_from_probs(
235235
where the first dimension is the maximum number of rounds for rejection sampling.
236236
Expected to be uniformly distributed in ``[0, 1)``.
237237
min_p: torch.Tensor
238-
The threshold for min_p sampling for each request, shape ``(batch_size,)``.
238+
The :math:`p_{\text{base}}` in min_p sampling for each request, shape ``(batch_size,)``.
239239
deterministic: bool
240240
Whether to use deterministic kernel implementation, default is ``True``.
241241

0 commit comments

Comments
 (0)