Skip to content

[Train]: Add CustomSFTTokenizer with assistant-only loss - #1327

Open
LiJunscs wants to merge 1 commit into
flagos-ai:mainfrom
LiJunscs:custom_sft_tokenizer
Open

LiJunscs wants to merge 1 commit into
flagos-ai:mainfrom
LiJunscs:custom_sft_tokenizer

Conversation

@LiJunscs

Copy link
Copy Markdown
Collaborator

PR Category

Train

PR Types

New Features

PR Description

Add CustomSFTTokenizer with assistant-only loss using chat-template generation masks, custom template support, and CLI/YAML configuration. Preserve existing core tokenizer behavior and keep EOS supervised when PAD and EOS share an ID.

Validation: 59 CPU tests passed; the new tokenizer module achieved 100% statement and branch coverage. Ruff and typos checks passed.

Register a local SFT tokenizer that uses chat-template generation masks, supports custom templates, and preserves core inference and prompt-format behavior.

Expose the assistant-only loss switch through CLI and YAML, preserve EOS supervision when PAD shares its ID, and add CPU regression coverage.

Validation: 59 CPU tests passed; tokenizer statement and branch coverage 100%; Ruff and typos checks passed.

This branch has not been deployed

No deployments
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