LoRA Fine Tuning Tutorial: Fine-Tune IBM Granite 4.2 in 20 Minutes
The Token Desk
0:00 / 0:00
LoRA Fine Tuning Tutorial: Fine-Tune IBM Granite 4.2 in 20 Minutes
126 просмотров · 2 дн. назад
The Token Desk
216 подписчиков
126 просмотров · 2 дн. назад
A LoRA fine tuning tutorial on a real run: six and a half minutes of training on one rented NVIDIA A100 taught IBM Granite 4.2 to answer "Hello" with "Ahoy there, matey." It explains fine-tuning and LoRA (low-rank adaptation), which freezes the model's 8 billion weights and trains a small add-on about 0.6% of its size, then walks through the training loop, the 22 GB memory peak and the cost at RunPod's rates. A before-and-after test of five everyday questions goes from zero pirate words to 103, and the video ends on when a plain prompt is enough and when fine-tuning is worth it.
Chapters
0:00 Fine-Tuning IBM Granite Model
0:37 Choosing a Small Open-Weight Model
0:58 Renting a GPU and Training Data
1:25 LoRA Versus Full Retraining
2:25 Training Loop and Loss Explained
2:53 Running the Job in Terminal
4:46 Testing Before and After Training
6:11 Prompting Versus Fine-Tuning Guide
Details from this video
LoRA targets: q, k, v, o and the three MLP matrices in all 40 layers, rank 16
Merge the adapter into the model (PEFT, no added inference cost): merge_and_unload() — https://huggingface.co/docs/peft/main...
Prompt-only baseline: system prompt "answer like a pirate"
Sources
Hugging Face, IBM Granite 4.2 8B model card: https://huggingface.co/ibm-granite/gr...
Hugging Face, pirate-ultrachat-10k dataset: https://huggingface.co/datasets/wingl...
arXiv, LoRA: Low-Rank Adaptation of Large Language Models: https://arxiv.org/abs/2106.09685
RunPod, GPU pricing: https://www.runpod.io/gpu-instance/pr...
OpenAI supervised fine-tuning guide: https://developers.openai.com/api/doc...
LoRA Without Regret (Thinking Machines Lab): https://thinkingmachines.ai/blog/lora/
OpenAI model optimization guide: https://developers.openai.com/api/doc...
Footage
NVIDIA A100 80GB, from HPCWH's "NVIDIA A100 80GB Tensor Core GPU Unboxing #nvidia #graphicscard #ai #tensorflow #datacentre": • NVIDIA A100 80GB Tensor Core GPU Unboxing ...
#LoRA #IBMGranite #AIExplained
—
The Token Desk · AI news and explainers
Subscribe: / @thetokendesk