<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>InterviewPrepKit Blog</title>
    <link>https://interviewprepkit.dev/blog/</link>
    <description>Deep dives on LLMs, AI agents, and ML systems by Armin Norouzi.</description>
    <language>en-us</language>
    <item>
      <title>Attention Is O(n²): FlashAttention vs Linear Attention</title>
      <link>https://interviewprepkit.dev/blog/attention-complexity-flash/</link>
      <guid>https://interviewprepkit.dev/blog/attention-complexity-flash/</guid>
      <pubDate>Tue, 22 Sep 2026 10:00:00 GMT</pubDate>
      <description>Standard attention on a 32K-token sequence allocates 2,199 GB of score-matrix memory across a 32-layer model — 27× the capacity of an A100 80GB.</description>
    </item>
    <item>
      <title>LLM Under the Hood — Part 5: The Transformer Encoder</title>
      <link>https://interviewprepkit.dev/blog/llm-under-the-hood-part-05-encoder/</link>
      <guid>https://interviewprepkit.dev/blog/llm-under-the-hood-part-05-encoder/</guid>
      <pubDate>Thu, 17 Sep 2026 10:00:00 GMT</pubDate>
      <description>Build a complete Transformer Encoder Layer in PyTorch with residuals, LayerNorm, and FFN. Real print(model) output of an 8,544-parameter encoder.</description>
    </item>
    <item>
      <title>Positional Encoding: From Sinusoidal to RoPE to ALiBi</title>
      <link>https://interviewprepkit.dev/blog/positional-encoding-rope-alibi/</link>
      <guid>https://interviewprepkit.dev/blog/positional-encoding-rope-alibi/</guid>
      <pubDate>Tue, 15 Sep 2026 10:00:00 GMT</pubDate>
      <description>Transformers are permutation-invariant by design: without positional information, the model treats 'the cat sat on the mat' identically to 'the mat sat on the cat.' Positional encoding injects order…</description>
    </item>
    <item>
      <title>LLM Under the Hood — Part 4: Multi-Head Attention</title>
      <link>https://interviewprepkit.dev/blog/llm-under-the-hood-part-04-multihead-and-positional/</link>
      <guid>https://interviewprepkit.dev/blog/llm-under-the-hood-part-04-multihead-and-positional/</guid>
      <pubDate>Thu, 10 Sep 2026 10:00:00 GMT</pubDate>
      <description>Run attention in parallel across multiple heads, then inject word order with sine/cosine positional encoding. Real PE matrix visualized in PyTorch.</description>
    </item>
    <item>
      <title>Entropy, Cross-Entropy, and KL Divergence in LLM Training</title>
      <link>https://interviewprepkit.dev/blog/entropy-cross-entropy-kl-divergence/</link>
      <guid>https://interviewprepkit.dev/blog/entropy-cross-entropy-kl-divergence/</guid>
      <pubDate>Tue, 08 Sep 2026 10:00:00 GMT</pubDate>
      <description>Each code block in this article is self-contained and can be run independently — that is why a few helper functions (softmax, kl_divergence, etc.) are re-defined across snippets.</description>
    </item>
    <item>
      <title>LLM Under the Hood — Part 3: The Attention Mechanism</title>
      <link>https://interviewprepkit.dev/blog/llm-under-the-hood-part-03-attention/</link>
      <guid>https://interviewprepkit.dev/blog/llm-under-the-hood-part-03-attention/</guid>
      <pubDate>Thu, 03 Sep 2026 10:00:00 GMT</pubDate>
      <description>Build scaled dot-product attention from scratch in PyTorch. See real attention weights from a forward pass. The mechanism that powers every modern LLM.</description>
    </item>
    <item>
      <title>Backpropagation Without the Magic: A First-Principles Derivation</title>
      <link>https://interviewprepkit.dev/blog/backpropagation-first-principles/</link>
      <guid>https://interviewprepkit.dev/blog/backpropagation-first-principles/</guid>
      <pubDate>Tue, 01 Sep 2026 10:00:00 GMT</pubDate>
      <description>Every ML engineer uses backpropagation daily. Most treat it as a framework primitive — loss.backward() runs and gradients appear.</description>
    </item>
    <item>
      <title>LLM Under the Hood — Part 2: From RNNs to LSTMs</title>
      <link>https://interviewprepkit.dev/blog/llm-under-the-hood-part-02-rnns-and-lstms/</link>
      <guid>https://interviewprepkit.dev/blog/llm-under-the-hood-part-02-rnns-and-lstms/</guid>
      <pubDate>Thu, 27 Aug 2026 10:00:00 GMT</pubDate>
      <description>Why vanilla RNNs fail on long sequences and how LSTM gates fix it. Real PyTorch training and BPTT gradient measurements. Part 2 of LLM Under the Hood.</description>
    </item>
    <item>
      <title>Why Transformers Work: Attention as Learned Soft Retrieval</title>
      <link>https://interviewprepkit.dev/blog/why-transformers-work/</link>
      <guid>https://interviewprepkit.dev/blog/why-transformers-work/</guid>
      <pubDate>Tue, 25 Aug 2026 10:00:00 GMT</pubDate>
      <description>Every practitioner working with transformers has encountered the attention mechanism described the same way: 'it lets tokens attend to each other.' That description is accurate and useless.</description>
    </item>
    <item>
      <title>LLM Under the Hood — Part 1: Introduction &amp; Word Embeddings</title>
      <link>https://interviewprepkit.dev/blog/llm-under-the-hood-part-01-introduction-and-embeddings/</link>
      <guid>https://interviewprepkit.dev/blog/llm-under-the-hood-part-01-introduction-and-embeddings/</guid>
      <pubDate>Thu, 20 Aug 2026 10:00:00 GMT</pubDate>
      <description>A 10-part series rebuilding modern LLMs in PyTorch from scratch. Part 1 starts with word embeddings and a real CBOW model trained on a tiny corpus.</description>
    </item>
    <item>
      <title>Feature Store Architecture: Fix Training-Serving Skew</title>
      <link>https://interviewprepkit.dev/blog/feature-store-architecture/</link>
      <guid>https://interviewprepkit.dev/blog/feature-store-architecture/</guid>
      <pubDate>Tue, 18 Aug 2026 10:00:00 GMT</pubDate>
      <description>A recommendation model that performs well offline but degrades in production is one of the most common and most expensive problems in machine learning.</description>
    </item>
    <item>
      <title>Async DAGs vs Fibers: Stackless and Stackful Concurrency in C++</title>
      <link>https://interviewprepkit.dev/blog/async-dags-vs-fibers/</link>
      <guid>https://interviewprepkit.dev/blog/async-dags-vs-fibers/</guid>
      <pubDate>Mon, 17 Aug 2026 00:00:00 GMT</pubDate>
      <description>A future, a promise, a reactive stream, a sender — they're all the same async DAG: a graph of continuations that fires as results resolve. Fibers express the same graph as sequential code with a stack. Here's the architecture of each, down to the coroutine frame and the register swap, and how to choose.</description>
    </item>
    <item>
      <title>Multi-Agent Fan-Out: When Parallelism Bites Back</title>
      <link>https://interviewprepkit.dev/blog/multi-agent-fanout-patterns/</link>
      <guid>https://interviewprepkit.dev/blog/multi-agent-fanout-patterns/</guid>
      <pubDate>Sun, 16 Aug 2026 00:00:00 GMT</pubDate>
      <description>Scatter-gather is one of the most seductive patterns in distributed systems: split a hard problem into N pieces, run them in parallel, collect the results.</description>
    </item>
  </channel>
</rss>