Skip to content

Add Laya request preprocessing - #43

Open
linear3735 wants to merge 7 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-input
Open

linear3735 wants to merge 7 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-input

Conversation

@linear3735

@linear3735 linear3735 commented Sep 30, 2026 •

Copy link
Copy Markdown

Purpose

Pack English Laya requests into token rows, option-marker positions, question types and usage counts. Preserve question and option order and apply Laya 0.3.20's truncation rules.

Depends on #21; merge it first. Until then, GitHub shows the checkpoint changes too. This PR's diff contains 432 changed core/configuration lines, conservatively including the JSON regression test. Separate test files, docs and Cargo.lock are excluded. Refs #14.

Also preserve Cua-S1 JSON number parsing and Python float formatting when Laya enables serde_json/arbitrary_precision. Without this fix, three existing Cua-S1 tests fail in the combined workspace.

Tests now live under the repository-root tests/ directory. Cargo target names and test coverage are unchanged.

Test Plan

Run workspace tests, fmt, strict Clippy and a release build. Compare packed inputs against the frozen 17-case Laya reference. CI downloads the tokenizer and reference; the test checks both hashes before comparison.

System1-Omni Version / Commit: 99c1d1200e0e7f704296dcdf30834b42452431d3; incremental base 219808b.

Test Result

  • 33 workspace CPU tests passed; 5 tests requiring external data or a GPU were skipped by default. The official 17-case packing comparison passed separately.
  • The earlier Cua-S1 checks passed all 7 unit tests both with and without arbitrary_precision; that code is unchanged.
  • fmt, strict Clippy, release build passed.
  • Full-checkpoint tests passed before this test-directory update; checkpoint code is unchanged. No new GPU inference or model-quality result.

Rust CI, Docs build and benchmark harness tests passed for this update.

Self-review

Before marking this PR ready for review or requesting maintainer review, complete
the self-review checklist.
Keep the PR in draft while this work is incomplete.
For agent assistance, use the optional precheck-pr skill.

  • I have reviewed the full diff and addressed the issues I found.
  • I have checked that the change follows the project's architecture and stays focused on the stated purpose.
  • I have run the checks appropriate to this change and reported commands, results, and anything I could not verify above.
  • I have checked that the PR description, documentation, and any accuracy or performance claims match the implementation and available evidence.

linear3735 and others added 3 commits September 28, 2026 15:45
The inventory mismatch reported only that the sets were unequal, so the
most likely failure -- pointing the engine at a checkpoint that is not the
frozen one -- said nothing about which tensor was wrong or in which
direction. Both sets were already in scope.

Report the expected-only names as "missing" and the checkpoint-only names
as "unexpected", sorted, so the message is deterministic. The neighbouring
errors already name their tensor (duplicate expected tensor, shape mismatch,
unsupported dtype); this was the one that did not.

Adds a CPU test over the synthetic safetensors fixture that asserts both
directions and the ordering.

fmt, clippy -D warnings, and the workspace tests pass; the checkpoint test
that exercises this path still passes against the frozen checkpoint.
@linear3735 linear3735 mentioned this pull request Sep 30, 2026
4 tasks
@linear3735
linear3735 marked this pull request as ready for review September 30, 2026 02:48

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