Nous.Eval.Scorers.MaxTokens (nous v0.21.1)

Copy Markdown View Source

Passes when the sample's token use (summed over the whole run tree) is at most :max.

{Nous.Eval.Scorers.MaxTokens, max: 20_000, required: false, weight: 0}

Declare it track-only (required: false, weight: 0) unless the budget is a hard requirement: the result is then recorded for every sample without deciding the verdict.

Options

  • :max - the token limit (required)
  • :field - :total (default), :input or :output

Reads Nous.Eval.ScoreInput.usage. details.tokens holds the count.