For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
LogProbabilitiesRagged
struct LogProbabilitiesRagged
Implemented traitsβ
AnyType,
ImplicitlyDestructible
Methodsβ
executeβ
static def execute[target: StringSlice[StaticConstantOrigin], levels: Int](lp_logits: ManagedTensorSlice[Output, static_spec=lp_logits.static_spec], lp_tokens: ManagedTensorSlice[Output, static_spec=lp_tokens.static_spec], logits: ManagedTensorSlice[Input, static_spec=logits.static_spec], tokens: ManagedTensorSlice[Input, static_spec=tokens.static_spec], sampled_tokens: ManagedTensorSlice[Input, static_spec=sampled_tokens.static_spec], logit_row_offsets: ManagedTensorSlice[Input, static_spec=logit_row_offsets.static_spec], token_row_offsets: ManagedTensorSlice[Input, static_spec=token_row_offsets.static_spec], lp_output_offsets: ManagedTensorSlice[Input, static_spec=lp_output_offsets.static_spec], lp_output_offsets_host: ManagedTensorSlice[Input, static_spec=lp_output_offsets_host.static_spec], ctx: DeviceContext)
shapeβ
static def shape[levels: Int](logits: ManagedTensorSlice[Input, static_spec=logits.static_spec], tokens: ManagedTensorSlice[Input, static_spec=tokens.static_spec], sampled_tokens: ManagedTensorSlice[Input, static_spec=sampled_tokens.static_spec], logit_row_offsets: ManagedTensorSlice[Input, static_spec=logit_row_offsets.static_spec], token_row_offsets: ManagedTensorSlice[Input, static_spec=token_row_offsets.static_spec], lp_output_offsets: ManagedTensorSlice[Input, static_spec=lp_output_offsets.static_spec], lp_output_offsets_host: ManagedTensorSlice[Input, static_spec=lp_output_offsets_host.static_spec]) -> IndexList[2]
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!