MCPcopy Create free account
hub / github.com/ckd0817/LLM-Interview-Code / SFTLoss

Class SFTLoss

loss/SFTLoss.py:13–66  ·  view source on GitHub ↗

监督微调损失模块 在 SFT 阶段,我们通常只希望计算 response 部分的损失, 而不计算 prompt 部分的损失。该模块支持通过 prompt_lengths 来屏蔽 prompt。 Args: 无

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected