Skip to content

Decode Laya answers on CPU - #44

Open
linear3735 wants to merge 10 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-decode
Open

linear3735 wants to merge 10 commits into
ThinkFlowLab:mainfrom
linear3735:codex/laya-decode

Conversation

@linear3735

@linear3735 linear3735 commented Sep 30, 2026 •

Copy link
Copy Markdown

Purpose

Decode raw option and action logits into Laya answers, probabilities and confidence. Preserve question and option order and apply temperature calibration.

Depends on #43 and #21; merge them first. Until then, GitHub shows their changes too. This PR's diff contains 159 core/configuration lines; tests and fixtures are separate. Scorer execution is separate. Refs #14.

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

Test Plan

  • Run workspace tests, fmt, Clippy and release build.
  • Regenerate the reference with Laya 0.3.20 and compare it byte-for-byte.
  • Check malformed rows, metadata, non-finite logits and temperature boundaries.

System1-Omni Version / Commit: d9e57b77987e79b6ffe3a49f5635ffc8d4c264d4; base 99c1d12.

Test Result

  • 39 CPU tests passed; 5 tests requiring external data or a GPU were skipped by default.
  • The checked-in 16-case official reference and the FP32 rounding probe passed. The probe allows a probability difference of 0.0001; all other fields match exactly.
  • fmt, strict Clippy, release build passed.
  • The reference was regenerated and checked byte-for-byte before this test-directory update. Decoder code and the fixture are unchanged. This branch inherits the Cua-S1 JSON compatibility fix from Add Laya request preprocessing #43.

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 4 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 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