04Decode attention intensity is fixed at the query-to-KV head ratio. Derive that, then tell me what MLA does to it.▼hardNewOpenAIAnthropicGoogle DeepMindunlockedBatching rescues the weight GEMMs at decode but never the attention kernel, and one head-count ratio explains why. The answer derives it, then shows how MLA moves attention to within a hair of the H100 ridge.Open full answer →
07DeepSeek V3 has 671B parameters but only 37B active. Why does a decode step at batch 64 read far more than 37B?▼hardNewOpenAIGoogle DeepMindxAI○ sign inActive parameters describe one token. A decode step serves a batch, and the batch decides how many experts get pulled through HBM. The answer computes that number and shows where the MoE cost advantage actually comes from.Open full answer →
09Your decode step runs at 60% of the bandwidth floor. Where does the rest of the time go? Build me the budget.▼hardNewOpenAIAnthropicNVIDIA○ sign inA 60% MBU number is a symptom, not a diagnosis. The answer rebuilds the floor from bytes, then splits the missing 40% into buckets a profiler can confirm and a team can own.Open full answer →
11Derive the curve of decode tokens per second against batch size, and show me where the knee is.▼hardNewOpenAIFireworks AITogether AI◆ premiumStep time is a straight line in batch size, so throughput is a hyperbola with a ceiling. The answer finds the knee in closed form and shows why the ceiling usually comes from the KV cache, not the tensor cores.Open full answer →
13An 8B model at batch 1 on an H100 should take 4.8 ms per step but takes 12 ms. Name the three likeliest causes, with numbers.▼hardNewOpenAIAnthropicNVIDIA◆ premiumA 2.5x gap at batch 1 almost never comes from the GPU being slow. The answer sorts the suspects by what a single profiler trace shows and puts a millisecond figure on each.Open full answer →
04FP8 KV cache: what scales does it need, where is the error largest, and how would you validate it on long-context tasks?▼hardNewNVIDIAAnthropicGoogle DeepMindunlockedFP8 halves the cache and the attention bytes, and on short prompts it looks free. The answer explains why the scale matters less than people think for rounding and more than they think for clipping, and why the failures hide at 128K.Open full answer →
06A model mixes sliding-window and global attention layers. Compute its KV footprint at 128K and tell me what the window actually saves.▼hardNewGoogle DeepMindOpenAIMistral AI○ sign inHalf the layers capped at a 128-token window sounds like a big saving at 128K. The arithmetic says the saving is set by the layer ratio, not the window, and the allocator decides whether you get it at all.Open full answer →
07Design KV offload to CPU memory. When does fetching blocks back over PCIe beat recomputing them?▼hardNewAnthropicPerplexityBaseten○ sign inRecomputing a prefix costs FLOPs proportional to the model, fetching it costs bytes proportional to the cache. One ratio decides it, and the answer shows by how much fetching wins and the three situations where it still loses.Open full answer →
11The KV pool is full and requests keep arriving. Compare admission control, preemption and spilling, and what each does to p99.▼hardNewOpenAIAnthropicFireworks AI◆ premiumAll three policies keep the server alive. They differ in who waits, who redoes work, and which percentile absorbs the damage, and the numbers for a 6K-token victim make the choice for you.Open full answer →
12In prefill-decode disaggregation, how does KV transfer size scale, and what link bandwidth keeps the transfer off the critical path?▼hardNewNVIDIAFireworks AITogether AI◆ premiumThe transfer looks like gigabytes per request until you divide by prefill time. Then the prompt length cancels, and the real question becomes which models and which GPUs break the link.Open full answer →
16A hybrid model mixes attention and recurrent layers. Budget its state and design safe prefix reuse and rollback.▼hardNewNVIDIATogether AIFireworks AI◆ premiumA fixed recurrent state still costs memory for every live request and saved checkpoint. Work through a state inventory, then find a restart boundary that every layer can actually restore.Open full answer →
06Interactive and batch traffic share one engine. How do you stop batch jobs from wrecking interactive TTFT and TPOT?▼hardNewOpenAIAnthropicGoogle DeepMind○ sign inA priority flag fixes the queue and leaves the real damage in place: batch sequences that are already running slow every interactive token. The answer puts a number on the KV the batch class may hold.Open full answer →
07Why does p99 TTFT shoot up once utilization passes about 70%? Model it as a queue, then say where that model is wrong for a batching engine.▼hardNewOpenAIAnthropicPerplexity○ sign inThe 70% rule of thumb falls out of one formula once you plug in a prefill time and a p99 target. The answer derives it, shows how prompt-length variance moves it to 50%, and lists the four ways an LLM engine breaks the textbook queue.Open full answer →
08Two tenants share a replica. Should fairness count requests or tokens, and how does the scheduler enforce it step by step?▼hardNewTogether AIFireworks AIBaseten○ sign inRequest-fair scheduling hands 96% of the GPU to the tenant with long documents. The answer derives the token weights from the roofline, shows the counter that enforces them per step, and the one rule that stops a tenant from banking credit.Open full answer →
12vLLM turns on async scheduling by default. What does it overlap, what does it need from the model runner, and when must it be off?▼hardNewRed HatNVIDIAAnyscale◆ premiumScheduling step n+1 before step n's tokens exist sounds impossible. The answer shows the placeholder trick that makes it work, what it costs at an end-of-sequence token, and the configurations where vLLM switches it off for you.Open full answer →
15Traffic triples for a minute on your LLM API. What do you reject, at what point, and what do you tell the client?▼hardNewOpenAIAnthropicPerplexity◆ premiumAccepting everything during a one-minute spike leaves the API serving dead requests for two minutes after it ends. The answer does the queue arithmetic, picks the rejection rule, and writes the response that keeps clients from making it worse.Open full answer →
05Why does FlashAttention-2's backward pass recompute attention, and what exactly does the forward pass save for it?▼hardNewOpenAIAnthropicGoogle DeepMindunlockedStoring the attention matrix for backward costs gigabytes per layer; recomputing it costs extra FLOPs. The answer derives the gradient, shows the one scalar per row that makes recomputation exact, and the identity that removes the last N-squared term.Open full answer →
06Split-KV decoding: how many splits would you use for batch 1 at 128K context on 132 SMs, and how are the partial results merged?▼hardNewNVIDIAFireworks AITogether AI○ sign inBatch-1 decode at long context gives the GPU eight thread blocks and 132 SMs. The answer counts the waves, picks the split count from a wave-efficiency rule rather than a guess, and derives the merge that makes the result exact.Open full answer →
12Should RoPE run inside the attention kernel or as a separate pass? Count the bytes saved, then find the precision trap at long positions.▼hardNewMetaNVIDIAFireworks AI◆ premiumFusing RoPE saves a read and a write of Q and K, which is real but small in prefill. The precision bug is not small: one tensor in the wrong dtype scrambles positional information by a few hundred tokens. The answer sizes both.Open full answer →
14Your attention kernel is exact in FP32 and wrong in BF16 at long context, but fine at short context. Find the accumulation bug.▼hardNewNVIDIAOpenAIAnthropic◆ premiumAn error that grows with context length is a running sum losing increments, and BF16 stops adding 1 to a total at 256. The answer turns the symptom into a bisection, finds the state held in the wrong dtype, and shows the error curve that proves it.Open full answer →
16A decode-attention kernel wins at 128K context. What evidence would justify enabling it for other shapes?▼hardNewNVIDIAAMDOpenAI◆ premiumReview a shape-by-shape timing fixture, catch a ragged-cache correctness failure, and calculate whether selective dispatch pays for itself. Includes a small reference you can run without a GPU.Open full answer →
01Your decode GEMV kernel reaches only about half of HBM bandwidth on an H100. Find the reasons and get it above 80%.▼hard★ EssentialNewNVIDIAOpenAIAnthropicunlockedA matrix-vector product has one job: keep enough bytes in flight. The answer counts how many that is per SM, then finds the three places a decode GEMV quietly drops below it.Open full answer →
05Why do tensor core GEMMs use tiles like 128 by 128 by 64, and what limits the tile size on Hopper?▼hardNewNVIDIAAMDOpenAIunlockedEvery dimension of a GEMM tile is pinned by a different piece of hardware. The answer derives the reuse that sets the M and N sides, the swizzle row that sets K, and the register and shared-memory budgets that stop the tile growing.Open full answer →
08Fused MoE kernels sort tokens by expert before the GEMM. Why, and what does a grouped GEMM do that a loop over experts cannot?▼hardNewNVIDIATogether AIFireworks AI○ sign inA Python loop over 256 experts is correct and slow for three separate reasons, only one of which is launch count. The answer builds the expert-sorted layout the fused kernel runs on and counts what it costs in padding.Open full answer →
09In a W4A16 GEMM, where does the INT4 unpacking happen, and how does the kernel keep that work hidden under the memory loads?▼hardNewNVIDIARed HatTogether AI○ sign inA 4-bit weight is only cheaper if turning it back into FP16 costs less than the bytes it saved. The answer counts the instruction budget per weight at full HBM bandwidth and shows the bit trick that makes the conversion fit.Open full answer →
13Could you keep the KV cache of hot sequences resident in the H100's 50 MB L2 during decode, and would it be worth it?▼hardNewNVIDIAOpenAIAnthropic◆ premiumCUDA lets you reserve part of L2 for data you choose, and the KV cache is re-read every step. The answer measures what fits against what a decode step streams, finds the one case where pinning pays, and the kernel change that pays more.Open full answer →
01AWQ INT4 beat FP8 at batch 1, lost to it at batch 256, and cost 4 points on a coding eval. Explain both and pick a format.▼hard★ EssentialNewNVIDIAOpenAIMetaunlockedWeight-only INT4 shrinks the bytes but keeps the arithmetic in BF16. The answer finds the batch size where that bargain flips, which does not depend on the model, then explains why a code benchmark notices before perplexity does.Open full answer →
05Why do activation outliers break INT8 W8A8 on LLMs, and how does SmoothQuant fix it by moving scale into the weights?▼hardNewNVIDIAMetaMicrosoft (Microsoft AI)unlockedA handful of channels with huge activations wreck the INT8 grid for every other channel in the token. The answer shows why the obvious fix cannot run on a tensor core, what SmoothQuant does instead, and why FP8 makes most of the problem disappear.Open full answer →
08Which layers should stay in higher precision after quantization, and how do you find them with a sensitivity sweep?▼hardNewNVIDIAMetaQualcomm○ sign inA few matrices cause most of the damage when a model is quantized, and keeping them wide costs little memory. The answer builds the sweep that finds them, prices it in GPU hours, and explains why the sum of single-layer damages is not the damage of the mix.Open full answer →
11The same prompt gives different logits at batch 1 and batch 64 on an FP8 server. Why, and how can the kernels prevent it?▼hardNewOpenAIAnthropicGoogle DeepMind◆ premiumReduction order explains the last-bit drift, but a quantized server has a second, much larger leak: a scale computed over the whole batch lets one user's activations change another user's logits. The answer separates the two and fixes both.Open full answer →
13Your serving team does not own pretraining. When is quantization-aware training worth it over post-training quantization?▼hardNewGoogle DeepMindMetaNVIDIA◆ premiumQAT never makes a model faster than PTQ at the same format; both produce identical tensors for the kernel. The answer reframes what QAT buys, prices a QAT run in GPU hours against the fleet it could shrink, and names the cases where a serving team should not touch it.Open full answer →
01Derive the expected speedup of speculative decoding, prove it does not change the output distribution, and tell me when it stops paying.▼hard★ EssentialNewOpenAIAnthropicGoogle DeepMindunlockedThree parts, and most candidates finish one. The algebra fits on a line, the proof fits in three, and the part interviewers remember is the batch size at which the whole trick runs out of spare compute.Open full answer →
05Build the tree attention mask that verifies a draft tree in one pass. How many tokens does each step verify, and at what cost?▼hardNewNVIDIATogether AIFireworks AIunlockedA draft tree turns a handful of guesses into many candidate continuations, and a mask lets one pass check them all. The answer builds the mask, counts what it costs, and shows where a ten-node tree stops beating a five-token chain.Open full answer →
07How are DeepSeek V3's multi-token prediction modules trained, and how does the engine turn that one MTP module into a speculative drafter?▼hardNewNVIDIATogether AIFireworks AI○ sign inDeepSeek V3 ships a drafter it trained alongside the model for free. The answer walks the MTP module's wiring and loss, prices a draft step against a 37.6B-active target, and reproduces the reported 1.8x from first principles.Open full answer →
10How does grammar-constrained decoding build the allowed-token mask at every step, and what does that cost per step at batch 128?▼hardNewOpenAIAnthropicDatabricks○ sign inThe model never sees the grammar; the sampler does, as a 16 KB bitmask per request per step. The answer builds that mask from an automaton, prices the naive version at ten milliseconds, and shows how precompilation removes almost all of it.Open full answer →
11Serve JSON-schema outputs at high throughput: what do you precompile, what do you cache, and what is the tokenizer boundary problem?▼hardNewOpenAIAnthropicDatabricks◆ premiumA per-request schema compile stalls the scheduler, a per-step mask must beat the forward pass, and skipping forced characters can push the model off its own tokenization. The answer handles all three with numbers from one realistic schema.Open full answer →
01Going from TP=4 to TP=8 on one H100 node cut a 70B model's latency by less than half and lowered tokens per GPU. One TP=8 or two TP=4?▼hard★ EssentialNewOpenAIAnthropicMetaunlockedTensor parallelism divides the weight bytes but not the all-reduce count, so each doubling buys less than the one before. The answer prices that fixed cost, then finds the workload where TP=8 wins anyway.Open full answer →
04Size the expert-parallel all-to-all for a 256-expert, top-8 MoE at batch 256. How many bytes per token, and how long on the network?▼hardNewNVIDIAGoogle DeepMindFireworks AIunlockedEvery MoE layer sends each token out to its experts and gathers the results back, twice per layer, 58 times per step. The answer turns DeepSeek V3's config into bytes per token, splits them between NVLink and the NIC, and shows what node-aware dispatch saves.Open full answer →
06You split prefill and decode onto separate nodes. Compute the KV transfer per request and the network bandwidth it needs.▼hardNewNVIDIAPerplexityFireworks AI○ sign inAn 8k-token prompt on a 70B model leaves 2.7 GB of KV that has to cross the network before decode can start. The answer shows that the sustained bandwidth is modest, that the latency is the real problem, and which side of the link runs out first.Open full answer →
07Why does a one-shot custom all-reduce beat NCCL for small decode messages on an NVLink node, and when does it lose?▼hardNewNVIDIAAMDFireworks AI○ sign inA ring all-reduce is bandwidth-optimal and takes fourteen synchronized steps on eight GPUs. At 16 KB per call, the steps are the cost. The answer builds the latency-bandwidth model, finds the crossover size, and checks it against the threshold vLLM ships.Open full answer →
08Serve Llama 3.1 405B: TP=8 on one H100 node, or TP=4 times PP=2 across two nodes? Work the latency and the memory.▼hardNewMetaNVIDIATogether AI○ sign inSame eight GPUs, same weights per GPU, same KV capacity. One layout pays 252 all-reduces per token, the other pays for every layer twice in wall-clock time. The answer works both, then finds the precision choice that forces the second.Open full answer →
11A 128k-token prefill takes 10 seconds on one node. How does context parallelism split it across nodes, and what does it send?▼hardNewGoogle DeepMindMetaNVIDIA◆ premiumTensor parallelism across nodes would all-reduce every activation over the network. Splitting the sequence instead sends only the KV, which for a GQA model is small. The answer sizes that traffic, finds when it hides behind attention, and fixes the causal-mask imbalance that naive splitting creates.Open full answer →
13Each decode layer needs the previous all-to-all to finish. How do you overlap communication with compute anyway, and at what cost?▼hardNewNVIDIAFireworks AITogether AI◆ premiumInside one batch there is nothing to overlap: every layer waits for its all-to-all. Split the batch in two and one half computes while the other communicates. The answer models the gain, finds the batch size where splitting makes things slower, and checks it against a shipped default.Open full answer →
05SGLang's radix cache versus vLLM's block hashing: compare the data structures, the eviction, and the workloads where each one wins.▼hardNewDatabricksxAI (SpaceXSI)Together AIunlockedBoth reuse KV for shared prefixes, and on a 2K-token chat prompt their hit rates differ by under one percent. The answer finds the differences that do matter, from eviction policy to whether a cache key means anything outside one process.Open full answer →
06What does SGLang's overlap scheduler hide, how does it build the next batch before the current tokens exist, and what does it cost?▼hardNewxAI (SpaceXSI)DatabricksTogether AI○ sign inThe GPU finishes a decode step and waits while Python appends tokens, checks stop strings and plans the next batch. The answer shows how the loop reorders that work, where the placeholder tokens live, and the request that pays for it.Open full answer →
09How does an engine batch requests for different LoRA adapters in one forward pass, and what do Punica-style shrink and expand kernels do?▼hardNewFireworks AITogether AIDatabricks○ sign inEight tenants, eight adapters, one base model and one batch. The answer explains why the extra cost scales with distinct adapters rather than requests, and which default serializes them.Open full answer →
13Write the main loop of a minimal LLM serving engine: request queue, scheduler, model step, sampling and streaming.▼hardNewOpenAIAnthropicFireworks AI◆ premiumAbout a hundred lines of Python that admit, chunk, preempt, sample and stream. The interviewer is watching where the KV accounting lives and what happens when the pool runs dry.Open full answer →
16More CUDA graph captures made decode faster but increased preemption. Diagnose the regression and choose a policy.▼hardNewNVIDIAFireworks AITogether AI◆ premiumCompare three capture policies using a memory ledger and a matched workload. Recover the missing KV pages, then defend a policy against both capacity and latency constraints.Open full answer →
05Design a multi-tenant LLM platform with per-tenant token quotas. How do you stop one tenant from degrading everyone else's latency?▼hardNewOpenAIAnthropicFireworks AIunlockedRequests-per-minute limits let one tenant with 128K-token prompts take a fifth of a replica's memory per request. The answer prices quotas in the resource tokens actually consume, then isolates the three things tenants share: compute, KV memory and the prefix cache.Open full answer →
06Design serving for a chat product and a batch API on the same GPU pool. How much batch work fits, and how do you protect chat latency?▼hardNewOpenAIAnthropicGoogle○ sign inA chat fleet sized for its peak sits more than half idle over a day, and a batch API can soak it up. The answer measures the idle replica-hours, finds what limits batch throughput (it is not compute), and decides where the two workloads meet.Open full answer →
07Design serving for 500 customer LoRA fine-tunes of one base model. Where do the adapters live, and how does a request find one?▼hardNewFireworks AITogether AIModal○ sign inFive hundred merged fine-tunes need five hundred GPUs before the first request. Served as adapters on a shared base they need a few dozen. The answer sizes the adapters, places them in a three-tier memory hierarchy, and finds the one setting that silently multiplies their memory by eight.Open full answer →
08Design a multi-region deployment for a 70B model that survives the loss of a whole region. How much spare capacity do you buy, and where?▼hardNewOpenAIAnthropicGoogle○ sign inAutoscaling cannot save a failover when a replica takes six minutes to come up, so the spare capacity has to exist before the region dies. The answer solves for the smallest fleet that survives any single region loss, and places the spare next to the region most likely to need it.Open full answer →
15Design batch inference over 1 billion documents: embed each one and run a 70B model over each. How many GPUs, how long, what cost?▼hardNewOpenAIDatabricksSnowflake◆ premiumOffline work changes the regime: the batch is as big as memory allows, latency is irrelevant, and output tokens stop being expensive. The answer prices both passes in GPU-hours, finds which one is the bill, and cuts it.Open full answer →
01After a prompt-template deploy, p99 TTFT went from about 100 ms to over a second while GPU utilization did not move. Debug it.▼hard★ EssentialNewAnthropicOpenAIPerplexityunlockedInspect tokenized prompts and cache-counter deltas to diagnose a TTFT regression. A runnable prefix-boundary check and a routing follow-up test whether the evidence actually supports the diagnosis.Open full answer →
05Throughput fell 15% after you enabled FP8. Find out whether it is the kernel, the scales or the config.▼hardNewNVIDIAFireworks AIBasetenunlockedFP8 halves the weight bytes, and the dashboard says the replica got slower. The answer computes what FP8 should have bought, splits the gap into kernel, scale and config terms with one profiler trace, and catches the regression that is not in the GPU at all.Open full answer →
08A quantized model passes its perplexity checks but fails long-context retrieval. Debug it.▼hardNewAnthropicGoogle DeepMindCohere○ sign inPerplexity matches the BF16 baseline to two decimals and the needle-in-a-haystack score collapses past 16K. The answer explains why the two checks measure different things, isolates weights, KV and config with a small grid, and shows a measured case of a quantization scheme that only breaks at length.Open full answer →
09The benchmark showed a 2x speedup, and production saw 10%. Reconcile the two numbers before anyone rolls it back.▼hardNewFireworks AITogether AIBaseten○ sign inBoth numbers can be true at once. The answer shows how to turn the gap into a short list of measurable dilutions, which one usually eats most of the 2x, and the replay test that settles it.Open full answer →
10p99 TPOT spikes every few seconds in a regular pattern while p50 stays flat. Find the cause.▼hardNewOpenAIAnthropicPerplexity○ sign inA regular period is a clue most candidates throw away. The answer turns it into a ranked list of periodic sources, shows why a few slow steps out of hundreds own the p99, and names the one correlation that separates the top two.Open full answer →
11A two-node deployment loads weights, reports healthy, then hangs on the first request. Debug NCCL and the engine.▼hardNewNVIDIAMetaTogether AI◆ premiumA hang gives you no error, no log line and no metric. The answer shows how to make every rank say where it is stuck, why a wrong network transport makes things slow but rarely hangs them, and the order that finds the cause in minutes.Open full answer →
13An 8B model on one H100 stops scaling at high request rates and the GPU is not saturated. Prove the CPU is the bottleneck, then fix it.▼hardNewFireworks AITogether AIBaseten◆ premiumSmall models make the GPU step so short that host work stops hiding behind it. The answer shows how to prove that with a timeline instead of a hunch, how much throughput a few milliseconds of Python cost, and which fixes help in which order.Open full answer →
14Memory on an inference server grows slowly all day until the engine OOMs and restarts. Find the leak.▼hardNewOpenAIAnthropicDatabricks◆ premiumThe KV pool is preallocated, so the growth is somewhere the engine does not budget. The answer splits memory into what is fixed and what can grow, turns a growth rate into bytes per request, and uses that one number to rule out half the suspects.Open full answer →
16Structured output slowed generation. Is the cause grammar compilation, mask construction, or host scheduling?▼hardNewNVIDIAFireworks AITogether AI◆ premiumUse cold-schema and warm-batch traces to separate compilation from recurring stalls. Identify the exposed delay, choose a targeted experiment, and preserve output correctness.Open full answer →
17MoE decode slowed after the traffic mix changed. Are hot experts or communication causing the delay?▼hardNewNVIDIADeepSeekTogether AI◆ premiumCompare expert counts with rank-level completion times. Explain why the longest combine span can occur on a lightly loaded rank, then test a placement change against a communication control.Open full answer →
18Prefill/decode disaggregation increased latency. Is KV transfer, admission, or token delivery on the critical path?▼hardNewNVIDIAFireworks AITogether AI◆ premiumReconstruct token arrival from a request-correlated trace. Separate transfer overlap from decode admission, and show how first-token delivery changes the metric that exposes a handoff stall.Open full answer →
19Image requests OOM while the KV pool is mostly free. Separate encoder peaks from decoder memory and choose a fix.▼hardNewOpenAIAnthropicNVIDIA◆ premiumUnused logical KV pages can coexist with exhausted device memory. Reconcile expanded image tokens, retained embeddings and phase-specific peaks before changing a decoder token limit.Open full answer →
20A router raises prefix-cache hits but worsens tail latency. Replay its decisions and find the missing state.▼hardNewNVIDIAFireworks AITogether AI◆ premiumReplay the same burst through affinity, round-robin and predicted-finish routing. Then remove local reservations or delay an eviction notice and explain exactly why the decisions change.Open full answer →
21A streaming benchmark reports fast tokens, but the client pauses. Which timing claims can its trace support?▼hardNewNVIDIATogether AIFireworks AI◆ premiumAn event can contain metadata, one token or several tokens. Audit a buffered stream without inventing token timestamps, and separate client launch delay from the engine's execution time.Open full answer →
01Implement a paged KV-cache block manager with copy-on-write forking, then a scheduler step that preempts when blocks run out.▼hard★ EssentialNewAnthropicOpenAINVIDIAunlockedForty lines of Python, and graders run property tests against them. The answer gets the three invariants right first, then the one copy-on-write case most implementations get backwards.Open full answer →
05Implement the lossless speculative sampling verifier for a batch with ragged draft lengths, and prove it matches the target.▼hardNewGoogle DeepMindOpenAIAnthropicunlockedThe accept rule is one line. The residual distribution, the bonus token, rows that drafted fewer tokens and a test that can tell a lossless verifier from a subtly biased one are the rest of the grade.Open full answer →
06Implement a radix tree prefix cache: match, insert with edge splitting, request locks and LRU eviction of unlocked leaves.▼hardNewAnthropicOpenAIPerplexity○ sign inMatching a prefix is a trie walk. The grade is in the edge split, which cached tokens a running request pins, and an eviction loop that turns parents into leaves without ever freeing a slot twice.Open full answer →
11Implement beam search over a paged KV cache, forking beams by sharing blocks and copying only the tail on write.▼hardNewNVIDIAMetaGoogle DeepMind◆ premiumBeam search reshuffles which hypotheses survive every step, and a naive cache copies every survivor's history. The answer forks block tables instead, gets the release order right so the last sharer writes in place, and proves it against a beam search that never pages.Open full answer →
13Implement a KV block allocator that shares prefix blocks across requests by chained hashes, with LRU eviction of cached free blocks.▼hardNewAnthropicOpenAIPerplexity◆ premiumTwo prompts with the same 16 tokens in block 3 must not share block 3 unless blocks 0 to 2 match too. The answer chains the hashes, keeps freed blocks hittable until memory is needed, evicts tails before heads, and proves a colliding hash cannot hand a request the wrong KV.Open full answer →
16This KV allocator passes ordinary append tests but corrupts forked requests. Find two bugs and prove the repair.▼hardNewAnthropicOpenAINVIDIA◆ premiumA runnable allocator hides an exception-safety defect and a payload-aliasing defect. Reduce each failure to a short operation sequence, then test ownership and content against separate oracles.Open full answer →
17Implement cancellation for an inference request without reusing KV pages while GPU work still references them.▼hardNewOpenAIAnthropicNVIDIA◆ premiumA disconnect arrives after launch, then the request ID is reused. Implement deferred reclamation and prove that late or duplicate completions cannot emit stale output or free another request's pages.Open full answer →
18A continuous batch changes order while a forward pass runs. How do you return each token to its owner?▼hardNewNVIDIAOpenAIAnthropic◆ premiumThe tensor has the right shape and every token ID is valid, yet one request receives another request's continuation. Reproduce the routing error and repair the launch-to-completion contract.Open full answer →
19A speculative verifier returns correct tokens, but the next step diverges. Debug its cache commit boundary.▼hardNewOpenAIAnthropicNVIDIA◆ premiumAccepted, emitted and computed tokens are different counts. Trace rejection, full acceptance, EOS and an output cap to find the state that the next forward pass is allowed to read.Open full answer →
20Logits are identical, but a seeded request changes output after batch reordering. Repair the sampler's RNG contract.▼hardNewOpenAINVIDIATogether AI◆ premiumA fixed global seed reproduces a launch order, not a request. Build a random-draw address that survives compaction, extra draft work and continuation, then state what it cannot guarantee.Open full answer →
21A streaming client stops reading. Keep its output bounded without blocking the inference batch.▼hardNewOpenAIAnthropicBaseten◆ premiumOne slow connection can stall unrelated generations or retain an unbounded output queue. Implement a byte budget that includes the pending write, then connect overflow and disconnects to engine cancellation.Open full answer →