fine-tuning

Guides on fine-tuning pretrained machine learning models on your own data with Python.

RLHF vs DPO: How LLMs Learn Human Preferences

Supervised fine-tuning gets you a model that answers correctly yet still manages to be tactless, wordy, or too eager to please. The last polish comes from preference tuning, and RLHF vs DPO is the choice of route: one trains a reward model and runs reinforcement learning, the other folds the whole objective into a single loss. This post explains both in plain words and runs the DPO loss for real in Python. “A model does not learn what you tell ... Read More

How to Choose an LLM: Open vs Closed, Size, Cost, Licenses

The model at the top of the leaderboard is often the wrong pick for your project. Working out how to choose an LLM means matching a model to the constraints you actually have: budget, latency limits, privacy rules, and the license you can legally ship. This post gives you six plain axes, a decision flowchart, and three honest worked examples so you can stop guessing. “The best model is the cheapest one that passes your own test, not the one ... Read More

How LLMs Are Trained: Pretraining, SFT, and RLHF Explained

A large language model is never sat down and taught facts. It learns by predicting the next token across a mountain of text, then gets reshaped twice more until it behaves like the assistant you talk to. That is how LLMs are trained: pretraining, supervised fine-tuning, and preference tuning. This post walks all three stages in plain words, with small Python you can run yourself. “The computer was born to solve problems that did not exist before.” Bill Gates Last ... Read More