Implement a single reverse-denoising step: predict all masked tokens, keep the most confid

Diffusion & Non-Autoregressive Language Models2 / 4

Chapter 222 / 4

Diffusion & Non-Autoregressive Language Models

Implement a single reverse-denoising step: predict all masked tokens, keep the most confid

Medium

Implement a single reverse-denoising step: predict all masked tokens, keep the most confident, re-mask the rest.

Target interface
reverse_step(model, x_t, mask_id, k)

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

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