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 function

commit_len

def commit_len(row_len: Int, num_draft_tokens: Int) -> Int

The row's tokens before its drafts: a prefill row's real tokens, else row_len.

Args:

  • ​row_len (Int): The row's token count.
  • ​num_draft_tokens (Int): The step's draft-token count per row.

Returns:

Int: row_len - num_draft_tokens for a prefill row, else row_len.

Was this page helpful?