KV Cache Calculator
Watch context length turn into GPU memory: layers, KV heads, precision, tokens, and batch, live.
Why do long context and batch size compete for the same GPU?
Fanout Labs · directory
Explore real calculators, parsers, simulations, live-data tools, model evaluations, interviews, and games across AI and systems.
111 matches · 107 local · 4 model · 0 coming soon
Watch context length turn into GPU memory: layers, KV heads, precision, tokens, and batch, live.
Why do long context and batch size compete for the same GPU?
Multiply parameters by precision bytes, add runtime overhead, and see which cards say yes.
Does this checkpoint actually fit on that GPU?
Compose a request out of classic latency numbers and watch the budget disappear op by op.
Which operation dominates this request's budget?
Slide the bit-width and watch weights shrink, decode speed rise, and quality risk creep in.
What does dropping from 16 to 4 bits actually buy?
Turn QPS, fan-out, and per-request cost into a defensible capacity number.
How many servers does this traffic estimate really need?
Turn measured throughput numbers into a fleet layout for a serving stack.
Prefill, decode, or memory — what binds this deployment first?
Race draft-and-verify decoding against plain decoding across acceptance rates.
How often must the draft model agree for speculation to win?
Schedule sequences into decode slots and watch padding waste fall away.
Why does continuous batching lift GPU utilization?
Plot the two inference phases against a roofline and read off the regime.
Are you compute-bound or bandwidth-bound at this context length?
Model shared system prompts as cached tokens and total the savings.
How much do reused prefixes shave off the bill?
Map a model's layers and activations onto parallel strategies and compare memory.
Tensor, pipeline, or data parallel for this shape of model?
Route tokens across experts under a capacity constraint and keep the load even.
Can you balance the experts before one melts down?
Push producers faster than consumers and watch queues, waits, and drops emerge.
At what queue depth does the consumer tip over?
Run an exact token-bucket trace to see burst admission, refill, and the first rejection.
Which requests does this token-bucket policy admit or reject?
Measure retry amplification, then spread it back out with backoff and jitter.
What do three retries really do to the dependency's load?
Add and remove ring nodes, with and without virtual nodes, and count migrating keys.
How many keys actually move when a node leaves?
Size the bit array and hash count for your error budget — and watch the trade curve.
How many bits buy the false-positive rate you need?
Fan a request out to N leaves and watch the tail stretch; then try hedged requests.
Why does one slow leaf decide the request's p99?
Propagate traffic math through a service graph and expose the capacity cliff.
Which dependency reaches instability first as traffic grows?
Assign per-hop timeouts so the slowest dependency fails fast instead of dragging everything.
Where should each timeout sit along this call chain?
Drive failures through a breaker and watch closed/open/half-open transitions.
When does the breaker flip — and when should it half-open?
Expire a hot key under load and compare naive, lock, and jittered-TTL strategies.
How bad is expiry thundering-herd at this TTL?
Multiply per-hop retries down a call chain and then break the cascade correctly.
How does a 2x retry policy become 16x at four hops?
Watch demand jump, cooldowns delay capacity, and the backlog queue drain late.
How long is your fleet undersized after the spike?
Race balancing algorithms against a mixed workload and read the queue depth.
Round-robin or least-connections under uneven request costs?
Inspect cache keys across variants and find the poisoning parameter.
Which header quietly split your cache?
Distribute keys by hash and by range and watch the hot shard glow.
How skewed is celebrity data across 16 shards?
Push a skewed stream through LRU/LFU/ARC and read hit rate against cache size.
What hit rate does this LRU hold under Zipf traffic?
Waterfall the same page over 1.1/2/3 and count the round trips.
What does HTTP/2 multiplexing actually save on 30 assets?
Follow a cold lookup end to end, then make TTL caching erase the hops.
Root, TLD, authoritative — how many hops is one lookup?
Re-order concurrent operations and judge which interleavings hold.
Is this history linearizable?
Play the incident — drain, promote, and watch RTO tick down.
Can you fail over before the error budget burns?
Decompose compute, storage, and egress into a per-request unit cost.
What does one request cost at this scale?
Set CPU/memory requests from percentile usage and stop funding idle capacity.
Are these requests oversized by 4x again?
Little's Law meets max_connections: size pools that neither queue nor crush the DB.
How big should the pool be — and what breaks when it's bigger?
Project ingest and retention policies into a growth curve with prices attached.
When does this table hit 10 TB — and can you afford it?
Split address space visually and read the host math off each block.
Carve a /16 into prod, staging, and data — without waste.
Walk through simple vs preflighted requests and the headers that decide.
Why did this request preflight but that one didn't?
Step through terms, votes, and log-matching rules by hand.
Why can't a stale candidate win the election?
Play both sides of the tradeoff and feel why 'CA' isn't on the menu.
Partition hits: serve possibly-stale reads or refuse them?
Play with counters, sets, and registers that always converge.
Can you merge without a leader and lose no writes?
Partition a topic, size a consumer group, and watch ordering constraints bind.
Why does consumer #9 sit idle while the lag grows?
Line up steps and compensations and read the rollback timeline.
Your payment step failed at T+3 — what unwinds?
Build the waits-for graph and find the cycle before the database does.
Can you close the cycle that deadlocks the system?
Feed cardinality through planner-ish cost math and predict the plan.
Seq scan or index — what does the planner see?
Diff two plans side by side and find the row-estimate lie.
What changed between yesterday's plan and today's regression?
Insert, split, and look up in a live B+ tree drawing.
How many pages does a point lookup touch?
Flush memtables, merge levels, and watch write amplification stack up.
Why do reads spike during compaction storms?
Interleave two transactions and watch dirty and non-repeatable reads appear.
Which anomalies exist at read committed?
Edit a contract and run compatibility checks against recorded consumers.
Does this response change break anyone's client?
Replay model/tool spans on a timeline with latency, errors, and concurrency.
Where did time and failure accumulate in this agent trace?
Serve canned success/timeout/error variants and watch the loop cope.
What does your agent do when the tool 500s?
Debug runaway agent loops shaped by bad fallbacks and missing stop words.
The loop keeps calling the same tool — can you break it?
Count chosen vs intended tools across prompts and plot the confusion.
Which two tools does the model keep swapping?
Capture webhook payloads, edit, and replay them against your handler.
What did that delivery actually contain?
Plant needles at depths in a synthetic context and map recall by position.
Does the model find the fact at 15% or 85% of context?
Blend lexical and embedding scores and watch the top-20 reshuffle.
Which candidate deserves rank 1 — semantic or BM25?
Traverse an entity graph to the evidence nodes a GraphRAG query needs.
Which subgraph should this question even touch?
Score a PDF's layout for extraction risk before it poisons the index.
Is this document chunkable — or a table soup?
Chunk a sample corpus three ways and grade retrieval by boundary quality.
Fixed, recursive, or semantic — where do boundaries hurt least?
Isolate the failing stage with staged captures from a real-style pipeline.
Was it retrieval, reranking, or generation that failed?
Fuse two ranked lists with a weighted mixer and see where each shines.
What alpha blends BM25 and vectors best for this query?
Slide the similarity threshold across a scored corpus and trace the F1 curve.
Recall at 90% — what does the precision cost?
Hunt near-duplicates across splits with n-gram overlap heuristics.
Is your test set inside the training set?
Walk a mock server's capabilities, schemas, and permission surface.
Which tools does this MCP server really expose?
Paint per-head patterns from a small attention trace and name the behaviors.
Which head is doing induction — and which is noise?
Fly through a projected embedding space and stress-test your distance intuition.
What does 'nearest' mean in 1536 dimensions?
Harden a system prompt against drift, injection, and verbosity creep.
Can you keep the format under adversarial inputs?
Lint prompt text for ambiguity, conflicts, stale rules, and token waste.
Which words in this prompt are doing nothing?
Tune schema strictness and instructions until the output validates clean.
Why does the model keep adding prose around your JSON?
Repair classic model JSON injuries: trailing commas, comments, cut tails.
Can you salvage the missing-brace response?
Stack role, style, format, and safety rules and surface their collisions.
Which two of your rules contradict each other?
Diff two prompts across a small suite and score structured wins/losses.
Does the new prompt beat the old one on 30 cases?
Grade wrapped inputs and watch which delimiters leak instructions.
Spot the payload hiding in the 'user data'.
Run blind pairwise judging and watch judge bias appear in real time.
A or B — and would you bet your eval on it?
Assemble minimal canary suites with stratified coverage.
Which 20 questions catch this regression earliest?
Compare before/after runs across categories and gate the migration.
What broke when you moved providers?
Grid outputs across prompt versions and flag behavioral drift.
Line by line, what did prompt v7 change?
Pick demonstrations by coverage and watch format adherence jump.
Which three examples teach this format best?
Line up responses side by side with rubric scoring.
Same prompt, three models — grade the spread.
Calibrate a judge's rubric against a labeled set and watch agreement move.
How far is your judge from human labels?
Cluster failures into a taxonomy you can actually drive fixes from.
Can you name the five ways this system fails?
Exercise intent × content grids and find the uncovered cells.
Does the policy surface hold across the matrix?
Split an eval by attribute slices and compare deltas like an auditor.
Does accuracy hold across the slices you care about?
Scan a draft for unsupported claims and missing baselines.
Which of these claims lacks a citation?
Score a paper's reproducibility surface: code, seeds, splits, configs.
Is this result reproducible from what's published?
Structure variables, controls, and readouts before GPU-hours burn.
One variable at a time — does your design have it?
Grid papers against method, data, scale, and result to expose overlap.
Six papers, four axes — where's the real delta?
Annotate dense paper artifacts into plain-language readings.
What is equation (4) actually saying?
A mock loop of depth-first questioning on a paper you claim to know.
Can you defend the method section cold?
Timed prompting with probes that push past your first architecture.
Design a feature-store platform in 40 minutes — go.
Budget math made visible: windows, multipliers, and paging triggers.
How many bad minutes remain before the page?
Block a realistic study session with spaced-repetition smarts.
Can you fit papers, labs, and notes into 90 focused minutes?
Put binomial confidence intervals on leaderboard deltas before believing them.
Is 84.2% on 100 items actually better than 82%?
Walk weights, context, cache, RAG, and profiles with live mini-demos.
Five kinds of 'memory' — which one is doing this?
Map a repository's modules into a first-guess system diagram.
What architecture hides inside this dependency graph?
Check a diagram for missing arrows, silent dependencies, and vague boxes.
What is this diagram not telling the reviewer?
Flow claims to citations and measure support by stream width.
How much of the argument does the evidence carry?
Matrix claims against citations and expose the unsupported assertions.
Every claim to a source — where are the orphans?
Orbit a topic's key papers by year, venue, and citation pull.
Where does this paper sit in the citation cosmos?
Score the feed by relevance and novelty and build the reading queue.
Which of today's 200 uploads is worth 15 minutes?
Design the ablation grid that isolates each contribution cleanly.
Which components earn their keep — prove it.
Sequence environment, data, training, and eval against the clock.
Seven days to reproduce the headline number — plan it.
Run a live incident: triage, mitigate, communicate, and review.
Traffic up, p99 red, slack pinging — command it.
Supervise fleets: spot loops, cap runaways, and requeue work.
Six agents live — which one is burning the budget?
Pattern-scan inputs for keys, PII, and customer data before they leave.
Did that prompt just leak a secret?
Map tool scopes to risk tiers and draw the least-privilege line.
What could this tool do with your credentials?
Step descent down a loss surface you can see: lr, steps, and the where-it-lands trace.
Why does a big learning rate bounce out of the ravine?
Split text into tokens and watch word pieces, whitespace, and unicode add up.
Why does this 'short' prompt cost 4x the tokens?
Shape a mock next-token distribution and sample from it live.
Greedy, top-k, top-p, temperature — what changes first?
Plot models on price/quality axes and route each request class to the frontier.
Which model sits on the cost–quality frontier for this traffic?