Skip to content

Decode Laya answers on CPU - #44

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

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

Conversation

@linear3735

@linear3735 linear3735 commented Sep 30, 2026 •

Copy link
Copy Markdown

Superseded by #90, now merged into main.

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, which contains the preprocessing layer. #21 is merged. The current diff includes #43. Original decoder increment contains 159 core/configuration lines; tests and fixtures are separate. Scorer execution is separate. Refs #14.

This branch inherits #43's private-key JSON fix, explicit Request::from_json / Request::from_value API and root test relocation. Generic Deserialize is removed.

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. Commands and fixture regeneration are in the CPU decoder recipe.

System1-Omni Version / Commit: bc90ffc. Original decoding increment: 99c1d12 → d9e57b7.

Test Result

  • Local workspace and current CPU CI: 45 tests passed and 6 external-data/GPU tests were skipped. The inherited 17-case packing check passed separately.
  • 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 and strict MkDocs build passed locally.
  • Earlier fixture regeneration was byte-identical. Decoder code and the fixture are unchanged; no GPU inference or model-quality checks were run for this update.

CI for bc90ffc: Rust CI, Docs build, benchmark harness tests passed.

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
linear3735 marked this pull request as ready for review September 30, 2026 02:48
@hsliuustc0106 hsliuustc0106 mentioned this pull request Oct 5, 2026
4 tasks

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent local review — Laya answer decoding

Verdict: approved.

decision.rs completes the processor pair: raw option/action logits → answers, probabilities, confidence with temperature calibration and preserved question/option order; the export_decisions.py oracle and tests/laya/data/decisions.json fixtures keep it reference-checked, and postprocessing stays separate from scorer execution exactly as docs/architecture.md draws the line. Locally at head bc90ffcf (includes #43): laya suite 25 passed / 3 ignored (checkpoint-gated), clippy clean; CI green. Same json.rs rebase note as #43. Merge after #43.

Approval per the repo review process; reflects head bc90ffcf only.

@hsliuustc0106 hsliuustc0106 mentioned this pull request Oct 5, 2026
2 of 4 tasks
@hsliuustc0106

Copy link
Copy Markdown
Contributor

fix conflicts as the new arch

@linear3735 linear3735 closed this Oct 6, 2026
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.

2 participants