Abstract illustration of DSpark routing confident drafted tokens through a verification scheduler

DSpark Explained: DeepSeek's Confidence-Scheduled Speculative Decoding

DeepSeek recently open-sourced DeepSpec, a codebase for training and evaluating speculative decoding draft models, along with the DSpark paper and checkpoints. I wanted to understand what is actually new here, because speculative decoding itself is not new. The older idea is already powerful: use a small draft model to propose tokens, then let the large target model verify them. I explained that foundation in Speculative Decoding Explained. DSpark is interesting because it attacks two practical problems that show up when speculative decoding moves from a paper idea into production serving: ...

June 29, 2026 · 11 min · Nitin
Abstract illustration of a small draft model proposing tokens and a large target model verifying them

Speculative Decoding Explained: How LLMs Generate Faster Without Changing the Answer

Speculative decoding is one of the most important tricks behind fast LLM serving. The basic idea is simple: Use a small fast model to guess several future tokens, then use the original large model to verify those guesses in one pass. If the guesses are right, the large model moves forward by multiple tokens instead of one. If a guess is wrong, the large model corrects it and the system continues. ...

June 29, 2026 · 11 min · Nitin
KV cache during LLM inferenceA decoder-only transformer reuses cached key and value vectors while a new token adds one new key-value row during decode.KV Cache in LLM InferenceReuse old keys and values. Compute only the new token.Prompt tokensThecodeisnewTransformer blockQKVlatest query attendsover cached K/VKV CacheKeysValuesappend one row per generated tokenno full recompute during decode

KV Cache Explained: Why LLMs Remember Keys and Values During Inference

The KV cache is one of those LLM inference terms that sounds simple until someone asks you to explain it from first principles. At a high level, the idea is: During generation, a transformer stores the previously computed key and value vectors, so it does not recompute them for the whole sequence every time it predicts the next token. That is the short answer. But the short answer hides the important part: why keys and values are reusable, why queries are not cached in the same way, and why this matters so much for latency. ...

June 17, 2026 · 10 min · Nitin

TTFT in LLMs Explained: What Time to First Token Really Measures

When I evaluate an LLM system, one of the first latency metrics I look at is TTFT, or time to first token. This metric answers a simple question: After a user sends a request, how long does it take before the first output token appears? That sounds narrow, but it matters a lot. Users usually forgive a response that streams steadily after it starts. What feels bad is the dead time before anything appears on screen. ...

April 17, 2026 · 7 min · Nitin

How Much GPU VRAM Do You Need to Run Large Language Models?

If you’re planning to run open-weight LLMs locally or in production, one of the first questions is: How much GPU VRAM do I actually need? The answer depends on three major components: Model weights KV cache (context memory) Runtime overhead Let’s break each one down clearly and practically. 1️⃣ Model Weights: The Base Memory Cost The largest fixed memory cost comes from the model weights. Simple Formula Weights (GB) ≈ Parameters (in billions) × (bits per weight / 8) ...

February 16, 2026 · 4 min · Nitin

Understanding LLM Inference Basics: Prefill and Decode, TTFT, and ITL

Large language models (LLMs) like GPT-4, Llama, or Grok generate text by running inference — the phase where a trained model produces outputs from a given input prompt. While training is resource-intensive and done once, inference happens every time a user sends a query. Understanding the mechanics of inference is key to grasping why some models feel “fast” while others lag, and why certain optimizations matter. At a high level, modern LLM inference (for autoregressive transformer-based models) splits into two distinct phases: prefill and decode. These phases behave very differently in terms of computation and directly affect two critical user-facing metrics: Time to First Token (TTFT) and Inter-Token Latency (ITL). ...

December 21, 2025 · 5 min · Nitin

Agentic Context Engineering (ACE): Turning Context Into a Self-Improving Playbook for LLMs

Large language models are getting smarter—but the real superpower may be how we feed them context. Instead of constantly fine-tuning weights, a growing family of techniques improves models by upgrading the inputs they see: richer instructions, reusable strategies, domain heuristics, and concrete evidence. The paper “Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models” proposes ACE, a practical framework that treats context like an evolving playbook—something you grow, refine, and curate over time to make agents and reasoning systems measurably better. ...

October 22, 2025 · 9 min · Nitin