<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://mvgpt.nenuadrian.com/</loc><lastmod>2026-11-15</lastmod></url>
<url><loc>https://mvgpt.nenuadrian.com/episodes/</loc><lastmod>2026-11-15</lastmod></url>
<url><loc>https://mvgpt.nenuadrian.com/about/</loc></url>
<url><loc>https://mvgpt.nenuadrian.com/try/</loc></url>
<url><loc>https://mvgpt.nenuadrian.com/ep001-architecture/</loc><lastmod>2026-10-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep001-architecture.a9f5d5d4ae.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep001-architecture.a9f5d5d4ae.jpg</video:thumbnail_loc><video:title>Build a GPT from scratch in PyTorch | Minimum Viable GPT #1</video:title><video:description>We&#39;re starting a series where we build mvGPT, a minimum viable GPT, from scratch in PyTorch, and take it through the training pipeline of a language model. In this first episode, we look at TinyStories, the data we start with, and at Attention Is All You Need, and go through our decoder-only architecture. We see where its 14.6 million parameters are and how a prompt flows through it to the next token, then write it in PyTorch, class by class.</video:description><video:player_loc>https://www.youtube.com/embed/Vff1s2GzI_o</video:player_loc><video:duration>1900</video:duration><video:publication_date>2026-10-15</video:publication_date><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>attention is all you need</video:tag><video:tag>self-attention</video:tag><video:tag>multi-head attention</video:tag><video:tag>gelu</video:tag><video:tag>tinystories</video:tag><video:tag>deep learning</video:tag><video:tag>machine learning</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep002-pretraining/</loc><lastmod>2026-10-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep002-pretraining.faf0c6af5a.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep002-pretraining.faf0c6af5a.jpg</video:thumbnail_loc><video:title>Pretraining a GPT from scratch in PyTorch | Minimum Viable GPT</video:title><video:description>Today, we pretrain our GPT on TinyStories, starting with a word-level tokenizer and the next-token objective, with cross-entropy as the loss. We write the training loop, with AdamW, a learning rate that warms up and then follows a cosine, and gradient clipping, and train for ten minutes on a laptop. Then we write stories with the model and with an early checkpoint, and measure the checkpoints on held-out stories, from the loss and perplexity to the likeliest next tokens.</video:description><video:player_loc>https://www.youtube.com/embed/KA0aVTQ5Wak</video:player_loc><video:duration>1603</video:duration><video:publication_date>2026-10-15</video:publication_date><video:tag>gpt</video:tag><video:tag>pretraining</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tokenizer</video:tag><video:tag>tinystories</video:tag><video:tag>cross entropy</video:tag><video:tag>adamw</video:tag><video:tag>learning rate schedule</video:tag><video:tag>perplexity</video:tag><video:tag>training loop</video:tag><video:tag>deep learning</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep003-sft/</loc><lastmod>2026-10-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep003-sft.0941e35243.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep003-sft.0941e35243.jpg</video:thumbnail_loc><video:title>Fine-tuning a GPT to follow instructions with SFT | Minimum Viable GPT</video:title><video:description>A pretrained model is an autocomplete, so in this episode we fine-tune ours to follow instructions, with TinyStories-Instruct, where each story comes with words to use, features and a summary. We mask the loss so the model learns the story and not the instruction, pad batches of different lengths, and fine-tune for ten minutes. Then we measure the model before and after, on how many of the requested words its stories use, and move the run&#39;s logs over to TensorBoard.</video:description><video:player_loc>https://www.youtube.com/embed/WUsVr66Bgq0</video:player_loc><video:duration>1609</video:duration><video:publication_date>2026-10-15</video:publication_date><video:tag>gpt</video:tag><video:tag>supervised fine-tuning</video:tag><video:tag>sft</video:tag><video:tag>instruction tuning</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>loss masking</video:tag><video:tag>cross entropy</video:tag><video:tag>evaluation</video:tag><video:tag>tensorboard</video:tag><video:tag>matplotlib</video:tag><video:tag>deep learning</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep004-kv-cache/</loc><lastmod>2026-10-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep004-kv-cache.aa92af1816.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep004-kv-cache.aa92af1816.jpg</video:thumbnail_loc><video:title>KV cache from scratch in PyTorch | Minimum Viable GPT</video:title><video:description>Our model runs the whole story through all its blocks for each token it writes, so this time we give it a KV cache, which keeps the keys and values of the earlier tokens. We add it to attention, with the positions and the mask it needs, and check that it changes nothing, with matching logits and stories. On a laptop, it writes about four times faster on the CPU, and less so on the GPU, and we finish with what a KV cache costs at the scale of Llama 3.1.</video:description><video:player_loc>https://www.youtube.com/embed/JPlzOZouQxQ</video:player_loc><video:duration>1198</video:duration><video:publication_date>2026-10-15</video:publication_date><video:tag>gpt</video:tag><video:tag>kv cache</video:tag><video:tag>inference</video:tag><video:tag>generation</video:tag><video:tag>attention</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>transformer</video:tag><video:tag>benchmark</video:tag><video:tag>gpu</video:tag><video:tag>mps</video:tag><video:tag>grouped-query attention</video:tag><video:tag>vllm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep005-deploy/</loc><lastmod>2026-10-16</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep005-deploy.ea57a17866.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep005-deploy.ea57a17866.jpg</video:thumbnail_loc><video:title>Deploy a GPT with Hugging Face, Gradio and a browser | Minimum Viable GPT</video:title><video:description>This time, we deploy our model, first to the Hugging Face Hub as a GPT-2 that transformers can load, with a tokenizer.json, an 8-bit ONNX export and a tag per episode. Then a Gradio app loads each version from the Hub and writes stories, on my machine and in Docker on a VPS, deployed over SSH. And a single web page runs the model in the browser with Transformers.js, downloading it when you ask for a story.</video:description><video:player_loc>https://www.youtube.com/embed/rn72Y_9dVE0</video:player_loc><video:duration>1659</video:duration><video:publication_date>2026-10-16</video:publication_date><video:tag>gpt</video:tag><video:tag>deployment</video:tag><video:tag>hugging face</video:tag><video:tag>transformers</video:tag><video:tag>transformers.js</video:tag><video:tag>gradio</video:tag><video:tag>onnx</video:tag><video:tag>quantization</video:tag><video:tag>docker</video:tag><video:tag>vps</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>gpt-2</video:tag><video:tag>tokenizer</video:tag><video:tag>safetensors</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep006-profiling/</loc><lastmod>2026-10-16</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep006-profiling.328dcd9048.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep006-profiling.328dcd9048.jpg</video:thumbnail_loc><video:title>Profiling a GPT with PyTorch&#39;s profiler | Minimum Viable GPT</video:title><video:description>In this episode, we look at where our model&#39;s time goes, starting with a graph of its 163 operations in Google&#39;s Model Explorer, exported with torch.export. Then PyTorch&#39;s profiler times a full pass and the writing of a token at a time, on the CPU and on the GPU. And we measure a few decisions in the code, such as our GELU written out, torch.compile and the size of the vocabulary, as each changes the speed by a different amount on each device.</video:description><video:player_loc>https://www.youtube.com/embed/7C0USj9KtI0</video:player_loc><video:duration>1100</video:duration><video:publication_date>2026-10-16</video:publication_date><video:tag>gpt</video:tag><video:tag>profiling</video:tag><video:tag>pytorch profiler</video:tag><video:tag>model explorer</video:tag><video:tag>torch.export</video:tag><video:tag>torch.compile</video:tag><video:tag>performance</video:tag><video:tag>gpu</video:tag><video:tag>mps</video:tag><video:tag>cpu</video:tag><video:tag>attention</video:tag><video:tag>gelu</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep007-dpo/</loc><lastmod>2026-10-16</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep007-dpo.6810aa36b1.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep007-dpo.6810aa36b1.jpg</video:thumbnail_loc><video:title>Teaching a GPT from preferences with DPO | Minimum Viable GPT</video:title><video:description>In this episode, our model learns from preferences, with direct preference optimisation, DPO, which needs no reward model and no reinforcement learning. The fine-tuned model writes four stories per instruction, and code prefers the one that uses the most of the requested words to the one that uses the fewest. We train on 2,000 of these pairs for ten minutes, measure what changes, and run into reward hacking, as the model raises its score by writing longer stories.</video:description><video:player_loc>https://www.youtube.com/embed/aQ4WxQfB2S4</video:player_loc><video:duration>1038</video:duration><video:publication_date>2026-10-16</video:publication_date><video:tag>gpt</video:tag><video:tag>dpo</video:tag><video:tag>direct preference optimization</video:tag><video:tag>preference optimization</video:tag><video:tag>rlhf</video:tag><video:tag>alignment</video:tag><video:tag>fine-tuning</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>reward hacking</video:tag><video:tag>evaluation</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep008-ppo/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep008-ppo.cebb60a81f.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep008-ppo.cebb60a81f.jpg</video:thumbnail_loc><video:title>Reinforcement learning for a GPT with PPO | Minimum Viable GPT</video:title><video:description>This time, our model learns from its own stories as it writes them, with reinforcement learning and proximal policy optimisation, PPO, as in the PPO paper and InstructGPT. A reward scored by code counts the requested words, a critic learns what score to expect, and a KL penalty keeps the model near the fine-tuned one. We train for ten minutes with a small penalty and with a large one, and measure both against the fine-tuned model and DPO.</video:description><video:player_loc>https://www.youtube.com/embed/8ewa70rUPME</video:player_loc><video:duration>1343</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>gpt</video:tag><video:tag>ppo</video:tag><video:tag>proximal policy optimization</video:tag><video:tag>reinforcement learning</video:tag><video:tag>rlhf</video:tag><video:tag>instructgpt</video:tag><video:tag>kl divergence</video:tag><video:tag>advantage</video:tag><video:tag>policy gradient</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep009-lora/</loc><lastmod>2026-10-16</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep009-lora.c4c8338277.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep009-lora.c4c8338277.jpg</video:thumbnail_loc><video:title>LoRA fine-tuning a GPT with 2% of its weights | Minimum Viable GPT</video:title><video:description>We&#39;re going to fine-tune with low-rank adaptation, LoRA, which freezes the pretrained weights and trains a small update beside each linear layer, as the product of two thin matrices. We write it in PyTorch, fine-tune on instructions for ten minutes with about 2% of the weights, and merge the update back into the model. Then we compare it with full fine-tuning from episode three, on the file we keep, the optimiser&#39;s memory, the losses and the stories.</video:description><video:player_loc>https://www.youtube.com/embed/m5THIkAJJFk</video:player_loc><video:duration>898</video:duration><video:publication_date>2026-10-16</video:publication_date><video:tag>lora</video:tag><video:tag>low-rank adaptation</video:tag><video:tag>peft</video:tag><video:tag>parameter-efficient fine-tuning</video:tag><video:tag>fine-tuning</video:tag><video:tag>adapters</video:tag><video:tag>pytorch</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>instruction tuning</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep010-rope/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep010-rope.fd93ffd1ae.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep010-rope.fd93ffd1ae.jpg</video:thumbnail_loc><video:title>Rotary position embeddings (RoPE) from scratch | Minimum Viable GPT</video:title><video:description>Our model learned a table of positions that stops at its context window of 256 tokens, so today we replace it with rotary position embeddings, from the RoFormer paper. Each query and key is turned by an angle that grows with its position, so attention depends on how far apart two tokens are. We pretrain for ten minutes next to episode two&#39;s model, and measure both past their context window, where our KV cache can now slide.</video:description><video:player_loc>https://www.youtube.com/embed/CVeEPW67Gv8</video:player_loc><video:duration>1043</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>gpt</video:tag><video:tag>rope</video:tag><video:tag>rotary position embeddings</video:tag><video:tag>position embeddings</video:tag><video:tag>roformer</video:tag><video:tag>kv cache</video:tag><video:tag>context window</video:tag><video:tag>attention</video:tag><video:tag>transformer</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep011-bpe/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep011-bpe.3a4b0d14e3.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep011-bpe.3a4b0d14e3.jpg</video:thumbnail_loc><video:title>A byte-level BPE tokenizer for a GPT in C++ | Minimum Viable GPT</video:title><video:description>Our word-level tokenizer turns any word outside its vocabulary of ten thousand into an unknown token, so in this episode we replace it with byte-pair encoding, the tokenizer of GPT-2. We write a Python reference after the paper, then the algorithm in C++, built into a Python module with pybind11 and tested against the reference. Then we pretrain on the stories in BPE, time C++ against Python, and compare the models in bits per character, as their losses per token can&#39;t be compared.</video:description><video:player_loc>https://www.youtube.com/embed/_o0mJYWdKQQ</video:player_loc><video:duration>1898</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>bpe</video:tag><video:tag>byte pair encoding</video:tag><video:tag>tokenizer</video:tag><video:tag>byte-level bpe</video:tag><video:tag>subword units</video:tag><video:tag>c++</video:tag><video:tag>pybind11</video:tag><video:tag>gpt-2</video:tag><video:tag>tokenization</video:tag><video:tag>bits per character</video:tag><video:tag>pytorch</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep012-distributed/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep012-distributed.88d7d4a1d5.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep012-distributed.88d7d4a1d5.jpg</video:thumbnail_loc><video:title>Distributed training in PyTorch on 4 GPUs with DDP | Minimum Viable GPT</video:title><video:description>For this episode, we rent four RTX 4090s on Vast.ai and pretrain a model about six times bigger than our laptop&#39;s, in GPT-2 small&#39;s shape, with PyTorch&#39;s DistributedDataParallel and torchrun. We try it on the laptop first, then measure the training speed on one, two and four GPUs, and train for thirty minutes on all of TinyStories. And we compare the result with the laptop&#39;s model, in bits per character and in its stories, and save it for Hugging Face.</video:description><video:player_loc>https://www.youtube.com/embed/5-RJVvuGZyE</video:player_loc><video:duration>1726</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>distributed training</video:tag><video:tag>data parallel</video:tag><video:tag>distributeddataparallel</video:tag><video:tag>ddp</video:tag><video:tag>torchrun</video:tag><video:tag>nccl</video:tag><video:tag>multi-gpu</video:tag><video:tag>rtx 4090</video:tag><video:tag>vast.ai</video:tag><video:tag>gpu rental</video:tag><video:tag>pytorch</video:tag><video:tag>pretraining</video:tag><video:tag>gpt-2 small</video:tag><video:tag>gpt-neox</video:tag><video:tag>hugging face</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep013-flash-attention/</loc><lastmod>2026-10-16</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep013-flash-attention.30b14277a6.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep013-flash-attention.30b14277a6.jpg</video:thumbnail_loc><video:title>Flash attention from scratch in PyTorch and Triton | Minimum Viable GPT</video:title><video:description>Attention as the paper writes it keeps a table of scores that grows with the square of the length, so in this episode we write flash attention, which computes it a block at a time. We start with attention by hand and its memory on the Mac, then write the online softmax in PyTorch, and then as a Triton kernel on a rented RTX 4090. And we measure our kernel against FlashAttention-2, which PyTorch already runs on NVIDIA GPUs, and pretrain the model with each.</video:description><video:player_loc>https://www.youtube.com/embed/HEYzYWquKos</video:player_loc><video:duration>2346</video:duration><video:publication_date>2026-10-16</video:publication_date><video:tag>flash attention</video:tag><video:tag>flashattention</video:tag><video:tag>flashattention-2</video:tag><video:tag>triton</video:tag><video:tag>gpu kernel</video:tag><video:tag>cuda</video:tag><video:tag>attention</video:tag><video:tag>online softmax</video:tag><video:tag>pytorch</video:tag><video:tag>scaled dot product attention</video:tag><video:tag>apple silicon</video:tag><video:tag>rtx 4090</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep014-serving/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep014-serving.d75ff074fb.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep014-serving.d75ff074fb.jpg</video:thumbnail_loc><video:title>Batching to serve a GPT to many users at once | Minimum Viable GPT</video:title><video:description>In this episode, we serve our model to many users at once, say the players of a game like nanoMMO from my other series, through an API in the shape of OpenAI&#39;s completions. Written one request at a time, the wait grows with the queue, so the server writes the stories of the waiting requests together, as a batch padded on the left. We measure it with a script that simulates a crowd of players, put the server in Docker, and look at vLLM as the alternative.</video:description><video:player_loc>https://www.youtube.com/embed/6XGhd_83uwU</video:player_loc><video:duration>1515</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>llm serving</video:tag><video:tag>batching</video:tag><video:tag>dynamic batching</video:tag><video:tag>continuous batching</video:tag><video:tag>vllm</video:tag><video:tag>openai api</video:tag><video:tag>completions api</video:tag><video:tag>http server</video:tag><video:tag>python</video:tag><video:tag>threading</video:tag><video:tag>kv cache</video:tag><video:tag>padding</video:tag><video:tag>attention mask</video:tag><video:tag>docker</video:tag><video:tag>pytorch</video:tag><video:tag>transformers</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag><video:tag>nanommo</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep015-diffusion/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep015-diffusion.2f995c3da7.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep015-diffusion.2f995c3da7.jpg</video:thumbnail_loc><video:title>A text diffusion GPT that writes all at once | Minimum Viable GPT</video:title><video:description>This time, our GPT becomes a masked diffusion model, which writes a story by starting from a window of hidden tokens and unhiding the ones it&#39;s surest of, anywhere in the story. We write its loss and its sampler next to LLaDA&#39;s code, and train it for ten minutes on the laptop and for thirty on four rented RTX 4090s. Then we measure it against next-token prediction, fill in the middle of stories, and start a diffusion model from a next-token model&#39;s weights, as Dream 7B did.</video:description><video:player_loc>https://www.youtube.com/embed/LVWHstzgqE4</video:player_loc><video:duration>2018</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>diffusion language model</video:tag><video:tag>masked diffusion</video:tag><video:tag>text diffusion</video:tag><video:tag>llada</video:tag><video:tag>mdlm</video:tag><video:tag>dream 7b</video:tag><video:tag>discrete diffusion</video:tag><video:tag>denoising</video:tag><video:tag>infilling</video:tag><video:tag>bidirectional attention</video:tag><video:tag>elbo</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>rtx 4090</video:tag><video:tag>vast.ai</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep016-grpo/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep016-grpo.1383168856.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep016-grpo.1383168856.jpg</video:thumbnail_loc><video:title>Reinforcement learning without a critic using GRPO | Minimum Viable GPT</video:title><video:description>Today, we write group relative policy optimisation, GRPO, the method behind DeepSeekMath and DeepSeek-R1, which does reinforcement learning without the critic our PPO needed. The model writes eight stories per instruction, and each story&#39;s advantage is its reward measured against the group&#39;s mean. We train for ten minutes with a KL penalty and without one, on episode eight&#39;s reward, and measure both against the fine-tuned model and PPO.</video:description><video:player_loc>https://www.youtube.com/embed/SoFl6r8Qz-0</video:player_loc><video:duration>1303</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>gpt</video:tag><video:tag>grpo</video:tag><video:tag>group relative policy optimization</video:tag><video:tag>ppo</video:tag><video:tag>reinforcement learning</video:tag><video:tag>deepseek</video:tag><video:tag>deepseek-r1</video:tag><video:tag>deepseekmath</video:tag><video:tag>reasoning</video:tag><video:tag>advantage</video:tag><video:tag>kl divergence</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>tinystories</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep017-modern-block/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep017-modern-block.896c82f2df.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep017-modern-block.896c82f2df.jpg</video:thumbnail_loc><video:title>A modern GPT block with RMSNorm, SwiGLU and QK-norm | Minimum Viable GPT</video:title><video:description>Our transformer block still follows GPT-2&#39;s, so in this episode we bring it up to date with the changes open models made, from LLaMA to Qwen3. Following their papers, we write RMSNorm, SwiGLU, QK-norm and linear layers without biases by hand, each behind a config field, with tests against PyTorch&#39;s own. And we keep our earlier checkpoints loading as before, and work out the parameter count before and after.</video:description><video:player_loc>https://www.youtube.com/embed/cPiQO4AilGY</video:player_loc><video:duration>2172</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>transformer block</video:tag><video:tag>rmsnorm</video:tag><video:tag>swiglu</video:tag><video:tag>glu</video:tag><video:tag>qk-norm</video:tag><video:tag>qk normalization</video:tag><video:tag>layernorm</video:tag><video:tag>silu</video:tag><video:tag>llama</video:tag><video:tag>palm</video:tag><video:tag>qwen3</video:tag><video:tag>olmo 2</video:tag><video:tag>attention logits</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep018-gqa/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep018-gqa.6b66ab3bf3.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep018-gqa.6b66ab3bf3.jpg</video:thumbnail_loc><video:title>Grouped-query attention for a smaller KV cache | Minimum Viable GPT</video:title><video:description>Our KV cache keeps a key and a value for each of the six heads in each block, so this time we add grouped-query attention, as in Llama 2&#39;s bigger models and in Llama 3.1. Its query heads share their keys and values in groups, and we write it into our model as a config option, with tests against multi-head attention and against writing without the cache. With two key and value heads in place of six, the cache takes a third of the memory.</video:description><video:player_loc>https://www.youtube.com/embed/SpKMenz36TM</video:player_loc><video:duration>1346</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>gpt</video:tag><video:tag>grouped-query attention</video:tag><video:tag>gqa</video:tag><video:tag>multi-query attention</video:tag><video:tag>mqa</video:tag><video:tag>multi-head attention</video:tag><video:tag>kv cache</video:tag><video:tag>attention</video:tag><video:tag>inference</video:tag><video:tag>llama 2</video:tag><video:tag>llama 3</video:tag><video:tag>transformer</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep019-web/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep019-web.b6e51d386e.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep019-web.b6e51d386e.jpg</video:thumbnail_loc><video:title>Pretraining a GPT on the web overnight | Minimum Viable GPT</video:title><video:description>In this episode, we move our model from children&#39;s stories to the web, with FineWeb-Edu, pages that a classifier scored as educational, and BPE merges learned on them. We work out how many tokens a night on one GPU can buy, against the Chinchilla paper&#39;s twenty tokens per parameter, and train a model of about 110 million parameters for nearly eight hours on a rented RTX 4090. In the morning, we measure it on HellaSwag next to GPT-2 small, and in bits per character on stories and on web pages.</video:description><video:player_loc>https://www.youtube.com/embed/15vafg1wdpI</video:player_loc><video:duration>1603</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>pretraining</video:tag><video:tag>fineweb-edu</video:tag><video:tag>fineweb</video:tag><video:tag>web data</video:tag><video:tag>common crawl</video:tag><video:tag>chinchilla</video:tag><video:tag>scaling laws</video:tag><video:tag>gradient accumulation</video:tag><video:tag>checkpointing</video:tag><video:tag>hellaswag</video:tag><video:tag>benchmark</video:tag><video:tag>gpt-2 small</video:tag><video:tag>rtx 4090</video:tag><video:tag>vast.ai</video:tag><video:tag>gpu rental</video:tag><video:tag>bpe</video:tag><video:tag>tokenizer</video:tag><video:tag>pytorch</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep020-tools/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep020-tools.e975949360.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep020-tools.e975949360.jpg</video:thumbnail_loc><video:title>LLM tool calling from scratch with a calculator | Minimum Viable GPT</video:title><video:description>Our web model writes fluent text but can&#39;t do arithmetic, so today we teach it to call a calculator, as Toolformer did, writing the call as plain text for the program running it to fill in. We generate fifty thousand questions and fine-tune for ten minutes on the laptop, with the questions and the calculator&#39;s results left out of the loss. Then we measure the calls on held-out questions, worded the way training words them and in new ways, with the calculator and without it.</video:description><video:player_loc>https://www.youtube.com/embed/UrlqjWEuYH4</video:player_loc><video:duration>1250</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>tool use</video:tag><video:tag>function calling</video:tag><video:tag>calculator</video:tag><video:tag>toolformer</video:tag><video:tag>fine-tuning</video:tag><video:tag>sft</video:tag><video:tag>loss masking</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep021-agent/</loc><lastmod>2026-10-18</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep021-agent.19b757c95c.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep021-agent.19b757c95c.jpg</video:thumbnail_loc><video:title>AI agent from scratch, with subagents | Minimum Viable GPT</video:title><video:description>In this episode, our model becomes an agent, fine-tuned once into three roles: the agent, which hands parts of a task to subagents, a math role with the calculator, and a files role in a sandbox. Each subagent works in a fresh context, and its answer is all that goes back to the agent. We fine-tune for thirty minutes on the laptop, measure each role on held-out tasks, compare subagents with one long context, and put the agent in a Gradio chat that shows each step.</video:description><video:player_loc>https://www.youtube.com/embed/9SYXGDioA6g</video:player_loc><video:duration>1360</video:duration><video:publication_date>2026-10-18</video:publication_date><video:tag>agents</video:tag><video:tag>ai agents</video:tag><video:tag>subagents</video:tag><video:tag>tool use</video:tag><video:tag>function calling</video:tag><video:tag>sandbox</video:tag><video:tag>orchestrator</video:tag><video:tag>context window</video:tag><video:tag>fine-tuning</video:tag><video:tag>gradio</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep022-long-context/</loc><lastmod>2026-10-20</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep022-long-context.79c7d479e6.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep022-long-context.79c7d479e6.jpg</video:thumbnail_loc><video:title>Long context LLM by stretching RoPE with YaRN | Minimum Viable GPT</video:title><video:description>Our web model was pretrained on windows of 1,024 tokens, and its loss climbs past them, so in this episode we stretch its rotary embeddings four ways, from position interpolation to YaRN. We measure each on long web pages, by position, against a sliding window, and with the pass key test, a number hidden in filler. YaRN keeps the loss flat out to 4,096 tokens with no training at all, and then we fine-tune on long pages for fifteen minutes with two of the methods.</video:description><video:player_loc>https://www.youtube.com/embed/2C2JYv2agzo</video:player_loc><video:duration>2330</video:duration><video:publication_date>2026-10-20</video:publication_date><video:tag>gpt</video:tag><video:tag>long context</video:tag><video:tag>context window</video:tag><video:tag>rope</video:tag><video:tag>rotary position embeddings</video:tag><video:tag>yarn</video:tag><video:tag>position interpolation</video:tag><video:tag>ntk-aware</video:tag><video:tag>rope scaling</video:tag><video:tag>context extension</video:tag><video:tag>passkey retrieval</video:tag><video:tag>kv cache</video:tag><video:tag>fine-tuning</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep023-optimizers/</loc><lastmod>2026-10-22</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep023-optimizers.e28cacad2f.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep023-optimizers.e28cacad2f.jpg</video:thumbnail_loc><video:title>Muon vs AdamW, Lion and Sophia in a fair race | Minimum Viable GPT</video:title><video:description>All our training scripts use AdamW, so in this episode we put it in a fair race with Lion, Sophia and Muon, each written from its paper, with tests. They train one model on one set of batches for a thousand steps, each at its best learning rate from a sweep, with three seeds. Muon reaches in 1,000 steps the loss AdamW needs about 1,840 for, while Lion and Sophia land behind a tuned AdamW.</video:description><video:player_loc>https://www.youtube.com/embed/0ysdFCrmdlU</video:player_loc><video:duration>2732</video:duration><video:publication_date>2026-10-22</video:publication_date><video:tag>gpt</video:tag><video:tag>optimizer</video:tag><video:tag>adamw</video:tag><video:tag>adam</video:tag><video:tag>muon</video:tag><video:tag>lion</video:tag><video:tag>sophia</video:tag><video:tag>newton-schulz</video:tag><video:tag>learning rate</video:tag><video:tag>hyperparameter tuning</video:tag><video:tag>pretraining</video:tag><video:tag>pytorch</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep024-knowledge-graph/</loc><lastmod>2026-10-25</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep024-knowledge-graph.62aad69d0e.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep024-knowledge-graph.62aad69d0e.jpg</video:thumbnail_loc><video:title>Our GPT writes Cypher to ask a graph database | Minimum Viable GPT</video:title><video:description>Facts trained into a model&#39;s weights take training again to change, so in this episode our model learns to look them up. smollerGraph, the graph database we build from scratch in its own series, holds the mammals and birds on Wikidata, and our agent learns to write a Cypher query, send it to the database and answer from what comes back. We generate thirty thousand questions, most answered by the graph, fine-tune for twenty minutes on the laptop, and measure it on species training doesn&#39;t ask about, with the graph and without.</video:description><video:player_loc>https://www.youtube.com/embed/NxeRk1Q8LXY</video:player_loc><video:duration>1622</video:duration><video:publication_date>2026-10-25</video:publication_date><video:tag>text to cypher</video:tag><video:tag>cypher</video:tag><video:tag>graph database</video:tag><video:tag>knowledge graph</video:tag><video:tag>tool use</video:tag><video:tag>retrieval</video:tag><video:tag>wikidata</video:tag><video:tag>smollergraph</video:tag><video:tag>fine-tuning</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep025-graph-agent/</loc><lastmod>2026-10-28</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep025-graph-agent.175c7ad094.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep025-graph-agent.175c7ad094.jpg</video:thumbnail_loc><video:title>AI agent with a graph database and a calculator | Minimum Viable GPT</video:title><video:description>In this episode, our agent gets a fourth role. Next to the calculator and the files, it can now hand a question to a subagent that writes a Cypher query for smollerGraph, the graph database we build from scratch in its own series. So asked how much heavier the king penguin is than the great white pelican, it asks the graph twice and the calculator once. We generate forty-five thousand examples, almost half of them the agent&#39;s old tasks, fine-tune episode twenty-four&#39;s model for thirty minutes on the laptop, and measure the new tasks, the graph role on its own, and what the agent kept of its old tasks.</video:description><video:player_loc>https://www.youtube.com/embed/MeQ2iTAjobQ</video:player_loc><video:duration>1642</video:duration><video:publication_date>2026-10-28</video:publication_date><video:tag>ai agents</video:tag><video:tag>agents</video:tag><video:tag>subagents</video:tag><video:tag>multi-agent</video:tag><video:tag>tool use</video:tag><video:tag>function calling</video:tag><video:tag>text to cypher</video:tag><video:tag>graph database</video:tag><video:tag>knowledge graph</video:tag><video:tag>smollergraph</video:tag><video:tag>fine-tuning</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep026-constrained-decoding/</loc><lastmod>2026-10-28</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep026-constrained-decoding.3e95024836.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep026-constrained-decoding.3e95024836.jpg</video:thumbnail_loc><video:title>Structured LLM output with constrained decoding | Minimum Viable GPT</video:title><video:description>In this episode, our agent stops misspelling the okapi, with no training at all. Last time, its graph role copied the name wrong into its Cypher queries, and smollerGraph found nothing. Today, before each token inside a query&#39;s name, the tokens that would take the name off a list get a logit of minus infinity, which is how structured outputs keep a model to a JSON schema. We build it from scratch, with a trie of the vocabulary&#39;s tokens walked together with a trie of the names, a byte at a time. The obvious list, the names the graph has, turns the okapi into the oak titmouse, a real name and the wrong animal. The second list, the words of the task, gets it right, and we measure both on the graph role&#39;s held-out questions, and the task&#39;s words on the agent&#39;s tasks.</video:description><video:player_loc>https://www.youtube.com/embed/KypK6nrP-nE</video:player_loc><video:duration>1475</video:duration><video:publication_date>2026-10-28</video:publication_date><video:tag>constrained decoding</video:tag><video:tag>structured outputs</video:tag><video:tag>json mode</video:tag><video:tag>grammar</video:tag><video:tag>logits</video:tag><video:tag>tokens</video:tag><video:tag>tokenizer</video:tag><video:tag>trie</video:tag><video:tag>ai agents</video:tag><video:tag>text to cypher</video:tag><video:tag>graph database</video:tag><video:tag>smollergraph</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep027-speculative-decoding/</loc><lastmod>2026-10-28</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep027-speculative-decoding.67e749b042.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep027-speculative-decoding.67e749b042.jpg</video:thumbnail_loc><video:title>Speculative decoding from scratch | Minimum Viable GPT</video:title><video:description>In this episode, our agent writes its answers word for word as before, in fewer passes of the model. A pass on the Mac&#39;s GPU costs about the same for a few tokens as for one, so a cheap draft guesses the next few tokens, and the model checks them in the pass that writes its own, keeping the guesses up to the first it disagrees with. We build speculative decoding from scratch, with two drafts: prompt lookup, which guesses what the text copies for nothing, and a small model of four layers, trained for thirty minutes on the agent&#39;s tasks. Then we measure both on episode twenty-five&#39;s held-out tasks: the passes, the guesses kept, the time, and whether the text is the same.</video:description><video:player_loc>https://www.youtube.com/embed/gyC0YdAOlio</video:player_loc><video:duration>1556</video:duration><video:publication_date>2026-10-28</video:publication_date><video:tag>speculative decoding</video:tag><video:tag>prompt lookup decoding</video:tag><video:tag>draft model</video:tag><video:tag>inference</video:tag><video:tag>latency</video:tag><video:tag>kv cache</video:tag><video:tag>greedy decoding</video:tag><video:tag>ai agents</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>pytorch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep028-attention/</loc><lastmod>2026-10-28</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep028-attention.e3d5d7eeb8.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep028-attention.e3d5d7eeb8.jpg</video:thumbnail_loc><video:title>Attention heads in our GPT, seen and tested | Minimum Viable GPT</video:title><video:description>In this episode, we look inside our GPT while its graph role copies a name from its task into a Cypher query. We write attention out by hand to keep each head&#39;s weights, put the logit lens on the residual stream to see each layer&#39;s guess at the next token, and build a page of our own to look at all 144 heads on a prompt. A head in the last layer puts 92 percent of its attention on the name in the task, and the name shows up in the last layer alone. For the okapi, that head looks at the right token, and the model can&#39;t write it inside the quotes. Then we turn the heads that look at the name off, against random ones, and find that they do more than copy.</video:description><video:player_loc>https://www.youtube.com/embed/Lq4id0KSNWk</video:player_loc><video:duration>1362</video:duration><video:publication_date>2026-10-28</video:publication_date><video:tag>interpretability</video:tag><video:tag>mechanistic interpretability</video:tag><video:tag>attention</video:tag><video:tag>attention heads</video:tag><video:tag>logit lens</video:tag><video:tag>ablation</video:tag><video:tag>visualization</video:tag><video:tag>transformer</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>pytorch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep029-hyena/</loc><lastmod>2026-11-02</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep029-hyena.3c05a62d86.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep029-hyena.3c05a62d86.jpg</video:thumbnail_loc><video:title>Hyena, a GPT without attention, measured | Minimum Viable GPT</video:title><video:description>In this episode, we take attention out of our GPT and put Hyena in its place: long convolutions as long as the window, computed with the fast Fourier transform, between two gates. We write it from the paper and its authors&#39; code, follow the numbers through one channel, and train it against our own attention models on two rented RTX 4090s.</video:description><video:player_loc>https://www.youtube.com/embed/43X5VL86mXg</video:player_loc><video:duration>3638</video:duration><video:publication_date>2026-11-02</video:publication_date><video:tag>hyena</video:tag><video:tag>hyena hierarchy</video:tag><video:tag>long convolution</video:tag><video:tag>fft</video:tag><video:tag>fast fourier transform</video:tag><video:tag>attention</video:tag><video:tag>subquadratic attention</video:tag><video:tag>state space models</video:tag><video:tag>h3</video:tag><video:tag>gated convolution</video:tag><video:tag>associative recall</video:tag><video:tag>zoology</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>pytorch</video:tag><video:tag>rtx 4090</video:tag><video:tag>vast.ai</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep030-trl/</loc><lastmod>2026-11-05</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep030-trl.532a9a0fe9.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep030-trl.532a9a0fe9.jpg</video:thumbnail_loc><video:title>GRPO in Hugging Face TRL on our own small GPT | Minimum Viable GPT</video:title><video:description>In this episode, we hand our model to TRL, Hugging Face&#39;s library for training language models after pretraining, and train it with GRPO. We install it, save our GPT in GPT-2&#39;s format so TRL can load it, give it our instructions as a dataset and our reward as a function, and map each of our settings to TRL&#39;s config. We run it with the settings of the GRPO we wrote in episode sixteen, and with TRL&#39;s own defaults, and measure both with our own scripts, next to our own GRPO.</video:description><video:player_loc>https://www.youtube.com/embed/MalYv-Ov9N0</video:player_loc><video:duration>1663</video:duration><video:publication_date>2026-11-05</video:publication_date><video:tag>trl</video:tag><video:tag>hugging face</video:tag><video:tag>transformers</video:tag><video:tag>grpo</video:tag><video:tag>grpotrainer</video:tag><video:tag>reinforcement learning</video:tag><video:tag>rlhf</video:tag><video:tag>dapo</video:tag><video:tag>dr grpo</video:tag><video:tag>datasets</video:tag><video:tag>uv</video:tag><video:tag>gpt-2</video:tag><video:tag>fine-tuning</video:tag><video:tag>pytorch</video:tag><video:tag>apple silicon</video:tag><video:tag>mps</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep031-moe/</loc><lastmod>2026-11-12</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep031-moe.5e03a2b11d.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep031-moe.5e03a2b11d.jpg</video:thumbnail_loc><video:title>Mixture of experts from scratch in PyTorch | Minimum Viable GPT</video:title><video:description>In this episode, we give our GPT a mixture of experts: eight smaller MLPs in each block, and a router that sends each token to two of them. We write it as a loop over the experts, measure it, and then run all the experts in one batched matrix multiply. We balance the experts with Switch Transformer&#39;s loss and with DeepSeek-V3&#39;s bias, see what happens without either, train each for two thousand steps next to the dense model on this Mac, and look at which words each expert ends up with.</video:description><video:player_loc>https://www.youtube.com/embed/TwfM0aXovPo</video:player_loc><video:duration>2234</video:duration><video:publication_date>2026-11-12</video:publication_date><video:tag>mixture of experts</video:tag><video:tag>moe</video:tag><video:tag>sparse moe</video:tag><video:tag>router</video:tag><video:tag>top-k routing</video:tag><video:tag>load balancing</video:tag><video:tag>switch transformer</video:tag><video:tag>mixtral</video:tag><video:tag>deepseek-v3</video:tag><video:tag>auxiliary-loss-free</video:tag><video:tag>torch.bmm</video:tag><video:tag>swiglu</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>pytorch</video:tag><video:tag>apple silicon</video:tag><video:tag>mps</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep032-mlx/</loc><lastmod>2026-11-12</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep032-mlx.3bd51bc9cf.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep032-mlx.3bd51bc9cf.jpg</video:thumbnail_loc><video:title>Our GPT in Apple&#39;s MLX vs PyTorch on a Mac | Minimum Viable GPT</video:title><video:description>In this episode, we move our GPT from PyTorch to MLX, Apple&#39;s array library for Apple silicon. We write the model in MLX, load our PyTorch weights into it by name, and check that it gives the same logits and writes the same story. Then we race the two frameworks on this Mac&#39;s GPU, writing a token at a time and training at pretrain.py&#39;s batch size, with MLX&#39;s compiler and without, train a model in MLX from scratch, and bring it back to PyTorch.</video:description><video:player_loc>https://www.youtube.com/embed/jrqU-D3IeL8</video:player_loc><video:duration>1423</video:duration><video:publication_date>2026-11-12</video:publication_date><video:tag>mlx</video:tag><video:tag>apple mlx</video:tag><video:tag>apple silicon</video:tag><video:tag>metal</video:tag><video:tag>mps</video:tag><video:tag>pytorch</video:tag><video:tag>mlx vs pytorch</video:tag><video:tag>lazy evaluation</video:tag><video:tag>unified memory</video:tag><video:tag>mx.compile</video:tag><video:tag>kv cache</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mac</video:tag><video:tag>m4 pro</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep033-sae/</loc><lastmod>2026-11-12</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep033-sae.1c91353598.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep033-sae.1c91353598.jpg</video:thumbnail_loc><video:title>Sparse autoencoder features inside our GPT | Minimum Viable GPT</video:title><video:description>In this episode, we look inside the GPT we pretrained on web pages in episode nineteen, with a sparse autoencoder. It writes each token&#39;s 768 channels in the middle of the model as a sum of 32 directions out of more than twelve thousand, the features, trained on the fly on this Mac. We find the first token of each window behaving very differently, measure what the autoencoder costs the model&#39;s loss, read the contexts where features fire, and push the model&#39;s writing around with a single feature.</video:description><video:player_loc>https://www.youtube.com/embed/34t5PYpZ1W0</video:player_loc><video:duration>1557</video:duration><video:publication_date>2026-11-12</video:publication_date><video:tag>sparse autoencoder</video:tag><video:tag>sae</video:tag><video:tag>topk sae</video:tag><video:tag>interpretability</video:tag><video:tag>mechanistic interpretability</video:tag><video:tag>features</video:tag><video:tag>superposition</video:tag><video:tag>residual stream</video:tag><video:tag>attention sink</video:tag><video:tag>steering</video:tag><video:tag>activation steering</video:tag><video:tag>monosemanticity</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>pytorch</video:tag><video:tag>apple silicon</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep034-tokenizer/</loc><lastmod>2026-11-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep034-tokenizer.cdcd7cceb8.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep034-tokenizer.cdcd7cceb8.jpg</video:thumbnail_loc><video:title>Measuring and fixing our C++ BPE tokenizer | Minimum Viable GPT</video:title><video:description>In this episode, we go back to the BPE tokenizer we wrote in C++ in episode eleven, and measure it on FineWeb-Edu&#39;s web pages before changing anything: its memory, where its time goes, what threads do for it, and how its time grows with the length of a chunk. Then we fix what we find, one change at a time: an LRU cache with a limit, the whole encode in C++ from bytes to a NumPy array, the GIL let go, a crash and a data race that ThreadSanitizer finds, a cache for each call, and a heap that merges a long chunk without looking at each pair again.</video:description><video:player_loc>https://www.youtube.com/embed/G525_7elarw</video:player_loc><video:duration>2980</video:duration><video:publication_date>2026-11-15</video:publication_date><video:tag>bpe</video:tag><video:tag>tokenizer</video:tag><video:tag>c++</video:tag><video:tag>pybind11</video:tag><video:tag>profiling</video:tag><video:tag>benchmarking</video:tag><video:tag>lru cache</video:tag><video:tag>gil</video:tag><video:tag>python threads</video:tag><video:tag>threadsanitizer</video:tag><video:tag>data race</video:tag><video:tag>sanitizer</video:tag><video:tag>numpy</video:tag><video:tag>heap</video:tag><video:tag>priority queue</video:tag><video:tag>linked list</video:tag><video:tag>memory</video:tag><video:tag>malloc</video:tag><video:tag>software engineering</video:tag><video:tag>gpt</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mvgpt</video:tag></video:video></url>
<url><loc>https://mvgpt.nenuadrian.com/ep035-mojo/</loc><lastmod>2026-11-15</lastmod><image:image><image:loc>https://mvgpt.nenuadrian.com/thumbs/ep035-mojo.f75328caf4.jpg</image:loc></image:image><video:video><video:thumbnail_loc>https://mvgpt.nenuadrian.com/thumbs/ep035-mojo.f75328caf4.jpg</video:thumbnail_loc><video:title>Our GPT&#39;s own GPU kernels in Mojo on a Mac | Minimum Viable GPT</video:title><video:description>In this episode, we write the part of our GPT that writes text, a token at a time, as GPU kernels in Mojo, Modular&#39;s Python-like language, and call them from Python on this Mac&#39;s GPU. We check that they give PyTorch&#39;s logits and write PyTorch&#39;s story, then race them against PyTorch and MLX. The first version, a thread for each number, is the slowest of the three. Warps of 32 threads that read side by side, and then fewer kernels a token, after measuring what a kernel launch costs, bring it most of the way to MLX.</video:description><video:player_loc>https://www.youtube.com/embed/LRUZpmyfrlY</video:player_loc><video:duration>2200</video:duration><video:publication_date>2026-11-15</video:publication_date><video:tag>mojo</video:tag><video:tag>mojo language</video:tag><video:tag>modular</video:tag><video:tag>max</video:tag><video:tag>gpu kernels</video:tag><video:tag>gpu programming</video:tag><video:tag>metal</video:tag><video:tag>apple silicon</video:tag><video:tag>warp</video:tag><video:tag>simd group</video:tag><video:tag>kernel fusion</video:tag><video:tag>kernel launch</video:tag><video:tag>layernorm</video:tag><video:tag>attention</video:tag><video:tag>kv cache</video:tag><video:tag>mlx</video:tag><video:tag>pytorch</video:tag><video:tag>mps</video:tag><video:tag>gpt</video:tag><video:tag>transformer</video:tag><video:tag>language model</video:tag><video:tag>llm</video:tag><video:tag>from scratch</video:tag><video:tag>mac</video:tag><video:tag>m4 pro</video:tag><video:tag>mvgpt</video:tag></video:video></url>
</urlset>
