Skip to content

fix(data): supervise an unterminated final Muse span - #1167

Open
subhajitdchow wants to merge 1 commit into
sgl-project:mainfrom
subhajitdchow:muse-parser-unterminated-final-span
Open

subhajitdchow wants to merge 1 commit into
sgl-project:mainfrom
subhajitdchow:muse-parser-unterminated-final-span

Conversation

@subhajitdchow

Copy link
Copy Markdown

Motivation

MuseParser supervises an assistant span only when it ends in <|eom|> or <|eot|>. A reply cut off
by the generation length cap has no closing token, so its last span gets no loss. When the reply is cut
inside its first span, the row has no trainable tokens and is filtered out.

Modifications

  • Let the final span end at the end of the text: (?:<\|eom\|>|<\|eot\|>|$). No closing token is added,
    so the draft does not learn a stop the target never produced.
  • Document the case in the MuseParser docstring.
  • Add test_unterminated_final_span_is_supervised.

Complete spans are unchanged: the match still stops at the first closing token.

Related Issues

Accuracy Test

tests/test_data/test_muse_parser.py: the new test fails on main and passes with this change; the
existing Muse parser tests pass unchanged.

Benchmark & Profiling

N/A. Loss-mask change only.

Checklist

Co-authored-by: Cursor <cursoragent@cursor.com>
@subhajitdchow

Copy link
Copy Markdown
Author

@yudigege86 MuseParser on the EAGLE4 branch (#1024) has the same closing-token requirement; this fixes it on main.

@subhajitdchow
subhajitdchow marked this pull request as ready for review November 10, 2026 22:39

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