Skip to content

feat: filter out rows where loss mask is all zero - #48

Open
Neonkraft wants to merge 1 commit into
mainfrom
feat/filter-datasets
Open

feat: filter out rows where loss mask is all zero#48
Neonkraft wants to merge 1 commit into
mainfrom
feat/filter-datasets

Conversation

@Neonkraft

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces a script to drop rows of a dataset whose assistant loss mask is all zero after a chat template is applied to it, then write sharded parquet to disk. This is a fairly robust way to ensure that SFT with TRL does not unexpectedly crash upon encountering rows with fully zero loss masks.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Performance
  • Documentation
  • Maintenance

@Neonkraft Neonkraft mentioned this pull request Aug 18, 2026
6 tasks
@Neonkraft Neonkraft changed the title filter rows where loss mask is all zero feat: filter rows where loss mask is all zero Aug 18, 2026
@Neonkraft Neonkraft changed the title feat: filter rows where loss mask is all zero feat: filter out rows where loss mask is all zero Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant