Model training token budget calculator

Expected token arithmetic with constant mean length and utilization; each epoch rounds up its own step count.

Your inputs

Use the units shown.

Useful training tokens (tokens)
300,000
Optimizer steps (count)
375
Allocated batch token positions (tokens)
375,000

Your calculation
How is this calculated?

Multiply dataset sequence count, mean length and epochs.

Divide one epoch tokens by useful batch capacity, round up and multiply epochs.

Multiply steps by nominal batch capacity.

Expected token arithmetic with constant mean length and utilization; each epoch rounds up its own step count. Padding tokens are modeled as capacity minus useful tokens.

OpenStax Prealgebra 2e — arithmetic and proportions ↗

Try an example

Worked example

Useful training tokens (tokens): 300,000

Inputs
  • Dataset sequences (count): 1000
  • Mean sequence tokens (tokens): 100
  • Training epochs (count): 3
  • Packed batch capacity (tokens): 1000
  • Packing utilization (%): 80

Compare inputs

Useful training tokens (tokens): 300,000

Inputs
  • Dataset sequences (count): 1000
  • Mean sequence tokens (tokens): 100
  • Training epochs (count): 3
  • Packed batch capacity (tokens): 1000
  • Packing utilization (%): 100
Share this page
Share this calculator

Leave unchecked to share the page without your entered values.