Build a toy post-training stack with intentional bugs, then write tests that catch every o

Correctness, Debugging, and Performance Experiments7 / 8

Chapter 267 / 8

Correctness, Debugging, and Performance Experiments

Build a toy post-training stack with intentional bugs, then write tests that catch every o

Super-hard

Build a toy post-training stack with intentional bugs, then write tests that catch every one.

Target interface
seq_logprob(model, ids, prompt_len, mask_bug=False)

Complete the starter code in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.