---
title: "Fine-tuning and training"
type: "topic"
url: "https://aifordevs.org/topics/fine-tuning"
markdown: "https://aifordevs.org/topics/fine-tuning.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/topics/fine-tuning"
---

# Fine-tuning and training

When prompting is not enough. Parameter-efficient fine-tuning, preference training, and the data work that decides the result.

## Articles

- [LoRA fine tuning: QLoRA, r, alpha, and a tested PEFT script](https://aifordevs.org/articles/lora-fine-tuning.md): LoRA fine tuning from the paper to serving: r, alpha, QLoRA, dataset format, and a PEFT script run on CPU with real output, adapter size, and evals. (2026-11-08)
- [RAG vs fine tuning: which failures each one can fix](https://aifordevs.org/articles/rag-vs-fine-tuning.md): RAG vs fine tuning compared by failure mode: what each changes, who still sells fine tuning, dated costs worked in code, and when to combine them. (2026-11-08)

## Glossary terms

- [Distillation](https://aifordevs.org/glossary/distillation.md): Distillation is training a smaller student model to reproduce the outputs of a larger teacher model. It is a common way to get a cheaper model that keeps much of the teacher's quality on a narrow task.
- [Fine-tuning](https://aifordevs.org/glossary/fine-tuning.md): Fine-tuning is continuing to train a pretrained model on your own examples so it adopts a format, a style, or a skill. Full fine-tuning updates every weight, while parameter-efficient methods such as LoRA update a small set of added weights.
- [LoRA](https://aifordevs.org/glossary/lora.md): LoRA (low-rank adaptation) is a fine-tuning method from Hu et al. (2021) that freezes the base model and trains small low-rank matrices added to selected layers. An adapter is far smaller than the model it modifies, so one base model can serve many adapters.
- [QLoRA](https://aifordevs.org/glossary/qlora.md): QLoRA is a fine-tuning method from Dettmers et al. (2023) that trains LoRA adapters on a base model quantized to 4 bits. It lowers the memory needed to fine-tune a large model.
- [RLHF](https://aifordevs.org/glossary/rlhf.md): RLHF (reinforcement learning from human feedback) is training a model with a reward signal learned from human preference comparisons. It is one of the post-training steps that turns a pretrained model into an assistant that follows instructions.

## Platforms

- [Hugging Face](https://aifordevs.org/platforms/hugging-face.md): The main hub for open-weight models and datasets, plus Inference Providers and dedicated Inference Endpoints.
- [Together AI](https://aifordevs.org/platforms/together-ai.md): Serverless and dedicated inference for open-weight models, with fine-tuning and GPU clusters.
- [Fireworks AI](https://aifordevs.org/platforms/fireworks-ai.md): Fast inference for open-weight models, with fine-tuning and on-demand deployments.
- [Groq](https://aifordevs.org/platforms/groq.md): Inference API running open-weight models on Groq's own LPU chips, built for low latency.
- [Baseten](https://aifordevs.org/platforms/baseten.md): Dedicated and shared inference for open-weight and custom models, plus training and the Truss packaging tool.
- [Modal](https://aifordevs.org/platforms/modal.md): Serverless GPUs driven from Python code, used for inference, batch jobs, and fine-tuning.
- [Replicate](https://aifordevs.org/platforms/replicate.md): Run community and official models through an API, and package your own with the open-source Cog tool.
- [OpenRouter](https://aifordevs.org/platforms/openrouter.md): One OpenAI-compatible API and one bill for hundreds of models across many providers.
