Parallel Jacobi Decoding

hard
Unit 26 · Vector Search0/0 to milestone

Greedy decoding of n tokens needs n sequential forward passes. Jacobi decoding guesses all n tokens at once and refines them in parallel: on each iteration, every position i is recomputed from the prefix plus the current guesses for positions before it. When nothing changes, you've reached a fixed point, which is exactly the greedy output. Correct guesses can lock in several tokens per pass (the idea behind Lookahead decoding and CLLMs).

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Parallel Jacobi Decoding · TechGradify