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 module

logprobs

Registers log-probability computation graph ops used by sampling pipelines.

comptime values

logit_dtype

comptime logit_dtype = DType.float32

Element type of logit tensors used by log-probability ops.

offset_dtype

comptime offset_dtype = DType.uint32

Element type of row offset tensors used by log-probability ops.

token_dtype

comptime token_dtype = DType.uint32

Element type of token id tensors used by log-probability ops.

Structs

  • FixedHeightMinHeap: Maintains a fixed-capacity min-heap of key/value pairs used to track top-k logits.
  • LogProbabilitiesRagged: Registers the compute_log_probabilities_ragged graph op computing per-token log probabilities over ragged batches.

Functions