Skip to content

Add final-assistant SFT mode#743

Merged
vivekkalyan merged 7 commits into
mainfrom
vivek/sft-loss-mask
Jul 10, 2026
Merged

Add final-assistant SFT mode#743
vivekkalyan merged 7 commits into
mainfrom
vivek/sft-loss-mask

Conversation

@vivekkalyan

@vivekkalyan vivekkalyan commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

SFT currently trains every assistant turn in a conversation. Some datasets need earlier turns only as context and should apply loss only to the final assistant response.

This PR adds assistant_turns="last" while keeping "all" as the default. ART separates the final turn at the rendered prompt/completion boundary instead of finding it inside a one-shot token sequence. This keeps the full conversation as context and matters because chat templates can depend on that conversation while tokenization can merge across the generation boundary. If a template does not expose a safe boundary, ART fails instead of training unintended tokens.

* origin/main:
  feat: unify shared-prefix Megatron execution (#739)
  Add DeepSeek V4 Flash support for ART Megatron (#745)
  Add ART Megatron support for GPT OSS (#744)
  ci: bound GPU prewarm cleanup
  ci: prewarm GPU image on all GPU clusters
  ci: dispatch Caladan GPU image builds
  Fix Gemma4 MoE Triton flex stage config (#742)
  fix: split GPU image dependency warmup

# Conflicts:
#	src/art/dev/model.py
#	src/art/serverless/backend.py
@vivekkalyan vivekkalyan marked this pull request as ready for review July 9, 2026 00:52
@vivekkalyan vivekkalyan requested a review from Kovbo July 9, 2026 00:52
@vivekkalyan vivekkalyan changed the title Add semantic SFT loss masks Add final-assistant SFT mode Jul 10, 2026
@vivekkalyan vivekkalyan merged commit f934bdc into main Jul 10, 2026
5 checks passed
@vivekkalyan vivekkalyan deleted the vivek/sft-loss-mask branch July 10, 2026 20:40
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