Research Engineering & Debugging · Problem 7 of 8
Build a toy post-training stack with intentional bugs, then write tests that catch every one.
Implement the function/class skeleton in the editor. Any correct approach is accepted.
import os, torch, torch.nn.functional as F
def seq_logprob(model, ids, prompt_len, mask_bug=False):
raise NotImplementedError
def dpo_loss(policy, ref, chosen, rejected, prompt_len, beta=0.1):
raise NotImplementedErrorReady when you are
Submit your solution and a structured review appears here — verdict, score, and concrete feedback. Any correct approach passes.
Build a toy post-training stack with intentional bugs, then write tests that catch every one.
Implement the function/class skeleton in the editor. Any correct approach is accepted.