Building an MCP Client in Python from Scratch
In this article, you will learn how to build a working MCP client in Python with the official MCP Python SDK 2.0, connect it to…
In this article, you will learn how to build a working MCP client in Python with the official MCP Python SDK 2.0, connect it to…
Overview This post is divided into four parts; they are: • The Cost of a Long Context • Chunked Prefill • Managing Long-Lived KV State • Selecting Useful Context The Cost of a Long Context For full causal attention over a prompt of $N$ tokens, prefill attention computes a triangular portion of an $N times …
In this article, you will learn how to build a Proposer-Critic-Judge verification loop in Python with a single small open model, and how to measure…
Overview This post is divided into five parts; they are: • Reusing Prefill Work • Finding the Longest Cached Prefix • Block Hashes, Radix Trees, and Compatibility • Designing Prompts for Reuse • Capacity and Measurement Reusing Prefill Work During prefill, every layer computes keys and values for every prompt token.
Before running anything, it helps to know what Microsoft measured.
Overview This post is divided into six parts; they are: • Draft and Verify • Sampling-Based Speculative Decoding • Assisted Generation with a Draft Model • Measuring Acceptance and Speedup • Other Ways to Draft Tokens • When Speculation Helps Draft and Verify Speculative decoding involves two models: a draft model (usually a smaller model …
In this article, you will learn how embedding models differ, what they cost to run at scale, and how to benchmark open-weight models on your…
In this article, you will learn how to build a local AI agent in Python that uses Ollama and Qwen3 to call tools that search,…
Overview This post is divided into six parts; they are: • Running Decoding Policies with vLLM • Sampling Filters and Per-Token Work • Multiple Outputs and Beam Search • Stop Conditions and Request Lifetime • Structured Outputs • Batching and Runtime Cost Running Decoding Policies with vLLM vLLM separates model execution from token selection.
Three events that look alike need separate names.