Pretraining Objectives & Scaling Laws · Problem 1 of 4
Implement next-token cross-entropy for a batch of logits/targets in numpy with padding masking.
Implement the function/class skeleton in the editor. Any correct approach is accepted.
import numpy as np
def next_token_ce(logits, targets, mask=None):
raise NotImplementedErrorReady when you are
Submit your solution and a structured review appears here — verdict, score, and concrete feedback. Any correct approach passes.
Implement next-token cross-entropy for a batch of logits/targets in numpy with padding masking.
Implement the function/class skeleton in the editor. Any correct approach is accepted.