Tree Attention for Speculative Drafts

medium
Unit 16 · Inference II0/2 to milestone

Medusa and EAGLE propose a tree of draft continuations instead of a single chain, and verify the whole tree in one forward pass. Each draft token may only attend to the verified prefix, its ancestors in the tree, and itself.

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
Tree Attention for Speculative Drafts · TechGradify