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

Research Engineering & Debugging7 / 8

Chapter 257 / 8

Research Engineering & Debugging

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)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

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