# `Nous.Eval.Scorers.MaxTokens`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/eval/scorers/max_tokens.ex#L1)

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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
