Add instance-local rule buckets to the Cua-S1 multimodal worker - #37
Levius-Fubuki wants to merge 100 commits into
Conversation
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove archived experiment outputs and assistant planning notes. Keep runtime code, reproducible tools, and model verification metadata unchanged. Link historical reports to an immutable commit and ignore future local artifacts. Remove only tests tied to the deleted historical evidence bundles.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
Remove supplemental tests, recipe tools, documentation, CI, and configuration changes from the PR diff. Runtime Python source and inline third-party notice are unchanged. Validation uses the pre-cleanup test/tool snapshot outside the checkout.
hsliuustc0106
left a comment
There was a problem hiding this comment.
Review of 3254e902eb86 (incremental stack changes).
Reviewed bucket padding/trimming, the pinned Transformers forward integration, per-real-length parity checks, cache growth and worker shutdown. No independent actionable correctness defect found in the inspected paths.
I would hold adoption until real GPU parity and controlled performance measurements establish the benefit of rule bucketing over the exact-length/eager paths, including varying lengths within a bucket and eviction/replay. This adds execution logic to the Python multimodal worker and does not accelerate #19's native Rust/CUDA worker.
Validation: 227 archived CPU tests passed against this head's runtime source using Transformers 5.17.0 and tokenizers 0.23.2. Six initial failures with Transformers 5.14.1 were version-guard failures and disappeared with the pinned version. Local Torch remains 2.13 rather than pinned 2.14. Tiny real model tensors were exercised on CPU; CUDA capture/stream behavior was mocked. No full-checkpoint GPU parity or new latency measurement was performed.
The validation suites were retrieved from the immutable archived revisions linked in the PR descriptions; they are not retained in the current PR diffs.
Purpose
Add opt-in rule-bucket execution inside the model-owned Python worker. Nearby lengths can reuse a bucket after strict full-vocabulary-logit checks; per-length gates, resource ownership and shutdown remain instance-local. The latest follow-up integrates the graph lifetime fixes from #22/#33.
Stacked on #33. Incremental runtime comparison. The PR diff remains limited to runtime Python source; validation helpers, tests and generated evidence are preserved separately. This optimizes the Python multimodal worker, not the native Rust/CUDA worker.
Test Plan
System1-Omni Version / Commit:
d598de3ce03f57dd20ff9b730279a4b4979623d4.Fresh validation started 2026-09-30 on RTX 4090 24 GiB, driver 595.71.05, Torch 2.14.0+cu130, Transformers 5.17.0 and PEFT 0.21.0; BF16 base with unmerged adapter, without FLA/causal-conv1d.
PYTHONPATH=src:recipe/cua_s1 python -m pytest tests/cua_s1 -q.git diff <runtime> <validation> -- srcis empty. Source hashes and numerical/performance reports are independently verified.Test Result
rustCI passed on the above runtime head.Full evidence and tradeoffs · Raw primary report · Independent verification summary.
Timing is serial and synthetic on one GPU. Cold-cache totals include capture and parity-check costs; model loading, HTTP parsing and final cleanup are excluded. Two runs are not confidence intervals or proof of production workload behavior.
Self-review
Agent-assisted full-diff review and validation limits found no actionable correctness or architecture defect. Runtime scope, commands and claims were checked against the recorded sources/results. The contributor remains responsible for understanding the changes; this does not replace maintainer review.