Diffusion & Non-Autoregressive Language Models · Problem 2 of 4
Implement a single reverse-denoising step: predict all masked tokens, keep the most confident, re-mask the rest.
Implement the function/class skeleton in the editor. Any correct approach is accepted.
import torch
import torch.nn.functional as F
@torch.no_grad()
def reverse_step(model, x_t, mask_id, k):
raise NotImplementedErrorReady when you are
Submit your solution and a structured review appears here — verdict, score, and concrete feedback. Any correct approach passes.
Implement a single reverse-denoising step: predict all masked tokens, keep the most confident, re-mask the rest.
Implement the function/class skeleton in the editor. Any correct approach is accepted.