Inside AI Models

Inside AI Models

Articles

Tutorials, experiment logs, and deep-dives on how AI models work.

Claude Code

Working Effectively with Claude Code — Part 2: Agents, Subagents & Multi-Agent Setups

When to stop doing everything in one session and delegate: what subagents are, how to brief and build them, and how to run several Claudes in parallel without them stepping on each other.

Jul 15, 2026 · 11 min read
70
Deep Learning

BPE (Byte Pair Encoding): What It Is and Why It Matters for LLMs

How do models like GPT understand words they never saw during training? We start from the two extremes — word-level and character-level tokenization — and build BPE (subword tokenization) from scratch, in code.

Jul 1, 2026 · 9 min read
303
Claude Code

Working Effectively with Claude Code — Part 1: Context, Skills & Prompting

A practical guide to getting real value out of Claude Code: how it sees your project, using skills, and prompting well — plus the context tricks that keep long sessions sharp.

Jul 1, 2026 · 7 min read
603
Transformers

Building GPT From Scratch: A Step-by-Step nano-gpt Walkthrough

I built a character-level, decoder-only Transformer in pure PyTorch — tokenizer, self-attention, multi-head, residual blocks, and autoregressive generation — following Karpathy's lecture and adding cosine LR, early stopping, and W&B tracking. Here is the whole build, step by step.

Jun 27, 2026 · 12 min read
2045
Meta

About This Blog

A short introduction to why I started this journal, what kind of writing you'll find here, and why writing is an inseparable part of learning.

Jun 26, 2026 · 2 min read
202
Linear Algebra

What Is a Tensor? Linear Algebra for Deep Learning

We build the ladder from scalars to tensors, make the case that shape is the concept to track, and show why a neural network layer is really just linear algebra in disguise.

Jun 24, 2026 · 5 min read
220
Transformers

Attention, Explained from Scratch

We build the mechanism at the heart of modern language models around a single intuitive question, working from query, key, and value vectors through softmax to why attention changed everything.

Jun 23, 2026 · 5 min read
191
Fundamentals

How Gradient Descent Actually Works

The optimization loop behind every trained model, built from a hill-and-fog analogy through derivatives, learning rate, and backpropagation — no calculus prerequisite required.

Jun 22, 2026 · 4 min read
272
Deep Learning

Why Identity-Aware Negative Sampling Matters

In multimodal deepfake detection, a contrastive loss is only as good as its negatives. We examine why random batching misses the critical negatives and how identity-grouped sampling repairs it.

Jun 20, 2026 · 4 min read
90