AI Engineer · Published 2026-09-08

Deep dive on LLM Inference at Scale — Harshul Jain, Audible & Tanmay Sah, Independent AI Researcher

Open on YouTube ↗

Summary

Overview

  • Speaker: Harshul Jain & Tanmay Sah
  • Channel: AI Engineer
  • Main topic: LLM Inference at Scale
  • Purpose: To help engineers and developers understand the fundamental economics, memory dynamics, hardware bottlenecks, and serving optimizations of running large language models at scale. A comprehensive two-hour workshop diving deep into LLM inference at scale from first principles, covering memory consumption, time to first token (TTFT), throughput, GPU memory equations, model optimizations like quantization and grouped query attention, serving engines like vLLM and SGLang, and advanced caching and speculative decoding techniques.

Topic Map

Introduction and Problem Statement

  • Explanation: Introduction of speakers Harshul Jain and Tanmay Sah, outlining the workshop agenda and framing the soaring costs and pain points of LLM inference in production.
  • Key claims:
    • Every interaction with AI is an inference call.
    • Inference costs now exceed training costs at scale.
    • Query cost must be less than 0.5 cents to keep search profitable.
  • Examples:
    • GPT-3 training was a one-time cost of $4.6M, while inference costs scale with every user and token.
  • Terminology:
    • LLM inference
    • Token hunger games
    • Inference cost
    • Prefill
    • Decode
  • Why it matters: Hardware is limited and compute is expensive; understanding inference economics is critical for building profitable AI products.

GPU Memory Equation and Fundamentals

  • Explanation: Deriving model memory size and KV cache memory from first principles using model configuration parameters.
  • Key claims:
    • GPU memory = model weights + KV memory + overhead.
    • KV memory is variable and grows with every user and context length.
    • Weights are fixed; KV cache is the variable that kills you.
  • Examples:
    • Mistral-7B with 16-bit precision takes 14.5 GB for weights, and 131 KB per token for KV cache.
  • Terminology:
    • KV cache
    • Model weights
    • SRAM
    • HBM
    • Arithmetic intensity
  • Why it matters: The memory equation governs how many users fit on a GPU, which GPU to buy, and what a token costs.

The Roofline Model: Prefill vs. Decode

  • Explanation: Explaining the two phases of LLM inference: prefill (compute-bound) and decode (memory-bound, bottlenecked by memory bandwidth).
  • Key claims:
    • Prefill is fast and parallel; decode is slow and sequential.
    • Decode is memory-bound, not compute-bound.
    • Every step of decode streams model weights from HBM to the chip.
  • Examples:
    • Mistral-7B decode step streams 14.5 GB from HBM to SRAM on every step.
  • Terminology:
    • Prefill
    • Decode
    • Roofline model
    • TTFT
    • ITL
    • Bandwidth wall
  • Why it matters: Decode performance is limited by memory bandwidth, meaning faster chips don't help without optimization.

Model Optimizations: Quantization and Attention Mechanisms

  • Explanation: Exploring ways to shrink model size and KV cache through quantization (FP16, INT8, INT4/NF4) and attention mechanism improvements (GQA, MLA, FlashAttention).
  • Key claims:
    • Quantization shrinks weights and frees memory for more users.
    • Grouped Query Attention (GQA) and Multi-Latent Attention (MLA) reduce KV cache memory without significant quality loss.
    • FlashAttention eliminates redundant HBM reads/writes.
  • Examples:
    • Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB.
  • Terminology:
    • Quantization
    • Ostrich algorithm
    • Grouped Query Attention (GQA)
    • Multi-Head Attention (MHA)
    • Multi-Latent Attention (MLA)
    • FlashAttention
  • Why it matters: Smaller models and optimized attention mechanisms allow packing more users onto a single GPU and lowering per-token costs.

Serving Engines and Optimizations

  • Explanation: Comparing serving engines like vLLM and SGLang and their core optimizations: PagedAttention, continuous batching, and prefix caching.
  • Key claims:
    • PagedAttention eliminates memory fragmentation in the KV cache.
    • Continuous batching prevents GPU slots from remaining idle.
    • Prefix caching allows sharing prompts across users to save compute.
  • Examples:
    • vLLM achieves significant speedups over HuggingFace baseline through paged attention and continuous batching.
  • Terminology:
    • vLLM
    • SGLang
    • TensorRT-LLM
    • PagedAttention
    • Continuous batching
    • Prefix caching
    • RadixAttention
  • Why it matters: Production serving engines abstract away low-level memory management and scheduling to maximize GPU throughput.

Key Points

Inference costs scale with usage

  • Explanation: Unlike training which is a one-time capital cost, inference is an operating cost that scales with every user, token, and session.
  • Evidence: Analysis showing search queries with LLMs require massive profit margins and low cost per token.
  • Practical implication: Engineering teams must optimize inference serving to maintain profitability.

Decode is memory-bandwidth bound

  • Explanation: During token generation (decode), the GPU spends most of its time reading model weights and KV cache from HBM rather than performing arithmetic.
  • Evidence: Roofline model analysis showing low arithmetic intensity during the decode phase.
  • Practical implication: Hardware memory bandwidth is the primary constraint on token generation speed.

Quantization saves VRAM and increases user capacity

  • Explanation: Reducing numerical precision of model weights from FP16 to INT8 or INT4 dramatically reduces VRAM usage with minimal quality loss.
  • Evidence: Benchmarking results showing Mistral-7B VRAM drops from 14.5 GB to 3.6 GB under INT4 quantization.
  • Practical implication: Quantization enables running larger models on cheaper or fewer GPUs.

PagedAttention solves memory fragmentation

  • Explanation: Treating KV cache memory like virtual memory pages in operating systems eliminates internal and external fragmentation.
  • Evidence: vLLM paged attention architecture increasing KV cache utilization from ~20% to over 95%.
  • Practical implication: Significantly higher concurrent user capacity without increasing hardware budget.

Frameworks, Models & Processes

GPU Memory Equation

  • How it works: Calculates total GPU memory consumption as the sum of model weights, KV memory for active users, and system overhead.
  • Components:
    • Model Weights
    • KV Memory
    • Overhead
  • When to use: Capacity planning and GPU instance selection for LLM deployments.

Roofline Model

  • How it works: Visualizes hardware performance limits based on arithmetic intensity, separating compute-bound prefill from memory-bound decode.
  • Components:
    • Arithmetic Intensity
    • FLOPs/byte
    • Memory Bandwidth
    • Compute Peak
  • When to use: Analyzing inference bottlenecks and understanding hardware utilization.

Trade-off Triangle (Latency, Quality, Throughput)

  • How it works: Demonstrates the fundamental architectural trade-off where you can pick two out of three dimensions.
  • Components:
    • Latency
    • Quality
    • Throughput
  • When to use: Designing serving architecture for specific use cases like premium chat vs. offline batch processing.

Examples & Case Studies

Loading Mistral-7B in a Jupyter notebook via Marimo and measuring GPU memory consumption.

  • Illustrates: How memory grows linearly with context length and number of users.
  • Lesson: KV cache size quickly dominates memory as context and user concurrency increase.

Benchmarking HuggingFace baseline against vLLM with PagedAttention and continuous batching.

  • Illustrates: The massive throughput and latency improvements delivered by optimized serving engines.
  • Lesson: Production serving engines are essential for efficient scaling.

Actionable Takeaways

  • Immediate:
    • Always calculate your KV cache memory requirements before deploying models.
    • Use serving engines like vLLM or SGLang instead of raw PyTorch/HuggingFace loops.
    • Apply quantization (INT8/INT4) to save VRAM and fit larger models or more users.
  • Strategic:
    • Understand the memory-bandwidth bottleneck in the decode phase when optimizing cost.
    • Choose your serving engine based on your workload (e.g., SGLang for agentic prefix caching, vLLM for general production).
    • Leverage prefix caching to eliminate redundant computation for shared system prompts.
  • Questions to investigate:
    • How do emerging multi-node distributed inference architectures scale across clusters?
    • What are the precise trade-offs of advanced attention mechanisms like MLA in production quality?
    • How can speculative decoding be effectively tuned for specific domain workloads?

Claims Worth Verifying

  • Replacing Google search queries with LLMs requires a $36B profit drain. (economic projection)
  • PagedAttention increases KV cache utilization from ~20% to over 95%. (architectural performance claim)

Notable Quotes

"Every interaction with AI is an inference call." "Weights are fixed. The KV cache is the variable that kills you." "Decode is bottlenecked by how fast weights move, not how fast the GPU computes."

Compressed Summary

  • LLM inference costs scale with every token and user, making inference optimization critical.
  • GPU memory consists of fixed model weights and variable KV cache that grows with context and users.
  • Prefill phase is compute-bound, while decode phase is memory-bandwidth bound.
  • Quantization and attention optimizations (GQA, MLA, FlashAttention) reduce memory and increase throughput.
  • Serving engines like vLLM and SGLang provide PagedAttention, continuous batching, and prefix caching out of the box.
  • Keywords: inference, kv cache, roofline, quantization, vllm
  • Core insight: LLM inference is primarily constrained by memory bandwidth during the decode phase, making KV cache management and memory optimization the key levers for scaling throughput and reducing costs.

Core insights

5
Mental Modelmedium noveltystrong evidence

Decode is a memory-streaming process rather than a compute-bound process: every generated token requires reading model weights and KV state from HBM. As a result, decode latency and throughput depend on bytes moved per token, so reducing context size, quantized weights, or output length is a direct latency lever.

Why it matters

Engineers incorrectly optimize decode by selecting bigger FLOP-rated GPUs. Once you know decode is bandwidth-bound, you instead care about memory bandwidth, weight precision, KV cache size, and prompt compression.

Generalization

Any autoregressive sequence-generation workload is best modeled as a memory-traffic problem, not just a compute problem; designing for fewer bytes to stream is the core lever.

During token generation (decode), the GPU spends most of its time reading model weights and KV cache from HBM rather than performing arithmetic.
Open source video
Decode is memory-bound, not compute-bound.
Open source video
Mistral-7B decode step streams 14.5 GB from HBM to SRAM on every step.
Open source video
Mental Modelmedium noveltystrong evidence

The KV cache is the variable memory term that ‘kills you’ in serving: it grows with every user and with context length, and its per-token size is nontrivial (131 KB per token for Mistral-7B). Long contexts and many concurrent agent sessions can consume as much VRAM as the model weights themselves.

Why it matters

Context engineering is not only about model capability; context tokens are a first-class memory and cost budget. For agent systems that keep long histories, context length directly reduces the number of sessions a GPU can serve.

Generalization

Multi-session applications that maintain long per-session state must budget memory as roughly weights + per-token KV * total in-context tokens, or they will run out of capacity unexpectedly.

Weights are fixed; KV cache is the variable that kills you.
Open source video
KV memory is variable and grows with every user and context length.
Open source video
Mistral-7B with 16-bit precision takes 14.5 GB for weights, and 131 KB per token for KV cache.
Open source video
Mechanismmedium noveltystrong evidence

PagedAttention applies OS virtual-memory paging to KV cache allocation and eliminates internal and external fragmentation, lifting practical KV utilization from ~20% to over 95%. The pattern of borrowing kernel-style memory management is a reusable serving-infrastructure idea.

Why it matters

Before paging, a serving system can appear to be at memory capacity while a majority of KV memory is actually fragmented and unusable. This is why a serving engine like vLLM materially raises concurrent user capacity without adding GPUs.

Generalization

When a runtime manages many variable-sized long-lived buffers, page-based allocation with block tables can produce dramatic efficiency gains over contiguous allocation.

Treating KV cache memory like virtual memory pages in operating systems eliminates internal and external fragmentation.
Open source video
vLLM paged attention architecture increasing KV cache utilization from ~20% to over 95%.
Open source video
Practicemedium noveltymoderate evidence

Inference at scale is a per-interaction operating expense, not a one-time capital expense, and it can dominate training costs. In a cost-constrained product like search, query cost must be below 0.5 cents, making serving optimization an economic necessity rather than an optional performance activity.

Why it matters

Agentic products multiply inference calls per task, so per-task token economics determine whether a product can be profitable. Choices about batching, KV reuse, prefix caching, and quantization should be made with unit economics in mind.

Generalization

For token-hungry applications, the highest-level architecture constraint is cumulative tokens consumed per completed task; any workload structurer must account for it.

Inference costs now exceed training costs at scale.
Open source video
Query cost must be less than 0.5 cents to keep search profitable.
Open source video
GPT-3 training was a one-time cost of $4.6M, while inference costs scale with every user and token.
Open source video
Architecturemedium noveltymoderate evidence

Attention architecture determines KV-cache cost independently of parameter count. GQA/MLA reduce KV memory without major quality loss, and FlashAttention removes redundant HBM reads/writes, so model choice for an application should include the serving footprint of its attention design, not just quality and parameter count.

Why it matters

For agentic and long-context workloads, choosing a model with GQA/MLA and FlashAttention support can mean the difference between fitting many sessions on a GPU and hitting severe context/memory limits.

Generalization

A model's architecture—especially attention—is a deployment parameter, not only a research artifact; teams should compare candidate models using KV bytes per token and attention I/O behavior.

Grouped Query Attention (GQA) and Multi-Latent Attention (MLA) reduce KV cache memory without significant quality loss.
Open source video
FlashAttention eliminates redundant HBM reads/writes.
Open source video

Deep dives

4

Decode is a bandwidth-bound operation: how to quantify and optimize bytes-per-token at inference time

Research question

Under what batch sizes, context lengths, and GPU architectures does decode become fully memory-bandwidth-bound, and which optimization levers (quantization, KV-cache reduction, prompt compression) most reduce per-step latency?

Why

Engineers commonly choose GPUs by FLOPs, but when decode is bandwidth-bound, buying bigger compute chips does not improve token latency. A deep dive would turn the roofline model into actionable capacity and purchasing guidance.

Decode is memory-bound, not compute-bound.
Open source video
During token generation (decode), the GPU spends most of its time reading model weights and KV cache from HBM rather than performing arithmetic.
Open source video
Mistral-7B decode step streams 14.5 GB from HBM to SRAM on every step.
Open source video
Source video

The KV cache variable: memory equation and attention-architecture implications for serving concurrency

Research question

How do per-token KV-cache size, context length, concurrent sessions, and attention architecture (MHA/GQA/MLA) interact in the GPU memory equation, and how should teams account for those interactions when selecting a model and serving engine?

Why

Weights are fixed but KV cache grows with every user and token, and large single-model deployments can see KV cache consume as much VRAM as weights. Understanding this variable is necessary for capacity planning and cost control.

Weights are fixed; KV cache is the variable that kills you.
Open source video
KV memory is variable and grows with every user and context length.
Open source video
Mistral-7B with 16-bit precision takes 14.5 GB for weights, and 131 KB per token for KV cache.
Open source video
Source video

Do quantized models preserve reliability for multi-step agentic tool use?

Research question

How does INT4/NF4 quantization affect end-to-end task success for multi-step agentic workflows compared to FP16 metrics such as perplexity?

Why

Quantization reduces memory and bandwidth enough to serve more sessions, but a single tool-call or parsing error can fail an entire agent task. Without task-level evidence, teams cannot safely accept the quality/quantization tradeoff.

Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB.
Open source video
Source video

Prefix-cache behavior in dynamically constructed agent prompts

Research question

How does prefix-cache hit rate degrade when agent prompts are dynamically assembled with timestamps, tool-result order, chat-template delimiters, and other variable content before the stable system prompt?

Why

Prefix caching is a major serving optimization, but only works if the prompt's beginning is byte-identical. Agent loops often violate that property, silently erasing the cost benefit of the cache.

Prefix caching allows sharing prompts across users and sessions, saving prefill compute in repeated agent/chat workloads.
Open source video
Source video

Article ideas

4

Stop Buying Bigger GPUs: Decode Is a Memory-Bandwidth Problem

Because autoregressive token generation is bottlenecked by HBM bandwidth rather than FLOPS, adding compute capacity to a decode-dominated workload will not meaningfully reduce latency; the effective levers are reducing bytes per token via quantization, KV-cache reduction, prompt compression, and context trimming.

Angle

A practical argument for changing GPU purchasing and workload optimization strategy based on the roofline model.

Source video

The Multiplicative Token Math of Agentic Products: Why Unit Cost Is a Design Constraint

Inference is now a recurring operating expense that can dwarf one-time training costs, and agentic products multiply inference calls per completed task; therefore every product/task architecture should be designed to minimize cumulative tokens per task rather than optimizing only for single-request latency or model curiosity.

Angle

A cost-economics critique for product and engineering leaders building token-hungry applications.

Source video

The Hidden Tax of Timestamps in Your Agent Prompt

Dynamic agent prompts that insert timestamps, user IDs, or chat-template delimiters before the stable system prompt invalidate prefix caching, and prompt builders should treat byte-stable prefixes as a deploy-time performance optimization.

Angle

Using cache-hit reasoning to expose a commonly overlooked prompt-engineering performance bug.

Source video

PagedAttention Is Virtual Memory for GPU: What LLM Serving Can Learn from OS Design

The dramatic efficiency gains of vLLM's PagedAttention come from applying OS virtual-memory ideas to KV cache allocation, and this pattern—using paging, block tables, and reclaimable buffers—will be central to future inference runtime improvements.

Angle

A systems-architecture analogy that reveals why serving engines should be designed like operating systems for GPU memory.

Source video

Project ideas

3

prefix-cache-diagnostic

movement-lab

In a vLLM-served agent test harness, keeping the system prompt and tool schema byte-identical at the beginning of every turn yields >60% prefix-cache hit rate and at least 25% lower p50 prefill time than the same workload when a timestamp or random user ID is injected before the stable prefix.

Proof of concept

Replay a corpus of multi-turn agent traces through vLLM using two prompt variants (cache-friendly stable prefix vs variable prefix), record cache hit rates and prefill TTFT via vLLM metrics.

Measurement

Prefix-cache hit ratio and prefill time (p50/p95) for each prompt variant.

Source video

int4-agent-reliability-check

beyond-evals

Running a representative 7B-8B model in INT4/NF4 on a vLLM server decreases success on a multi-step tool-use benchmark by at least 10 percentage points compared to FP16, even when perplexity deltas are small.

Proof of concept

Create an executable tool-calling task set; run the same agent harness with FP16 and INT4/NF4 weights under identical prompts and sampling temperature; compare success, parse-error, and retry-frequency rates.

Measurement

End-to-end task success rate and error category distribution for FP16 vs INT4.

Source video

decode-bandwidth-probe

movement-lab

Holding output length constant on an A100-class GPU, increasing the input context length by 2x increases measured per-token decode latency by at least 10% because every decode step scans the KV cache from HBM.

Proof of concept

Use vLLM to issue constant-output-length generation requests with varying context lengths; profile with GPU hardware counters and log token-level latencies; compare observed bytes-per-step to the roofline prediction.

Measurement

Inter-token latency (ITL) and achieved HBM bandwidth as a function of context length.

Source video

Architectural implications

4

vLLM and SGLang achieve their large speedups by moving low-level memory and scheduling concerns out of the application: paged KV allocation, continuous batching, and prefix caching are the core mechanisms.

Before

An agent framework or product calls model.generate() directly through HuggingFace-ish runtimes and manages per-session context and concurrency manually.

After

Use a serving engine like vLLM or SGLang as the execution boundary; the runtime owns KV allocation, batching, and scheduling, while the application owns prompt construction, tool policies, and context strategy.

Consequence

The team avoids reimplementing page tables and batching, but it must design prompts and workloads to work with the engine's cache and batching assumptions.

Source video

Prefix caching shares prompts across users and sessions, while KV memory is allocated in paged blocks.

Before

Applications put system instructions, tool schemas, and dynamic/interleaved content in varied orders, so each request reparses and re-prefills the same static prefix.

After

Keep a byte-stable prefix containing system prompt and tool schema at the start, and append the variable user/history content after it so the prefix cache is reusable.

Consequence

Common agent loops and repeated tool-calling turns become dramatically cheaper; however, any dynamic metadata inserted before the stable prefix will break the cache.

Source video

KV cache memory grows with context length and participates in the memory-bandwidth cost of every decode step.

Before

Context window is treated as free capability: the longer the history, the better, up to the model's context limit.

After

Treat context as a resource budget: summarize old turns, evict less relevant content, and avoid storing every tool dump in the active prompt.

Consequence

Controls both memory capacity and decode speed, but risks losing information needed for downstream agent steps; context reduction must be evaluated end-to-end.

Source video

Prefill is compute-bound and parallel, while decode is memory-bound and sequential; they are measured by different metrics (TTFT vs ITL).

Before

A single average tokens-per-second number or a single total-latency number is used to compare serving engines and hardware.

After

Measure TTFT and inter-token latency separately, and choose where to optimize based on whether the user experience is dominated by first-token time or output streaming.

Consequence

Engineering effort can be directed to the true bottleneck: model/prompt caching for prefill-heavy workloads or bandwidth/quantization for decode-heavy workloads.

Source video

Tradeoffs and failure modes

4

Quantization vs. quality

Benefit

Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB and frees GPU capacity for more users.

Cost or risk

Quantized weights can reduce model quality; the summary says quality loss may be insignificant in some settings, but agent tasks that depend on exact instruction following or tool use need their own validation.

Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB.
Open source video
Source video

GQA/MLA instead of full MHA

Benefit

GQA and MLA reduce KV cache size, enabling longer contexts and more concurrent sessions with no large measured quality loss.

Cost or risk

The attention mechanism is baked into the model, so it cannot be toggled later. The wrong architecture choice is not fixable at serving time.

Grouped Query Attention (GQA) and Multi-Latent Attention (MLA) reduce KV cache memory without significant quality loss.
Open source video
Source video

Prefix caching and dynamic prompt assembly

Benefit

Prefix caching allows sharing prompts across users and sessions, saving prefill compute in repeated agent/chat workloads.

Cost or risk

Prefix caching works only when the beginning of the prompt is byte-identical. If the prompt starts with timestamps, random user IDs, or chat-template delimiters, the cache is useless.

Prefix caching allows sharing prompts across users to save compute.
Open source video
Source video

Throughput vs. latency under continuous batching

Benefit

Continuous batching prevents GPU slots from remaining idle, raising aggregate throughput on a fixed set of GPUs.

Cost or risk

The latency, quality, and throughput triangle means you can pick two of the three; maximizing server-wide throughput can sacrifice per-request latency for a given amount of compute.

Demonstrates the fundamental architectural trade-off where you can pick two out of three dimensions.
Open source video
Source video

Open questions

4

How does prefix-cache hit rate degrade when agent prompts are dynamically constructed with varying chat templates, tool-result order, timestamps, or interleaved roles?

Why unresolved

The summary establishes prefix caching as an important serving optimization but does not analyze how dynamic agent conversation state affects reuse.

Research direction

Measure cache hit rates on real assistant traces and design prompt builders that preserve a long shared prefix while appending variable content.

Source video

Do INT4/NF4 quantized models retain enough reliability for multi-step agentic tasks, where a single incorrect tool call or parsing error can fail the entire task?

Why unresolved

Quality is usually measured on generic benchmarks; the summary does not provide evidence about compound-error sensitivity under quantization.

Research direction

Run agentic end-to-end suites under FP16, INT8, and INT4 on the same harness and measure task success rate, not just perplexity.

Source video

What scheduling policy best splits compute resources between prefill and decode when a continuous-batching server handles varied workloads?

Why unresolved

The summary says prefill is compute-bound and decode is memory-bound but does not describe algorithms for jointly optimizing TTFT and inter-token latency.

Research direction

Prototype dynamic schedulers that allocate compute/memory bandwidth depending on current mix of prefill-heavy and decode-heavy requests, then benchmark tail latency.

Source video

Does reading the entire KV cache on every decode step impose a hidden speed penalty that grows with context length, and how severe is it compared to attention compute?

Why unresolved

The summary notes that decode reads both weights and KV from HBM, but does not quantify how this scales memory traffic with total context length on current GPUs.

Research direction

Create a differential benchmark that isolates decode bandwidth by incrementing context length while holding model output length constant.

Source video

Key claims

7
factualVerification needed

Decode is memory-bound, not compute-bound.

Evidence

Decode is memory-bound, not compute-bound.

Question

Under what batch sizes and hardware does compute utilization saturate before memory bandwidth during decode?

Source video
factualVerification needed

During decode, the GPU spends most time reading model weights and KV cache from HBM.

Evidence

During token generation (decode), the GPU spends most of its time reading model weights and KV cache from HBM rather than performing arithmetic.

Question

Can this be confirmed by profiling memory-bound stall cycles on modern GPUs for realistic batch sizes?

Source video
opinionVerification needed

PagedAttention increased KV cache utilization from ~20% to over 95% in vLLM.

Evidence

vLLM paged attention architecture increasing KV cache utilization from ~20% to over 95%.

Question

What workload, context-length distribution, and GPU memory configuration produced those utilization numbers?

Source video
factualVerification needed

Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB.

Evidence

Quantizing Mistral-7B from FP16 to INT4 reduces weight memory from 14.5 GB to 3.6 GB.

Question

Does this assume naive per-tensor 4-bit storage, or packed group-wise quantization with less overhead?

Source video
comparativeVerification needed

GQA and MLA reduce KV cache memory without significant quality loss.

Evidence

Grouped Query Attention (GQA) and Multi-Latent Attention (MLA) reduce KV cache memory without significant quality loss.

Question

Which benchmark tasks show significant loss, if any, and how much precision is lost on long-context retrieval?

Source video
comparativeVerification needed

vLLM achieves significant speedups over the HuggingFace baseline through paged attention and continuous batching.

Evidence

vLLM achieves significant speedups over HuggingFace baseline through paged attention and continuous batching.

Question

Under which model, hardware, concurrency level, and token distribution was the speedup measured?

Source video
comparativeVerification needed

GPT-3 training cost $4.6M as a one-time cost, while inference costs scale with every user and token.

Evidence

GPT-3 training was a one-time cost of $4.6M, while inference costs scale with every user and token.

Question

Does the $4.6M figure include all research and experimentation cost, and what assumptions were used to compare inference costs?

Source video

Connections

5