Repository navigation
perf(agentic): compress loss masks as intervals - #605
Merged
xiaoliang0601 merged 2 commits intoNov 10, 2026
Merged
xiaoliang0601 merged 2 commits into
xiaoliang0601 merged 2 commits into
Conversation
Store nonzero mask runs as half-open response-token intervals in the background train writer. The response length and interval values allow lossless reconstruction and preserve the effective token sum. Advertise the new train stream schema in the manifest and document both encodings. Exercise JSONL round trips, zero masks, and update merging with legacy records.
xiaoliang0601
requested review from
NINGBENZHE,
SigureMo and
Yangruipis
as code owners
November 9, 2026 12:24
Contributor
|
Thanks for contributing to Relax, @xiaoliang0601! 感谢你为 Relax 做出贡献! 📚 Contribution guide / 贡献指南Describe the problem, your changes, and how you validated them. Keep each PR focused and run 请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 🛠️ CI commands / CI 指令
Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access. 在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。 🔎 Merge requirements / 合入条件GitHub:❔ 部分检查未通过
|
Contributor
Nyanpasu 审查看板审查状态: ✅ 已通过 审查版本: da17cd4 目标分支: main 已完成 da17cd4 的八个文件及相关调用路径审查,未发现需修改的问题。区间边界、全零 mask、整数权重、schema 标识和 DP 合并契约一致。当前 head 的 pre-commit 已通过;CPU/GPU/NPU CI 尚在运行。本轮未运行本地测试或多节点训练;作者报告的 201 项 CPU 测试结果未独立复跑。
没有未解决的审查问题。 提交范围 · 接收 8 · 建议移出 0 · 待确认 0接收 8 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.
|
rai-studio-bot
approved these changes
Nov 9, 2026
Yangruipis
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Store the Agentic training-input loss mask as nonzero token intervals in train JSONL. Relates to #555.
Why
Tool observations and model responses often form long runs of the same mask value. The interval representation keeps the positions needed for debugging while making those records smaller.
How
loss_mask.rangesin the background writer as zero-based[start, end, value]triples with an exclusive end. Positions outside the ranges are zero up toresponse_length.effective_tokensfrom the interval lengths and values. Integer mask weights and all-zero samples can be reconstructed exactly.4.0.0throughtrain_schema_versionin the manifest. The format guide documents v3 arrays and v4 intervals, and the regression checks both with the existing DP update merge.Testing
pre-commit run --all-filespassespytest tests/)The Agentic observability, JSONL writer, and stream-join CPU suites passed 201 tests. The round-trip test covers integer mask values and checks the same merged update summary for v3 and v4 records. The CUDA snapshot test skipped on the local CPU host, and integration tests require multi-node GPU hardware.
Type of Change
Screenshots / Logs
The 42-token synthetic mask in the round-trip regression takes 126 bytes as a JSON array and 37 bytes as an interval object, counting the field value only.