LLM
157 bites tagged LLM — interview questions with model answers, and 60-second explainers.
Adapter Modules: Efficient LLM Fine-Tuning
Adapters are small modules plugged into a frozen LLM to avoid costly full fine-tuning. This lets you specialize a base model for many tasks by training tiny, swappable plugins instead of duplicating the entire model for each task.
Reward Modeling: Teaching an LLM What 'Good' Means
A reward model is a judge that scores an LLM's outputs based on human preferences. It learns to assign a numerical 'goodness' score to text, turning subjective quality into an optimizable signal for training models like ChatGPT.
Instruction Fine-Tuning: Teaching LLMs to Follow Orders
Instruction fine-tuning teaches a base LLM to follow commands, not just predict the next word. It turns a raw text-completion engine into a helpful assistant, enabling it to answer questions or summarize text. The footgun: it learns style, not facts.
PEFT: Fine-Tune Large Models on a Budget
Parameter-Efficient Fine-Tuning (PEFT) adapts huge models without retraining everything. It's like adding a task-specific cheat sheet to a genius brain. Use it to specialize LLMs on consumer GPUs.
Catastrophic Forgetting: The AI's Amnesia Problem
Catastrophic forgetting is when an AI, trained on new information, abruptly forgets what it previously knew. It's like overwriting a file instead of appending to it. This happens when fine-tuning a model on a narrow dataset, erasing its general knowledge.
Supervised Fine-Tuning (SFT): Teaching a Model to Chat
Supervised Fine-Tuning (SFT) teaches a general LLM to be a helpful assistant by training it on high-quality conversations. This turns a base model into an instruction-following chatbot.
ReAct: Teaching LLMs to Think, Act, and Observe
ReAct teaches an LLM to solve problems by interleaving thought, action, and observation. This is key for agents that search the web or query APIs to answer questions with external data.
Tree of Thoughts: LLM Reasoning Beyond a Single Path
Tree of Thoughts (ToT) lets an LLM explore multiple reasoning paths at once, like a human brainstorming. It generates several 'thoughts' and pursues the most promising ones. This is crucial for planning tasks where one wrong turn fails.
Self-Consistency: Majority Rules for LLM Reasoning
Self-consistency makes an LLM solve a problem multiple ways, then picks the most common answer. It's like asking a committee of experts for their reasoning and taking a vote. This boosts accuracy on complex math and logic puzzles.
Chain-of-Thought Prompting: Making LLMs 'Show Their Work'
Chain-of-Thought (CoT) prompting gets better answers from LLMs by asking them to 'show their work.' It's best for complex reasoning like math problems or logic puzzles where breaking the problem down helps.
In-Context Learning: Teaching a GPT Without Retraining
In-context learning is like giving an LLM a cheat sheet in the prompt. You provide examples of a task, and the model follows the pattern for your new query without any permanent changes. Use it for one-off tasks like reformatting text or classifying sentiment.
Zero-Shot Prompting: Ask, Don't Show
Zero-shot prompting is asking an LLM to do a task without examples, relying on its pre-existing knowledge. Use it for simple tasks like basic translation or sentiment analysis where instructions are self-explanatory, but expect it to fail on complex tasks.
Prompt Engineering: Guiding LLMs to Better Answers
Prompt engineering is like being a director for an LLM actor: you provide context and constraints to get the desired performance. It's used to build reliable AI features and test model limits.
Pipeline Parallelism: An Assembly Line for Your Model
Think of training a huge model like an assembly line. Pipeline parallelism splits a model's layers into stages across multiple GPUs, allowing you to train models too large for one device.
What is a Large Language Model (LLM)?
An LLM is a neural network trained on vast text data to process and generate human-like language. It's the core technology behind chatbots, enabling them to generate, summarize, and translate text. Its reliability depends entirely on its training data.
Learning Rate Scheduling: A Gearbox for Model Training
Think of a learning rate schedule as a training 'gearbox,' starting fast and slowing for precision. It's used when fine-tuning large models to adapt them without breaking them.
Common Crawl: A Free Snapshot of the Entire Web
Common Crawl is a public library of the internet—a massive, free snapshot of web text and links. It's the raw material for training many LLMs and for academic research on web-scale data. The footgun: it's unfiltered, containing everything from facts to spam.
Transformer: The Final Linear and Softmax Layers
A Transformer's final linear layer acts as a classifier, converting the decoder's output vector into raw scores (logits) for every possible word. The softmax function then turns these scores into probabilities, allowing the model to pick the most likely next…
Transformer Preprocessing: From Text to Tensors
Transformers don't read text; they read numbers. A tokenizer is the translator, converting sentences into numerical tensors the model understands. This is the mandatory first step for any NLP task. The footgun is using a tokenizer that doesn't match the model.
Cross-Attention: How Models Connect Two Ideas
Cross-attention lets a model, like a translator, focus on relevant parts of an input (e.g., a sentence) to generate an output (the translation). It's used in machine translation and image captioning. The footgun is confusing it with self-attention.
Residual Connections & Layer Norm: The Transformer's Stabilizers
Residual connections are shortcuts that let information bypass layers, while Layer Normalization rescales a layer's outputs. Together, they prevent training from breaking in very deep networks like Transformers, enabling signals to flow without vanishing.
Large Language Models (LLMs)
An LLM is a massive neural network trained on vast text datasets to perform language tasks. It powers modern chatbots by generating, summarizing, and translating text. The key footgun: biased or inaccurate training data makes its output unreliable.
Model Quantization: Trading Precision for Performance
Model quantization trades numerical precision for a smaller memory footprint. It reduces model weights from high-precision types like fp32 to lower ones like int8 or int4, making large models fit on consumer hardware.
Hyperparameter Tuning for LLM Inference
Control an LLM's creativity versus predictability by tweaking its inference parameters. This is crucial for tasks like generating structured JSON versus creative text. The footgun is changing parameters without a clear goal, leading to chaotic output.
Get LLM bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.