How to Fine-Tune Code Llama on Custom Code Tasks?

1. Introduction I’ve fine-tuned Code Llama on a bunch of real-world tasks—everything from auto-generating docstrings to translating legacy Python 2 code into modern idiomatic Python 3. And here’s the thing: prompt engineering just didn’t cut it when I needed consistency, reliability, and lower token overhead. Fine-tuning gave me a level of control that prompting simply … Read more

Fine-Tuning LLaVA for Vision-Language Tasks

1. Introduction “The moment you add vision to language models, everything breaks — preprocessing, formatting, memory requirements, even your idea of what ‘fine-tuning’ means.” I wish someone had told me that earlier. This post is not a gentle introduction to LLMs, vision transformers, or multimodal learning. I’m assuming you’ve already been in the trenches with … Read more

Fine-Tuning BERT for Named Entity Recognition (NER)

1. Why Fine-Tune BERT for NER Instead of Using Off-the-Shelf Models “A model trained on everything usually understands nothing deeply.” That’s something I learned the hard way the first time I tried plugging a generic pre-trained BERT into a legal domain use case. Off-the-shelf NER models like bert-base-cased or even spaCy’s en_core_web_trf are decent for … Read more

Fine-Tuning Language Models from Human Preferences

1. Introduction You already know the theory behind language models. You’ve read the papers, experimented with transformers, maybe even fine-tuned a few. But when it comes to actually aligning these models with human preferences—ranking outputs, training reward models, and using DPO or PPO—it’s easy to get lost in vague tutorials or bloated theory. I’ve been … Read more

Fine-Tuning Claude 3 Haiku in Amazon Bedrock

1. Intro “The lightest model in the room is often the one with the quickest answers.” Claude 3 Haiku is fast — and I don’t just mean low latency. In my experience, it’s been my go-to when I need something cheap, responsive, and good enough for most retrieval or summarization workloads. If you’re building latency-sensitive … Read more

Fine-Tuning Stable Diffusion 3.5 Large

1. Why Fine-Tune SD 3.5 Large? Let me get straight to the point—there comes a point where prompt engineering just doesn’t cut it. I’ve been there. I was trying to get Stable Diffusion to generate a specific style of technical illustration for a robotics use case. After 50+ prompt variations and CLIP interrogator tweaks, the … Read more

Fine-Tuning LLaMA 2 and Mistral with QLoRA

1. Introduction (Keep It Tight, First-Person) “You don’t truly understand a model until you’ve tried breaking it with your own data.” I’ve worked with large language models long enough to know that full fine-tuning isn’t always practical—or necessary. When I started working with LLaMA 2 and Mistral, my goal was clear: fine-tune them efficiently on … Read more

Fine-Tuning Gemma for Custom NLP Tasks

1. Why Gemma? “You don’t always need a 13B model to get 13B results.” That’s something I’ve learned firsthand after spending weeks fine-tuning various open LLMs for lightweight, on-device use cases. When I started experimenting with Gemma, I wasn’t chasing hype — I was just tired of hitting memory ceilings with LLaMA2 and constantly fighting … Read more