Easy

Implement prompt-token loss masking given (prompt_len, total_len) per sample

SFT, Instruction Tuning, Data & PEFT · Problem 1 of 6

Chapter 08SFT, Instruction Tuning, Data & PEFT

Implement prompt-token loss masking given (prompt_len, total_len) per sample

EasyProblem 1 / 6

Implement prompt-token loss masking given (prompt_len, total_len) per sample.

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints