Skip to content
View as Markdown

Learning rate guidance

The learning rate is the most important hyperparameter to get right. This page walks through a three-step workflow:

  1. Choose a starting learning rate for a small or mid-size model, using the Cookbook's get_lr as a starting point.
  2. Tune on a small amount of data with quick sweeps.
  3. Scale up for the full run, which usually changes the data, batch size and model together:
    1. Adjust for batch size and token budget on the small model.
    2. Transfer to a larger model, if needed, with the calibrated model multipliers.

The experiments behind this guidance are collected in Supporting experiments at the end of the page. The get_lr baselines and model multipliers are for AdamW LoRA SFT training. The guidance on LoRA rank, batch size and token budget covers both AdamW and Dimuon, though each optimizer differs in its own learning rate.

For the hyperparameters each optimizer accepts and their defaults, see Optimizers.

Consider validating your learning rate transfer

The rules on this page give you good starting points, but they may not hold in unusual setups. We recommend you use these rules, but also sweep a few values and check the result on your own validation set or downstream evals.

Choose a starting learning rate

Start with a small or mid-size model, even if your final target is larger: sweeps on it are quicker and cost less. See Models & Pricing for the models Tinker supports.

For AdamW LoRA supervised fine-tuning, use get_lr from the Cookbook to choose the center of your first learning rate sweep:

from tinker_cookbook import hyperparam_utils

model = "Qwen/Qwen3.5-9B"
starting_lr = hyperparam_utils.get_lr(model)  # Approximately 4.1e-4

get_lr gives a baseline, calibrated on an example corpus, to center your first sweep on; it is not necessarily tuned for your model or task. The best learning rate for your data and setup can differ from it substantially, so sweep around it as described in Tune on a small amount of data. The baseline is intended for AdamW LoRA SFT at rank 32, about 128 sequences per batch, several hundred steps and linear learning rate decay to zero. get_lr does not cover Dimuon or full fine-tuning.

Tune on a small amount of data

We recommend you start experimenting with the small or mid-size model from step 1 on a quick, small run, rather than sweeping your target model directly. Each trial costs less and finishes sooner, and the calibrated multipliers let you carry the result to a larger model at the end. If your target model is already cheap enough to sweep, tune it directly; you will not need the transfer step.

Configure your training setup. Use the same dataset, optimizer, loss function and learning rate schedule as your final run. Train on a small subset of the dataset, so that each trial is quick and cheap.

Use learning rate decay. In our SFT tests, a linear decay to zero schedule achieved a 1.3x step efficiency compared to a constant learning rate. You control the schedule by changing the learning_rate passed to each optim_step.

Sweep the learning rate. For AdamW LoRA SFT, center the sweep on the small model's get_lr baseline. For Dimuon, use the Optimizers quick reference. Start with a coarse sweep around your starting point, then narrow it around the values that work best. Optionally, sweep batch sizes too. Give each trial the same training examples and token budget; adjust the number of steps when batch size changes. Select the learning rate and batch size with the lowest loss on a fixed validation set, or with the best downstream performance, based on your judgment.

Scale up for the full run

Your eventual large tinker run usually changes the data, batch size and even the base model together. Make the data and batch size adjustments on a small model first, then transfer the result to the larger model. That way, you can de-risk the data and batch size tuning sweeps on the cheaper model, and scale to the larger model with more confidence.

Adjust for batch size and token budget

With a learning rate tuned at small scale, adjust it for the full run instead of running a full sweep again. Use it as a starting point when you increase rank (see LoRA rank invariance), and scale it for batch size and token budget (see batch size dependence and token budget dependence). The aim is to reduce tuning cost by finding a learning rate on a smaller run that should also work well at full scale.

Your final run usually has a larger token budget, with much more data. When doing a larger run, increasing batch size can help reduce the overall wall-clock time, because a larger batch size enables Tinker to run more work in parallel. As a rule of thumb:

  • As you increase batch size, increase the learning rate: \(\mathrm{LR} \propto \sqrt{B}\) (see batch size dependence).
  • As you increase token budget, decrease the learning rate: \(\mathrm{LR} \propto T^{-1/4}\) (see token budget dependence).

Here, \(B\) is the number of examples per optimizer step, and \(T\) is the total input-token budget for the run, as defined below.

Often, you are increasing both batch size and token budget. Putting the rules above together yields:

\[ \mathrm{LR}_{\mathrm{new}} = \mathrm{LR}_{\mathrm{ref}} \left(\frac{B_{\mathrm{new}}}{B_{\mathrm{ref}}}\right)^{1/2} \left(\frac{T_{\mathrm{new}}}{T_{\mathrm{ref}}}\right)^{-1/4} \]

The reference values (\(\mathrm{LR}_{\mathrm{ref}}\), \(B_{\mathrm{ref}}\), \(T_{\mathrm{ref}}\)) come from your small-scale sweep.

Refine the learning rate (optional). We expect the scaled learning rate to be close to optimal, but there may be room for improvement in your setting. If you have compute available for further tuning, sweep nearby learning rates at the larger budget and rank, then compare validation loss or downstream performance.

Transfer to a larger model

Once you have a learning rate tuned on one model, the calibrated model multipliers let you estimate one for another model. The multipliers don't tell you the best learning rate for your task. They estimate how the best learning rate changes from one model to another. We measured them for every model on Tinker with short AdamW LoRA sweeps on a fixed mix of pretraining text, using the same setup and five random seeds for every model. Every multiplier is listed in lr_multipliers.json; for the sweep setup, see How the multipliers are calibrated.

If your target model is larger than the one you tuned on, or you find you need a larger model for stronger capabilities, use the ratio of the two models' multipliers:

\[ \mathrm{LR}_{\mathrm{target}} = \mathrm{LR}_{\mathrm{small}} \frac{m_{\mathrm{target}}}{m_{\mathrm{small}}} \]

Here, \(m_{\mathrm{small}}\) and \(m_{\mathrm{target}}\) are the models' calibrated multipliers. The Cookbook's transfer_lr helper in hyperparam_utils computes this ratio:

from tinker_cookbook import hyperparam_utils

# Suppose your sweep found that 2e-4 works well for Qwen3.5-9B.
small_lr = 2e-4
target_lr = hyperparam_utils.transfer_lr(
    small_lr,
    from_model="Qwen/Qwen3.5-9B",
    to_model="Qwen/Qwen3.5-397B-A17B",
)
# Approximately 2.55e-4: the multipliers are 0.55 and 0.70.

The multiplier belongs to the model, so you can apply the ratio either to your small-run learning rate or to the full-run learning rate from the previous step. Either way, keep the dataset, batch size, number of steps, LoRA rank, optimizer and learning rate schedule the same between the two models. Before the full run, check the estimate with a short, small-scale sweep on the larger model and compare validation metrics. This transfers the learning rate you tuned for your task, including its absolute scale; you do not need to start again from get_lr. The multipliers are calibrated for AdamW; for Dimuon, tune on the target model directly.

Measure the ratio on your own task (optional). If the full run on the larger model is expensive, you can measure the ratio directly instead of using the calibrated multipliers. Run the same short sweep, at about 10% of your token budget, on both models, and use the ratio of their best learning rates in place of \(m_{\mathrm{target}}/m_{\mathrm{small}}\). Keep the data, batch size, number of steps, LoRA rank and schedule identical between the two sweeps. With learning rates spaced by \(\sqrt{2}\), each sweep locates its optimum only to within about 20%, so a finer grid near the minimum gives a more reliable ratio.

For RL, first tune an RL learning rate on one model, then use transfer_lr to suggest a sweep range on another. In MATH experiments with three models and two seeds, the best learning rates by training reward were 0.1–0.4 × get_lr(model). The Cookbook suggests 0.1 * get_lr(model) as an initial RL sweep starting point. This is limited evidence from one task, not a universal SFT-to-RL conversion; do not use the SFT value from get_lr unchanged for RL.

For how closely the multipliers held up under a different training setup, see How well does model transfer work?

Supporting experiments

The sections below describe the detailed experiments behind the guidance above: how the best learning rate changes with LoRA rank, batch size and token budget, and how the model multipliers were calibrated and how well they transfer between models.

LoRA rank invariance

For both AdamW and Dimuon, a learning rate tuned at a small LoRA rank is a useful starting point at a higher rank. You can tune the learning rate at a small rank, increase rank and check whether another sweep is needed.

The sweeps below show how the useful learning rate range changes with rank for both optimizers. In these experiments, Dimuon had slightly better learning rate invariance across ranks than AdamW.

Validation loss versus initial learning rate on OpenThoughts3 for Qwen3.5-9B-Base, Qwen3.5-35B-A3B-Base, and GPT-OSS-20B. Each row pairs AdamW and Dimuon with curves for LoRA ranks 8, 64, and 256. Diamonds mark minima. Validation loss versus initial learning rate on OpenThoughts3 for Qwen3.5-9B-Base, Qwen3.5-35B-A3B-Base, and GPT-OSS-20B. Each row pairs AdamW and Dimuon with curves for LoRA ranks 8, 64, and 256. Diamonds mark minima.

Figure 1. Learning rate across ranks: SFT on OpenThoughts3. These sweeps use linear learning rate decay to zero over 800 steps, with a batch size of 128 for a total of 102,400 training examples per run. Diamonds mark the best measured learning rates. Inputs were truncated to 8k tokens so the loss mostly measures reasoning prefixes. Runs use a single random seed.

Batch size dependence

For both AdamW and Dimuon, a good rule of thumb in SFT is to scale the learning rate with the square root of the batch size. If you 4x your batch size then try 2x your learning rate. The experiments below hold the training examples fixed and compare different batch sizes. They support this scaling rule for both optimizers in this setting.

For reinforcement learning, you may want to try scaling the learning rate with sqrt(num_problems).

Validation loss versus learning rate divided by the square root of batch size over 128, comparing AdamW and Dimuon at ranks 32 and 256 across batch sizes 32, 64, 128, 256, and 512. Validation loss versus learning rate divided by the square root of batch size over 128, comparing AdamW and Dimuon at ranks 32 and 256 across batch sizes 32, 64, 128, 256, and 512.

Figure 2. Learning rate across batch sizes. The experimental setup was Qwen3-8B-Base on Tulu3 data with MLP-only adapters, constant learning rates, and the same 102,400 ordered training examples per run. Batch sizes 32 to 512 therefore used 3,200 to 200 optimizer steps. Diamonds mark the best learning rate for each curve. The fact that the curves line up when plotted against learning rate per square root batch size indicates that the optimal learning rate should scale with square root batch size.

Token budget dependence

For AdamW and Dimuon SFT at a fixed batch size, a useful starting point is to scale the learning rate with the inverse fourth root of the token budget.

Start with a learning rate that works well for your model and dataset at a known budget. To choose a learning rate for a new budget, use:

\[ \mathrm{LR}_{\mathrm{new}} = \mathrm{LR}_{\mathrm{ref}} \left(\frac{T_{\mathrm{new}}}{T_{\mathrm{ref}}}\right)^{-1/4} \]

Here, \(T\) is the total number of SFT input tokens processed during training, including prompt tokens, after truncation. Count a token again each time it is used. Do not include tokens used to pretrain the base model. Keep the batch size, model, dataset, LoRA rank and optimizer settings fixed, then sweep a few learning rates around this estimate.

How to read the token budget figures

Each colored curve is one token budget, from smallest to largest. Lower validation loss is better, and diamonds mark the lowest measured loss on each curve. The horizontal axis is the swept learning rate multiplied by \((T/T_0)^{1/4}\), where \(T_0\) is the reference budget given in each figure caption. If the best learning rate follows our transfer rule, \(\mathrm{LR} \propto T^{-1/4}\), then \(\mathrm{LR} \cdot (T/T_0)^{1/4}\) is roughly the same at every budget's best point, so the diamonds line up at around the same horizontal position. When they do, you can transfer a learning rate from a small budget to a larger one with that rule.

Validation loss versus learning rate times the fourth root of relative token budget. Six panels compare Llama 3.2 1B and Qwen3.5 9B Base on OpenThoughts3, Tulu3 and an example pretrain mix. Colors show training horizons; diamonds mark the best measured learning rates. Validation loss versus learning rate times the fourth root of relative token budget. Six panels compare Llama 3.2 1B and Qwen3.5 9B Base on OpenThoughts3, Tulu3 and an example pretrain mix. Colors show training horizons; diamonds mark the best measured learning rates.

Figure 3. Learning rate across token budgets. AdamW LoRA training with constant learning rates, batch size 32 and LoRA rank 32. Each curve uses a longer prefix of the same ordered training examples. Colors label example counts; the horizontal scale uses actual input tokens. \(T_0\) is the token count in 6,400 examples for each model and dataset. Loss is measured on 512 held-out examples. The pretrain mix is an example dataset we assembled for these runs, with equal shares of arXiv, legal text, Python code and educational web text; it is not any particular base models' pretraining data. These runs train on all text tokens; the chat datasets train on assistant tokens. OpenThoughts3 inputs were truncated to 4k tokens, so its loss mostly measures reasoning prefixes. Runs use one primary random seed.

Dimuon token-budget sweeps on OpenThoughts3 for Llama 3.2 1B and Qwen3.5 9B Base. Validation loss is plotted against learning rate times the fourth root of relative token budget; diamonds mark the best measured learning rates. Dimuon token-budget sweeps on OpenThoughts3 for Llama 3.2 1B and Qwen3.5 9B Base. Validation loss is plotted against learning rate times the fourth root of relative token budget; diamonds mark the best measured learning rates.

Figure 4. Token budget transfer with Dimuon on OpenThoughts3. These runs use the same ordered examples and validation set as the AdamW OpenThoughts3 runs above, with constant learning rates, batch size 32 and LoRA rank 32. The diamonds roughly align after scaling the horizontal axis by \((T/T_0)^{1/4}\). All five horizons have bracketed minima for both models. Runs use one random seed and inputs truncated to 4k tokens.

Held-out assistant-token loss versus learning rate times the fourth root of relative token budget for post-trained Qwen3.8-27B on Open-SWE agent traces. Five curves span 5.3M to 86.6M input tokens; diamonds mark the lowest measured losses. Held-out assistant-token loss versus learning rate times the fourth root of relative token budget for post-trained Qwen3.8-27B on Open-SWE agent traces. Five curves span 5.3M to 86.6M input tokens; diamonds mark the lowest measured losses.

Figure 5. Transfer rule applies to base and post-trained models. Alongside the base-model sweeps above, this sweep supports the approximate token-budget transfer rule for the post-trained Qwen3.8-27B model on Open-SWE agent traces. Runs use AdamW, constant learning rates, batch size 2 and LoRA rank 32, with 64–1,024 optimizer steps. Each budget uses a longer prefix of the same training data. The horizontal axis scales learning rate by \((T/T_0)^{1/4}\), where \(T_0\) is the lowest token budget, 5.3M input tokens. We retain complete successful traces that fit within 64k tokens and train on assistant reasoning, responses and tool calls. Loss is measured on 256 traces from separate repositories. Runs use one random seed.

Model learning rate multipliers

The calibrated multipliers behind get_lr and transfer_lr come from the sweeps described below, followed by checks of how well they transfer to other training setups.

How the multipliers are calibrated

We run short learning rate sweeps for every model on Tinker using the same training setup: AdamW, LoRA rank 32, batch size 8, 64 optimizer steps and linear learning rate decay to zero. The data is a fixed mixture with equal numbers of text windows from FineWeb-Edu, arXiv LaTeX, Python and case law. Evaluation uses held-out bits per byte (BPB) on 64 windows, a loss measure that accounts for differences between tokenizers.

A coarse sweep brackets the minimum, then five random seeds each run learning rates spaced by a factor of \(\sqrt{2}\) near it. We take the median loss across seeds at each learning rate and fit a quadratic in log learning rate near the minimum. Each model's fitted optimum is divided by Qwen3-8B's to obtain its multiplier. The protocol, sweep results and fitted optima are recorded in calibration_data.json.

get_lr combines two numbers:

  • A multiplier for each model, measured by the sweeps. It is the model's fitted optimum divided by Qwen3-8B's. Qwen3-8B's multiplier is therefore 1, and a multiplier of 0.5 suggests half of Qwen3-8B's learning rate.
  • A reference learning rate of 7.5e-4 for Qwen3-8B. This is close to its fitted calibration optimum of 7.4e-4 and was chosen as a practical SFT starting scale using the Tulu3 sweeps. It is not a tuned optimum for every task.
\[ \mathrm{LR}_{\mathrm{start}} = 7.5 \times 10^{-4} \times m_{\mathrm{model}} \]

Every multiplier uses the same five-seed estimator; there are no per-model overrides. Leaving out one seed at a time gives a standard error of about 2.5% for the median model and 4% root mean square across models, reaching 10% for the noisiest model. This measures uncertainty within the calibration setup, not how well the learning rate will transfer to another task.

How well does model transfer work?

The ratio between two models' best learning rates tends to hold when the dataset and training setup change. To check this, we measured the ratios again on a different dataset with a different training setup, and compared them with the calibrated multipliers. For the 20 models in both experiments, the two agreed within about 14% on average (root mean square).

Calibration Follow-up check
Data Mix of FineWeb-Edu, arXiv, Python and case law FineWeb-Edu only
Batch size and steps 8 sequences, 64 steps 16 sequences, 128 steps
Learning rate schedule Linear decay to zero Constant
Seeds Five One

Both used LoRA rank 32. This supports using the multipliers to transfer a learning rate between models, but individual models can be further off: the follow-up ratios ranged from 0.72× to 1.42× the calibrated ones. Treat the transferred learning rate as a starting point, and check it with a short sweep on the target model.

Instruction SFT gives more mixed evidence. On Tulu3, the current get_lr values improve on the old formula for the seven Qwen models it covered, but do not beat a constant 3e-4 on the ten models with bracketed optima. That coarse, threefold-spaced sweep cannot resolve nearby optima: 3e-4 is a grid point and the best tested value for nine of those ten models. The multiplier ratios agree within a factor of 1.4 root mean square for nine non-reference models at rank 4, compared with 2.3 for a constant learning rate, but that improvement comes from distinguishing Qwen3-8B from the other models; the table does not order the other nine better than a constant does.

Treat these results as support for locating a useful sweep range, not proof of optimal learning rates on arbitrary tasks. FineWeb-Edu is already one component of the calibration mixture, and the follow-up sweep ranges were chosen using the original predictions. Check the transferred learning rate on your own task.