Skip to content
ADHDecode
  1. Home
  2. Articles
  3. Fine Tuning

Fine Tuning Articles

50 articles

Use Gradient Accumulation to Simulate Larger Batches on Small GPUs

Gradient accumulation lets you train models with effectively larger batch sizes than your GPU's memory can hold by splitting a large batch into smaller .

4 min read

Create High-Quality Instruction Datasets for Fine-Tuning

Creating instruction datasets for fine-tuning LLMs feels like you're teaching a super-intelligent toddler – they can grasp complex concepts but need ver.

2 min read

Tune Learning Rate Schedules for Stable LLM Fine-Tuning

Tune Learning Rate Schedules for Stable LLM Fine-Tuning — practical guide covering fine-tuning setup, configuration, and troubleshooting with real-world...

2 min read

Fine-Tune Llama 3 for Instruction Following on Custom Data

Llama 3, when fine-tuned for instruction following, actually learns to predict the next token in a way that aligns with the style and content of your cu.

3 min read

LoRA Explained: Configure Low-Rank Adaptation for Fine-Tuning

LoRA doesn't add new weights to a model; it injects trainable, low-rank matrices alongside the existing ones, effectively creating an adapter that learn.

3 min read

Merge Fine-Tuned Models with mergekit for Ensemble Capabilities

Merge Fine-Tuned Models with mergekit for Ensemble Capabilities — practical guide covering fine-tuning setup, configuration, and troubleshooting with re...

3 min read

Fine-Tune Mistral 7B on a Custom Dataset with QLoRA

QLoRA lets you fine-tune massive language models on hardware you probably already own, making cutting-edge AI accessible to everyone.

3 min read

Monitor Fine-Tuning Runs with Weights & Biases

Fine-tuning is more like a black box than a science, and Weights & Biases is the X-ray machine that lets you see inside.

2 min read

Fine-Tune Multilingual LLMs for Cross-Language Tasks

Fine-tuning a multilingual LLM for cross-language tasks is less about teaching it new languages and more about teaching it to translate between the lang.

4 min read

Fine-Tune GPT-4o Mini with the OpenAI API

Fine-tuning GPT-4o Mini with the OpenAI API is less about teaching the model new facts and more about teaching it a new style or format.

3 min read

Fine-Tune LLMs with ORPO: Odds Ratio Preference Optimization

ORPO is a surprisingly simple way to fine-tune LLMs by directly optimizing for preference odds, bypassing the need for a separate reward model entirely.

2 min read

Detect and Fix Overfitting During LLM Fine-Tuning

Overfitting in LLM fine-tuning isn't just about memorizing the training data; it's about the model developing a brittle, overly specific understanding t.

3 min read

Fine-Tune Phi-3 Mini for Edge Deployment on Small GPUs

Phi-3 Mini, when fine-tuned for edge deployment, can achieve surprisingly high performance on resource-constrained devices by leveraging quantization an.

2 min read

Automate LLM Fine-Tuning Pipelines for Continuous Retraining

Fine-tuning an LLM isn't about teaching it new facts; it's about teaching it how to use the facts it already knows in a specific way.

3 min read

Fine-Tune LLMs in 4-Bit with QLoRA on Consumer GPUs

QLoRA lets you fine-tune massive language models on just a few gigabytes of VRAM, effectively democratizing LLM customization for everyone.

3 min read

Deploy Quantized Fine-Tuned Models for Efficient Inference

Quantized models don't just run faster; they can fundamentally change the kind of hardware you need to run them on, opening up edge deployments that wer.

3 min read

Train Reward Models from Human Feedback for RLHF

The most surprising thing about training reward models is that they rarely learn to perfectly mimic human preferences; instead, they learn to extrapolat.

3 min read

Implement RLHF: Train Reward Models and Run PPO Fine-Tuning

The most counterintuitive thing about Reinforcement Learning from Human Feedback RLHF is that the human feedback itself is often a proxy for a much simp.

4 min read

Build the Business Case for Fine-Tuning vs Prompting vs RAG

Fine-tuning large language models can be more cost-effective than prompt engineering or Retrieval Augmented Generation RAG for specific, repetitive task.

4 min read

Secure Your Fine-Tuning Pipeline: Data Privacy and Compliance

Fine-tuning large language models isn't just about getting better performance; it's a critical juncture where your sensitive data meets the open road of.

4 min read

Run Supervised Fine-Tuning with TRL on Any Hugging Face Model

The most surprising truth about supervised fine-tuning SFT is that it often doesn't improve a model's reasoning ability as much as it improves its style.

3 min read

Generate Synthetic Training Data with LLMs for Fine-Tuning

Large Language Models can generate synthetic training data that's often indistinguishable from real data, but they do it by learning patterns and relati.

4 min read

Set Up TRL Trainer for Supervised and Preference Fine-Tuning

You can actually use TRL's SFTTrainer and PPOTrainer for supervised fine-tuning and preference fine-tuning, respectively, without needing to switch betw.

4 min read

Speed Up Fine-Tuning 2x with Unsloth on Llama and Mistral

Unsloth is a library that can speed up fine-tuning of large language models LLMs like Llama and Mistral by up to 2x, and often more, by optimizing memor.

2 min read

Fine-Tune Vision-Language Models for Multimodal Tasks

Vision-language models can learn to reason about images and text simultaneously, but fine-tuning them for specific tasks often leads to catastrophic for.

5 min read

Deploy Fine-Tuned Models at Scale with vLLM

vLLM isn't just another inference server; it's a paradigm shift in how we serve large language models, especially when you need to handle a flood of req.

3 min read

Fine-Tuning vs RAG vs Prompting: Choose the Right Approach

The most surprising truth about choosing between fine-tuning, RAG, and prompting is that you're likely already doing all three in some capacity, and the.

4 min read

A/B Test Base Models Against Fine-Tuned Versions in Production

The most surprising thing about A/B testing a fine-tuned model against its base version in production is how often the fine-tuned model doesn't win, eve.

4 min read

Merge LoRA Adapters into a Base Model for Deployment

Merge LoRA Adapters into a Base Model for Deployment — practical guide covering fine-tuning setup, configuration, and troubleshooting with real-world ex...

2 min read

Configure Axolotl for Multi-Format Fine-Tuning Runs

Axolotl can fine-tune models across multiple formats simultaneously, meaning you can run a training job that updates weights for a model that will event.

2 min read

Prevent Catastrophic Forgetting During LLM Fine-Tuning

Fine-tuning an LLM can erase everything it learned before, making it forget its original knowledge. Let's see what a fine-tuned model can do

5 min read

Format Chat Templates Correctly for Instruction Fine-Tuning

Sure, let's dive into formatting chat templates for instruction fine-tuning. The most surprising thing about chat templates is that even if your model s.

4 min read

Choose the Best Checkpoint After Fine-Tuning

The "best" checkpoint after fine-tuning isn't necessarily the one with the highest score on your validation set; it's the one that performs best on the .

5 min read

Fine-Tune LLMs for Classification and Information Extraction

Fine-tuning LLMs for classification and information extraction is less about teaching the model new facts and more about teaching it to recognize patter.

3 min read

Fine-Tune an LLM for Code Generation on Your Codebase

Fine-tuning a Large Language Model LLM for code generation on your specific codebase is less about teaching it a new language and more about teaching it.

3 min read

Estimate GPU Compute Budget Before Starting a Fine-Tuning Run

Fine-tuning a large language model is like trying to teach a genius a new trick: you need to be sure they have enough brainpower and time before you sta.

4 min read

Fine-Tune LLMs Continually on New Data Without Full Retraining

The true power of continual fine-tuning isn't about making a model "smarter" in a general sense; it's about making it an expert in a narrow, evolving do.

3 min read

Format Conversation Datasets for Supervised Fine-Tuning

Format Conversation Datasets for Supervised Fine-Tuning — practical guide covering fine-tuning setup, configuration, and troubleshooting with real-world...

2 min read

Compare Cloud GPU Costs for Fine-Tuning: A100 vs H100 vs L40

The H100 GPU, while significantly faster for training, can actually be cheaper per hour than the A100 when fine-tuning certain models.

3 min read

Deduplicate and Clean Training Data for Better Fine-Tuning Results

The most surprising thing about deduplicating and cleaning training data is that it's often the only thing you need to do to dramatically improve your f.

4 min read

Prepare High-Quality Datasets for LLM Fine-Tuning

The most surprising thing about preparing datasets for LLM fine-tuning is that "quality" isn't just about accuracy; it's about specificity and relevance.

3 min read

Configure DeepSpeed ZeRO for Fine-Tuning Large Language Models

DeepSpeed ZeRO can actually increase your GPU memory usage in certain configurations, even though its primary goal is to reduce it.

2 min read

Adapt Pre-Trained LLMs to Domain-Specific Tasks with Fine-Tuning

Fine-tuning a pre-trained LLM is less about teaching it new knowledge and more about teaching it how to apply what it already knows to a specific contex.

2 min read

Fine-Tune LLMs with Direct Preference Optimization

Direct Preference Optimization DPO lets you fine-tune large language models not by telling it what's good, but by showing it what's better, bypassing th.

3 min read

Fine-Tune Embedding Models for Domain-Specific Semantic Search

Fine-Tune Embedding Models for Domain-Specific Semantic Search — practical guide covering fine-tuning setup, configuration, and troubleshooting with rea...

3 min read

Evaluate Fine-Tuned LLMs with Task-Specific Benchmarks

Fine-tuning an LLM for a specific task often makes it worse at general tasks, not just better at the one you trained it on.

3 min read

Configure FSDP for Distributed Fine-Tuning Across Multiple GPUs

FSDP, or Fully Sharded Data Parallelism, is a PyTorch feature that can shard your model, gradients, and optimizer states across multiple GPUs, allowing .

4 min read

Full Fine-Tuning vs PEFT: Choose the Right Approach

Full fine-tuning a massive language model is often less effective than using Parameter-Efficient Fine-Tuning PEFT methods for most practical application.

3 min read

Fine-Tune Gemma 2 on a Custom Dataset Step by Step

Fine-tuning a large language model like Gemma 2 on your own data can unlock incredible, specialized capabilities, but the process often feels like navig.

3 min read

Export Fine-Tuned Models to GGUF for Local Deployment with Ollama

The most surprising thing about exporting fine-tuned models to GGUF for Ollama is that you're not just converting a file format; you're fundamentally ch.

3 min read
ADHDecode

Complex topics, finally made simple

Courses

  • Networking
  • Databases
  • Linux
  • Distributed Systems
  • Containers & Kubernetes
  • System Design
  • All Courses →

Resources

  • Cheatsheets
  • Debugging
  • Articles
  • About
  • Privacy
  • Sitemap

Connect

  • Twitter (opens in new tab)
  • GitHub (opens in new tab)

Built for curious minds. Free forever.

© 2026 ADHDecode. All content is free.

  • Home
  • Learn
  • Courses
Esc
Start typing to search all courses...
See all results →
↑↓ navigate Enter open Esc close