Code drills
Write the component, then run it against tests in your browser: Python 3.14 with numpy, nothing to install, nothing sent to a server. The visible tests check the main case. The edge-case suite checks what interviewers probe, and every drill's tests are verified to fail a set of plausible wrong implementations, so a pass means something.
- Batching & scheduling · hard · premium edge casesToken-Budget Scheduler Step
Write the step an iteration-level scheduler runs before every forward pass: decodes first, then the rest of a partial prefill, then first-come admission under a token budget, a sequence cap and a KV reservation, with chunked prefill falling out of the rule.
- Attention kernels · medium · freeSplit-KV Log-Sum-Exp Merge
Write the reduction that Flash-Decoding runs after its split kernels: merge per-split partial outputs into the exact attention output using each split's log-sum-exp, without overflowing and without letting an empty split poison the result.
- Quantization & numerics · hard · premium edge casesINT4 Packing and Dequant Matmul
Write symmetric INT4 weight quantization with one FP16 scale per 128 weights along K, pack two's-complement nibbles two per byte, unpack with sign extension, and multiply without ever expanding the whole weight matrix.
- Decoding algorithms · medium · freeSpeculative Rejection Sampler
Compute the exact distribution of the token a speculative-decoding verifier emits at one draft position: accept with min(1, p/q), resample from the normalized residual, and survive a draft identical to the target without dividing by zero.
- Distributed inference · medium · premium edge casesRing All-Reduce Simulation
Write the ring all-reduce tensor parallelism runs twice per layer: p - 1 reduce-scatter steps and p - 1 all-gather steps over p chunks, with every send of a step taken before any receive, and count the 2(p - 1)/p of the buffer each rank puts on the wire.
- Engine internals · medium · premium edge casesChained Block Hashes and Prefix Hits
Write the two functions behind a block-hashed prefix cache: a chained hash for every full 16-token block, and the walk that counts how many tokens of a new prompt can reuse cached blocks, stopping at the first miss and always leaving the last token to run.
- Implementation coding · medium · freeBatched Top-p Filter With Ties
Write the filter an engine runs before it samples: temperature, softmax, the top-p nucleus with tied tokens kept or dropped together, a greedy branch for temperature 0, and a short circuit for p of 1 that survives a 128,256-token vocabulary.
- Implementation coding · hard · premium edge casesPaged KV Block Manager
Write the allocator under a paged KV cache: block tables, a free list, reference counts for shared prefixes, copy-on-write for a shared partial block, and failure paths that leave the pool exactly as it was.