← Questions

Debug a pre-norm Transformer block with residual connections

0
Mistral AICodingLast asked Jul 2025

A coding interview question asked in Mistral AI's coding round, last asked Jul 2025. It tests pytorch, transformers and debugging.

You pair with an engineer on a PyTorch Transformer block that is meant to use pre-normalization with residual connections, and something about it is wrong. Find the bug in how the normalization and the residual paths are wired, fix it…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Mistral AI · Coding · Last asked Jul 202560 min · Live coding in Python · Reportedly fine for boilerplate and lookups; the fundamentals must be your own

What it tests

pytorch · transformers · debugging · pair programming

Your code and the AI tutor open when you unlock this question.