llm

Articles about large language models: how they work and how to use them from Python.

GenAI: LLM APIs (OpenAI, Anthropic, Structured Output & Function Calling)

A chat tab is a demo; a product needs code. The moment you call an LLM (Large Language Model) from Python, three problems show up fast: streaming the reply, getting JSON you can trust, and letting the model trigger real tools. Function calling in Python solves that last one, and this guide covers all four building blocks with working OpenAI and Anthropic (Claude) code. “An API call to an LLM is just an HTTP request. The magic is in what ... Read More

GenAI: Fine-Tuning LLMs with LoRA, QLoRA, and PEFT

Fine-tuning LLMs starts with a simple problem: a pre-trained Large Language Model (LLM) is a generalist. It knows a little about everything, but it is not an expert at your one specific job. When you fine tune an LLM, you train that generalist further on your own data and turn it into a specialist. Here is the part that surprises people: you do not have to retrain the whole model. Techniques like LoRA (Low-Rank Adaptation) and QLoRA (Quantized LoRA) let ... Read More

GenAI: Introduction to Large Language Models

A few years ago, the idea that large language models could write a passable email felt like science fiction. Today they write production code, reason through tricky math, and hold conversations that fool experienced engineers. The strangest part: nobody programmed those abilities in. They appeared once models crossed a size threshold, and this guide maps how that happened and what it means for your projects. You already understand Transformers and attention, plus BERT vs GPT, from the earlier lessons. Now ... Read More