How many tokens do you need to train or fine-tune an LLM? Nodus published a token-budget guide explaining that compute-optimal pretraining takes roughly 20 tokens per parameter under the Chinchilla rule, or about 160 billion tokens for an 8B model, while fine-tuning often needs well under a million tokens. The guide notes Meta trained Llama 3 on over 15 trillion tokens, about 1,875 tokens per parameter for the 8B model, and cites Muennighoff et al.'s finding that repeating data beyond four epochs yields negligible loss improvement. Nodus said its TrainingJob dry run returns an estimated cost before a job runs, with token counts ranging from $3.51 to about $1.75 million of H100 SXM GPU time at $2.60/hr. Pretraining a model from scratch takes about 20 tokens per parameter to be compute-optimal, so roughly 160 billion tokens for an 8B model, while continued pretraining takes billions and a fine-tune often takes well under a million. Nodus prices any of these budgets before it runs: a TrainingJob dry run returns the estimated cost, and at the H100 SXM rate listed at $2.60/hr on the Nodus pricing page, the token counts in this post range from $3.51 to about $1.75 million of GPU time. Which one you need depends on what you want the model to learn, not on how much data you happen to have. Think in tokens first and dollars second. The token count tells you what kind of job you are running, and the cost follows from one formula. One million tokens is about 750,000 English words. OpenAI's token help page https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them gives the rule of thumb: one token is about four characters, or three quarters of a word, for English text. Code, other languages and unusual formatting use more tokens per word, so treat the ratio as an estimate and count with your own tokenizer before you commit money. To make the numbers feel real, we also convert words to pages. We assume 500 words per single-spaced page, which is our assumption, not a standard. | Tokens | English words 0.75 per token | Pages 500 words each | Typical use | |---|---|---|---| | 1,000 | 750 | 1.5 | One long fine-tuning example | | 1 million | 750,000 | 1,500 | A 1,000-example fine-tune with long answers | | 30 million | 22.5 million | 45,000 | 10,000 examples x 1,000 tokens x 3 epochs | | 10 billion | 7.5 billion | 15 million | A modest continued pretraining run | | 160 billion | 120 billion | 240 million | Compute-optimal 8B pretraining | | 15 trillion | 11.25 trillion | 22.5 billion | Llama 3 pretraining | Fine-tuning sits at the top of that table and pretraining at the bottom, about six orders of magnitude apart. It comes from DeepMind's Chinchilla paper https://arxiv.org/abs/2203.15556 Hoffmann et al., 2022 . The authors trained over 400 models from 70 million to over 16 billion parameters on 5 to 500 billion tokens. They found that for a fixed compute budget, model size and training tokens should grow equally: double the parameters, double the tokens. Their test case was Chinchilla itself, a 70B model trained on 1.4 trillion tokens. That is 20 tokens per parameter, and the ratio became the shorthand. Chinchilla used the same compute as the 280B Gopher model and beat it on a wide range of benchmarks. The rule tells you the best model for a given training budget. It says nothing about what that model costs to serve afterwards. Because a smaller model that trained longer is cheaper to run forever after. Meta trained Llama 3 on over 15 trillion tokens https://ai.meta.com/blog/meta-llama-3/ , and its announcement says the Chinchilla-optimal amount for the 8B model is about 200 billion tokens. Meta found both the 8B and 70B models kept improving log-linearly up to 15 trillion tokens. That works out to about 1,875 tokens per parameter for the 8B model 15T / 8B and about 214 for the 70B 15T / 70B . Meta's own explanation is that larger models can match smaller ones with less training compute, but smaller models are much more efficient at inference. Llama 3 8B saw about 94 times more tokens per parameter than the Chinchilla rule suggests. Over-training has a data limit. Muennighoff et al.'s data-constrained scaling study https://arxiv.org/abs/2305.16264 found that repeating data for up to 4 epochs gave negligible change in loss compared with unique data. Past that, the value of more compute eventually decays to zero. If your corpus is 50 billion tokens, a budget much above 200 billion mostly buys repetition. Continued pretraining usually needs billions of tokens, because you are shifting what the model knows, not how it answers. Meta's Code Llama https://arxiv.org/abs/2308.12950 started from Llama 2 weights and trained on 500 billion tokens of code-heavy data 1 trillion for the 70B . The Python variant then added another 100 billion tokens. Most teams adapting a model to a legal, medical or internal corpus work far below that. The binding limit is usually how much clean in-domain text you own, and the 4-epoch finding above caps how far you can stretch it. We cover data mixing, replay of general text and learning rate schedules in our continued pretraining guide https://www.nodus-compute.ai/blog/how-to-run-continued-pretraining/ . Far fewer than most people collect first. OpenAI's supervised fine-tuning guide https://developers.openai.com/api/docs/guides/supervised-fine-tuning sets a minimum of 10 examples and says it sees improvements from 50 to 100. It also says that if 50 examples have no impact, you should rethink the task or prompt before adding data. The LIMA paper https://arxiv.org/abs/2305.11206 Zhou et al., 2023 fine-tuned a 65B LLaMa model on only 1,000 carefully curated prompts and responses. In a controlled human study, its answers were equivalent to or preferred over GPT-4 in 43% of cases. The authors' conclusion is that almost all knowledge is learned in pretraining, and fine-tuning mostly teaches format and style. So the token count for a fine-tune is examples times average length times epochs. A 10,000-example dataset at 1,000 tokens each, trained for 3 epochs, is 30 million tokens. A LIMA-sized set at the same length is 3 million. Training compute is about 6 floating point operations per parameter per token. That approximation comes from Kaplan et al.'s scaling laws paper https://arxiv.org/abs/2001.08361 , where the 6 covers the forward and backward passes. An NVIDIA H100 SXM peaks near 989 teraFLOPS of dense BF16; NVIDIA's H100 page https://www.nvidia.com/en-us/data-center/h100/ lists 1,979 with sparsity, which training rarely uses. We assume 30% model FLOPs utilization MFU , the planning figure we explain in how much it costs to train an LLM https://www.nodus-compute.ai/blog/cost-to-train-an-llm/ . At 30%, one H100-hour delivers 989e12 x 0.30 x 3,600 = 1.068e18 useful FLOPs. Here is the arithmetic once, for continued pretraining of an 8B model on 10 billion tokens: The same formula gives every row below. Prices are the H100 SXM rate listed at $2.60/hr on the Nodus pricing page https://www.nodus-compute.ai/pricing/ . | Job | Model | Tokens | H100-hours | GPU cost | |---|---|---|---|---| | LoRA or full fine-tune 10k examples, 3 epochs | 8B | 30 million | 1.35 | $3.51 | | Small model from scratch, Chinchilla | 1B | 20 billion | 112.3 | $292.10 | | Continued pretraining | 8B | 10 billion | 449.4 | $1,168.41 | | From scratch, Chinchilla | 8B | 160 billion | 7,190.2 | $18,694.53 | | From scratch, Llama 3 style | 8B | 15 trillion | 674,081.6 | $1,752,612.07 | Prices checked November 25, 2026. The fine-tune row is a ceiling. LoRA skips most weight-gradient work, so it needs fewer FLOPs than 6 x N x D, but short sequences and small batches usually run below 30% MFU. Real fine-tunes are dominated by startup, evaluation and your own iteration time, not by the token math. The 8B Chinchilla run costs about 5,300 times the 30-million-token fine-tune. The Llama 3 style row is left out of the chart because it would flatten every other bar. It is about 94 times the Chinchilla 8B cost for the same model size. For GPU counts and deadlines rather than tokens, use our training cost calculator https://www.nodus-compute.ai/blog/llm-training-cost-calculator/ . Start from what the model must learn, then let your data and serving volume set the size. This is the rule we use when we scope runs: Step 3 is rarely the cheapest path to a good model for one company's task, so check steps 1 and 2 first. Convert the budget into steps and let a dry run price it. On Nodus, a TrainingJob on the nodus/sft runtime handles fine-tuning and, with task: Pretrain , continued or from-scratch pretraining. You set parameters.steps and a maxCostUSD cap. Steps times batch size times sequence length should equal your token budget. From the Nodus training docs https://www.nodus-compute.ai/docs/guides/training/ : bash $ nodus apply -f sft.yaml --dry-run -o yaml status.estimate: cost to completion, first hold, start time $ nodus apply -f sft.yaml The estimate is steps times the runtime's measured seconds per step on the slowest GPU type you allowed. If it disagrees with your 6 x N x D math by a lot, find out why before you launch. It depends on the task, so count your own. A classification example may be under 100 tokens, while a chat with long answers can pass 1,000. Multiply your average by examples and epochs to get the training token count. No. The 20 tokens per parameter rule is about pretraining a model at a fixed compute budget. A fine-tune adjusts behavior the model already learned, which is why LIMA needed only 1,000 examples for a 65B model. Yes. The 0.75 words per token ratio is an English rule of thumb, and different tokenizers split text differently. Code and many non-English languages need more tokens per word, so tokenize a sample with the model's own tokenizer. Yes. Nodus TrainingJobs can select the checkpoint with the lowest validation loss and stop after three validation passes without improvement, using parameters.validation in the training docs https://www.nodus-compute.ai/docs/guides/training/ . That turns a fixed token budget into a ceiling rather than a commitment. Originally published on the Nodus blog https://www.nodus-compute.ai/blog/how-many-tokens-to-train-an-llm/ .