# Loss Masking: 'Sadece Response Üzerinde Loss' Cümlesinin Gerçek Implementasyonu

> Source: https://sukruyusufkaya.com/learn/fine-tuning-cookbook/ftc-loss-masking-implementation-real
> Updated: 2026-08-23T09:50:44.187Z
> Category: Fine-Tuning Cookbook (Model-by-Model)
> Module: Part II — Tokenizer & Data Engineering
**TLDR:** Loss masking SFT'nin temel taşı. IGNORE_INDEX=-100'ın PyTorch CrossEntropyLoss ile etkileşimi, instruction token'larının nasıl maskelenip response'un nasıl tutulduğu, Unsloth'un train_on_responses_only fonksiyonunun source-code okuma, multi-turn conversation'da turn-by-turn masking, edge case'ler (assistant cevabının ortasında system prompt değişimi).

