Implement Masked Cross-Entropy with Label Smoothing

Read the full interview experience this question came from →

Quick Overview

Implement numerically stable masked cross-entropy in NumPy with label smoothing and optional temperature scaling. Validate shapes, dtypes, finite logits, masks, and boundary cases while explaining the loss derivation and gradient.

Implement Masked Cross-Entropy with Label Smoothing

Company: OpenAI

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

Overview: Implement numerically stable masked cross-entropy in NumPy with label smoothing and optional temperature scaling. Validate shapes, dtypes, finite logits, masks, and boundary cases while explaining the loss derivation and gradient.

Read the full OpenAI Machine Learning Engineer interview experience this question came from

|Home/Machine Learning/OpenAI
OpenAI logo
OpenAI
Jun 27, 2026
mediumMachine Learning EngineerTechnical ScreenMachine Learning
103
0
Loading...
Loading comments...