Skip unused output rows A language model sometimes trains on the reply, not the prompt. But ordinary training can still compute scores for every vocabulary token at every position. We can skip that final projection for rows whose labels do not contribute to the loss. Keep the whole sequence Keep every prompt and reply token inside the transformer. Only select rows after the final transformer layer. Then run the same vocabulary projection, and the same cross entropy, on those selected rows. The vocabulary does not shrink. Each retained row still scores every token. Divide by the kept count The loss is the sum over supervised rows. The mean divides by how many of those rows there are. For example, six units of loss on one kept row gives six, not three, even if there were two original rows. For no supervised rows, this example explicitly returns zero loss and zero gradients. Do not delete prompt tokens In a two token attention example, the reply still attends to the prompt. Head compaction preserves the loss and the prompt's gradient. Deleting the prompt upstream changes the loss from zero point one two seven, to zero point six nine three, and erases that gradient. So skipping an output score is not the same thing as skipping a token. Measured head-only speedup On a GTX sixteen sixty Super, half the rows took eleven point six milliseconds, down from twenty three. At ten percent kept, it took three milliseconds, about seven point seven times faster for this head. With almost every row kept, there was no useful gain. These are not whole model speedups. Exact math. Scoped speed. Lean checks the masked contribution identity. PyTorch checks the loss and all three gradients against the dense implementation. The saving is in the final output head. Earlier attention, optimizer work, and communication are not covered. Use it when many labels are ignored, then measure the full training step before drawing a wider conclusion.