RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Training & optimization / Learning Rate
Training & optimization

Learning Rate

Learning rate is a hyperparameter that controls how much the model's weights are adjusted during each training step. A high learning rate means large weight updates, which can speed up training but risks overshooting the optimal values. A low learning rate makes smaller updates, which is more stable but may require many more steps. In practice, operators fine-tuning models with Hugging Face Transformers or LoRA adapters set this value (e.g., 1e-4 or 5e-5) and often use a scheduler to reduce it over time. The right learning rate balances convergence speed and final model quality.

Deeper dive

The learning rate is a scalar that multiplies the gradient during backpropagation. In stochastic gradient descent (SGD), the weight update is: w_new = w_old - lr * gradient. If lr is too high, the loss may diverge; if too low, training stalls. Common values range from 1e-3 (for Adam on small tasks) to 1e-5 (for fine-tuning large models). Schedulers like cosine annealing or linear decay adjust the rate during training. Operators fine-tuning Llama or Mistral using LoRA often start with lr=2e-4 and use a cosine schedule. The learning rate is one of the most impactful knobs: a wrong choice can waste hours of GPU time.

Practical example

When fine-tuning Llama 3.1 8B with LoRA on a single RTX 4090 (24 GB VRAM), a typical learning rate is 2e-4 with a cosine scheduler. If you set it to 1e-3, the loss may spike and training becomes unstable. If you set it to 1e-6, the model barely changes after 1000 steps. The right rate depends on batch size and model size; for full fine-tuning of a 7B model, rates around 1e-5 are common.

Workflow example

In Hugging Face Transformers, you set the learning rate in the TrainingArguments: TrainingArguments(learning_rate=2e-4, lr_scheduler_type='cosine'). When using Unsloth for LoRA fine-tuning, the default is often 2e-4. In llama.cpp's training mode (e.g., llama-train), you specify --learning-rate 1e-4. If the loss plateaus, operators may lower the rate manually or use a scheduler that decays it every few steps.

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →