Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

4247 bites

Page 43

LSTMs: Giving Neural Networks a Longer Memory
LLMs & Generative AI2 min read

LSTMs: Giving Neural Networks a Longer Memory

LSTMs give neural networks a longer memory, letting them connect events across long sequences. They excel at tasks like language translation or time-series analysis where distant context is key.

Seq2Seq: Turning One Sequence Into Another
LLMs & Generative AI2 min read

Seq2Seq: Turning One Sequence Into Another

A Seq2Seq model acts like a universal translator, reading one sequence to generate another. It's foundational for machine translation and text summarization. The main footgun is its fixed-size context vector, which can forget details from long inputs.

Self-Attention: The Transformer's Core Idea
LLMs & Generative AI2 min read

Self-Attention: The Transformer's Core Idea

Self-attention lets a model weigh the importance of different words in a sequence to understand context. This core mechanism of the transformer architecture powers LLMs for translation and generation.

LLMs & Generative AI2 min read

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.

LLMs & Generative AI2 min read

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.

Transformer Preprocessing: From Text to Tensors
LLMs & Generative AI2 min read

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.

LLMs & Generative AI2 min read

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…

Causal Language Modeling: The Autocomplete Engine
LLMs & Generative AI2 min read

Causal Language Modeling: The Autocomplete Engine

Causal Language Modeling is like a powerful autocomplete, predicting the next word based only on what came before. It's the engine for text generation in chatbots, creative writing tools, and coding assistants. The footgun: it can't see future words.

Common Crawl: A Free Snapshot of the Entire Web
LLMs & Generative AI2 min read

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.

LLMs & Generative AI2 min read

Mixed-Precision Training: Faster Training with Less Memory

Mixed-precision training is like using rough estimates (FP16) for most math and a calculator (FP32) for critical steps. This speeds up deep learning on GPUs by cutting memory use, but naively switching can cause training to fail as small gradients vanish.

LLMs & Generative AI2 min read

AdamW: Decoupling Weight Decay for Better Generalization

AdamW fixes a flaw in the Adam optimizer by decoupling weight decay from the gradient update, improving model generalization. It's a go-to for training large networks like Transformers. The footgun is thinking it's the same as Adam with L2 regularization.

Learning Rate Scheduling: A Gearbox for Model Training
LLMs & Generative AI2 min read

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.

Data Parallelism: One Task, Many Data Chunks
LLMs & Generative AI2 min read

Data Parallelism: One Task, Many Data Chunks

Data parallelism splits a huge dataset across multiple processors, each running the same task on its own chunk. It's how large models are trained on massive datasets, with each GPU handling a different batch of data.

LLMs & Generative AI2 min read

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.

LLMs & Generative AI2 min read

LLM Scaling Laws: Match Parameters to Tokens

For a fixed compute budget, model size and training data must grow equally. When choosing between a larger model or more tokens for the same FLOPs, more data usually wins. The footgun is scaling parameters alone, which undertrains the model and wastes compute.

Pipeline Parallelism: An Assembly Line for Your Model
LLMs & Generative AI2 min read

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.

Tensor Parallelism: Split Layers, Not Just Models
LLMs & Generative AI2 min read

Tensor Parallelism: Split Layers, Not Just Models

Tensor Parallelism splits a single large model layer, like a weight matrix, across multiple GPUs to run in parallel. This is crucial for inference with models whose layers exceed a single GPU's VRAM.

LLMs & Generative AI2 min read

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.

LLMs & Generative AI2 min read

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.

In-Context Learning: Teaching a GPT Without Retraining
LLMs & Generative AI2 min read

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.