Skip to content
Fine-tuning

Estimate LLM fine-tuning cost before launching

Budget training, base-versus-tuned evaluation, storage, iteration, and inference with Tensorant's provider controls and transparent cost formulas.

By Tensorant9 min readGetting startedUpdated

What you will build

Set a realistic budget for a model experiment and its ongoing serving.

Steps in this guide

LLM fine-tuning cost includes more than the training GPU. Budget the training-token fee, the baseline evaluation, adapter evaluation, persistent storage, repeated experiments, any data-generation or judge calls, and the inference service your application will use afterward.

Tensorant runs training on Tensorant compute, charged per second from prepaid credits at the prices in GPU pricing, or, with the Own compute subscription, in your selected RunPod, Verda, Lambda, AWS, Azure or Google Cloud account. Every training run, trials included, also pays a training-token fee from your credits, wherever it runs. On your own accounts, managed evaluation and inference run in your RunPod account. The console gives you hourly-price and runtime controls, dataset checks, launch estimates, and billing visibility. Use them to make each experiment a deliberate decision, then reconcile estimates with the provider's settled bill.

This guide builds a budget for the support-router example using Qwen/Qwen3-4B-Instruct-2507. All dollar values below are illustrative planning assumptions, not RunPod prices or promised runtimes. Replace them with the GPU prices, observed durations, and storage charges for your organization.

1. Separate one experiment from the whole project

An experiment in Tensorant uses three GPU stages:

  1. Deploy the base model and evaluate it on the version's test examples.
  2. Train an adapter on the training split and release the training GPU.
  3. Deploy the adapter, evaluate it on the same test examples, and clean up.

Those stages may use different training and serving GPUs, and different numbers of GPUs. Their price limits and time limits are separate settings in Experiments. On a machine of several GPUs, the price and the price limit are the whole machine's.

Your total project budget also needs to cover items outside that workflow:

Item What drives it
Data preparation Review effort, imports, generation calls, and quality-judge calls
Repeated experiments Method, data, and hyperparameter changes
Persistent and local storage Network volume or bucket, instance disks, retained recovery disks, cached models and adapters
Deployment left running GPU time between evaluation and shutdown
Published inference Dedicated uptime or serverless worker runtime and warm time
Training-token fee Tokens trained, epochs included, at the rate for the base model's size
Own compute subscription Only if you train or serve on your own GPU accounts

Use RunPod's billing documentation and Tensorant's pricing and billing to confirm who bills each item. Tensorant is pay as you go: there is no subscription to start, and the training-token fee comes on top of GPU time.

2. Calculate the launch estimate from limits

Before launch, an experiment shows two figures that assume each stage runs for its full time limit. Up to $X at today's prices uses each GPU's current price. Ceiling at your price limits uses each stage's time limit and price limit:

text
Ceiling at your price limits =
    training time limit (hours) × training price limit ($/hour)
    + 2 × time limit per deployment (hours) × serving price limit ($/hour)

For an illustrative plan:

Setting Assumption
Training Time limit (hours) 2
Training Price limit ($/hour) $1.20
Time limit per deployment (hours) 1
Serving Price limit ($/hour) $0.80

The ceiling is 2 × $1.20 + 2 × 1 × $0.80 = $4.00. A reused baseline leaves out one deployment.

This figure does not cover everything a provider may bill. It leaves out network storage, CPU and disk fees, data transfer and GPU release time. A kept deployment or a model left running after the experiment also creates additional spend. Neither figure is a provider billing cap: time and price limits govern the planned stages, while cleanup delays and recovery can add charges. Read experiment costs.

The runtime and price limits are the controls to configure carefully. Do not set a low time limit merely to produce a smaller ceiling if the run is likely to hit it and require starting over.

3. Estimate duration from your actual workload

For training, model size alone is insufficient. Example count, token length, epochs, batch settings, hardware, initialization, and model download all influence elapsed time.

A useful rough workload calculation is:

text
Effective batch size = micro batch size × gradient accumulation × number of GPUs
Approximate optimizer steps =
    ceil(training examples / effective batch size) × epochs

For example, 800 training examples, micro batch size 1, accumulation 4, and 2 epochs imply roughly 400 optimizer steps on one GPU. This is a planning approximation; partial batches and the trainer's configuration affect the exact step count. Two datasets with 800 rows can still have very different costs if their token lengths differ.

The same tokens set the training-token fee: every token the trainer trains on counts, once per epoch. For example, 800 training examples of about 600 tokens, trained for 2 epochs, train about 960,000 tokens. On a model of up to 16B parameters, such as this guide's 4B model, that is a fraction of a dollar at the rate in the fee table. The launch preview states the fee before the GPU starts: about what it will be and the most it can be.

Before starting a GPU, open Versions and read Readiness for training for the version, with the intended Training window (tokens) under Advanced settings. Inspect Median tokens, Longest 5% from, and Longest, plus examples Longer than the training window. This tokenizer-based check does not start a GPU. See Dataset readiness.

When using a new model, GPU, or training window for a larger workload, consider a small training trial. It needs no baseline, and its training-token fee covers only the sample it trains on. The selected training provider still bills its GPU time. Its throughput and extrapolated full-run cost can improve your estimate, but its small sample can miss long examples that later exhaust memory. Match the full run's objective and method: DPO scores both responses and a reference policy, so an SFT trial does not estimate DPO cost.

For evaluation, count test prompts, bound output tokens, and consider the serving GPU's throughput. A label-only classifier can use a much smaller output allowance than a long-answer assistant. With an LLM judge, in an evaluation or an experiment, allow one extra model call per test answer and check its separate provider bill.

4. Make the first experiment informative

Build a reviewed dataset before buying more GPU time. For support-router, inconsistent billing and technical labels can waste every experiment, regardless of model size.

  1. Create a Classification project with the Qwen instruct model.
  2. Import representative labeled conversations under Sources.
  3. Correct labels and remove unnecessary identifiers in Review.
  4. Choose Create version in Versions and inspect category coverage and the number of test documents.
  5. Choose a metric and acceptance threshold that reflect your application before launch.

The Qwen guide walks through this dataset and experiment. Keep a test set that represents real difficult requests; an easy test can make a cheap adapter look useful while leaving expensive operational mistakes unresolved.

Start with default training settings and a small supported model. Choose LoRA if it fits with room for your examples. Try QLoRA when memory pressure forces a costly GPU choice. A lower-memory method is not automatically the faster or cheaper configuration. Compare quality and settled spend, as described in LoRA vs QLoRA.

5. Budget iteration before approving launch

Reserve money for a small number of specific iterations. For example, plan three experiments:

Experiment Question it answers
First reviewed dataset with LoRA Does adapting the small model improve routing?
A corrected dataset version Do new independent boundary examples fix observed mistakes?
QLoRA or one parameter change Can the same requirement be met with a better compute configuration?

Using the $4.00 illustrative launch estimate, three experiments allocate $12.00 for their ceilings at your price limits. Add a separate allowance for storage, non-GPU machine fees, generation, trials, cleanup, and serving. Do not describe $12.00 as the project's total bill.

Choose Check and review launch and resolve any failed readiness checks. The approval shows the cost figures, the training run's training-token fee, and any warnings. Read them before Approve and start. Check your RunPod balance under Connections.

Leave Continue automatically on, the default, when you do not need stage reviews. Without it, the experiment pauses before training and before the tuned model is deployed, at points where no GPU runs. Keep Keep the tuned model running after the comparison off unless you have a planned Playground session, and stop that deployment afterward.

6. Reconcile estimates with billed spend

An illustrative completed experiment might have 45 minutes of training-machine runtime and 12 minutes for each evaluation deployment. If their hourly GPU rates were $1.20 and $0.80:

text
Training GPU component: 0.75 × $1.20 = $0.90
Two evaluation GPU components: 2 × 0.20 × $0.80 = $0.32
Total GPU component: $1.22

Use total billable machine runtime in this calculation, not only the interval between the first and last optimizer step. Startup and model preparation consume time too. The illustrative $1.22 still excludes the other charges already identified.

The experiment's page shows Spent so far, with the Baseline, Training, and Tuned model stages, and All experiments shows each total under Spend. Tensorant initially shows estimated spend, then actual spend for RunPod resources when its billing arrives. Training spend for other providers remains estimated: reconcile it against their bills, including disk and transfer charges. “May still change” means the bill has not settled. The network volume is shared, so it appears separately under Connections, rather than as a charge on each run. See estimated and actual spend.

If a run reaches its runtime limit, resolve Needs recovery promptly. A stopped, deallocated or hibernated machine can still incur storage charges. Lambda cannot suspend its instance and keeps billing the GPU until you recover the output or cancel the run. Tensorant cannot resume training from its checkpoint. Check whether an adapter was completed; otherwise cancel and launch a properly sized new run.

7. Include production inference in the decision

Training is occasional; inference may run every day. At an illustrative dedicated GPU rate of $0.80 per hour, 30 days of continuous operation would have a GPU component of 720 × $0.80 = $576, before other charges. That can dominate a small training budget.

When you publish a model on Models, choose the Wake on request card for occasional traffic when callers can tolerate cold starts. On your own RunPod account, RunPod bills worker startup, requests, and warm time. Always on suits steady traffic or applications requiring ready capacity, and bills while idle. Compare these choices in serverless vs dedicated inference.

Use separate production and development API keys, keep keys on your server, and configure appropriate key restrictions under Keys and usage. Track request volume and output length alongside reviewed model quality.

For a ticket router, a useful business metric is cost per correctly routed ticket, with a separate count of costly misroutes. Include serving, review, and correction costs when comparing a fine-tuned model with a larger prompted model. Select the model that meets the routing requirement at a sustainable total cost, then revisit the budget when traffic or ticket patterns change.