Repository navigation
Conversation
Signed-off-by: psv666 <2693925048@qq.com>
|
Heads-up: #179 (for #85) also runs Open-Jev's shared candidate prefixes once, so the two overlap. A trial merge conflicts in They cover different cases. #179 is opt-in ( |
Purpose and summary
Reduce the time Open-Jev-27B-v1.1 users wait for a complete decision by removing repeated candidate work while retaining the trained head, calibration, candidate order and question-level normalization. The frozen cumulative candidate reduced mean full-request latency from 216.31 to 123.02 ms (43.13%) on the historical single-request workload.
Accepted tradeoff: for the six Noul (yes/no) requests with 513–2048 tokens, the 95th-percentile latency increased from 116.32 to 119.77 ms (+2.97%). The contributor explicitly accepted this regression for submission on 2026-10-26. It remains recorded as a regression. Four other historical tail checks remain statistically inconclusive; this PR does not relabel them as passes or claim the original all-group performance gate passed.
Changes include compatible packed projections and batched Gated DeltaNet (the model's recurrent linear-attention computation), compact prefix continuations, bounded projection-plan caches, vectorized convolution, wider independent work assignment, bounded graph/scratch reuse, and skipping unused rows in the final feed-forward layer when its original matrix-multiplication algorithms support that shape. Unsupported optional paths fall back to existing computation. The 27B worker requires the additive packed-projection/batched-state symbols from this checkout; rebuild its worker and CUDA library together. The existing binary interface remains version 9.
Required human contributor answers
The following scope was explicitly confirmed in the 2026-10-22 planning exchange (Q1–Q18), recorded in
PLAN.mdwith SHA-256300625b0c6a2c44bf4b20653bc7e0be953e38c81292d02c621e9e68689a93967. The 2026-10-26 submission instruction accepts the specific +2.97% tail regression and requests this PR. These are references to the contributor's private task record; no private transcript is attached.Is a PR needed? Yes. The accepted cumulative result requires maintained Rust/CUDA changes, and the contributor explicitly requested submission on 2026-10-26. This is a performance change, so bug-fix failure reproduction is not applicable; the measured baseline is below.
Review scope and map
Integrated base:
05075d0f36e399e3a001ffedea400c666990cda9. Integrated head:efd02a896886c4693f04576faf382fcc2d9ebc0a.The full diff contains 3,171 changed authored-code lines and 3,363 changed lines overall, across 32 files. The cumulative change is submitted together because the executable, device operations and optional interfaces are coupled, and the quoted overall gain belongs to the combined frozen candidate. No partial component is assigned that cumulative gain. This is larger than a quick precheck: the full source/callers and error/resource paths were inspected, and component plus integration checks are listed below. A split would need validation at each resulting head.
src/models/open_jev/native/src/{contract,processing,main}.rssrc/models/open_jev/native/src/{batching,executor}.rssrc/models/qwen3_5/native/src/model.rssrc/backends/cuda/qwen3_5/{gemm.cu,ops.h},src/models/qwen3_5/native/src/cuda.rssrc/backends/cuda/qwen3_5/{attention,elementwise,gdn_prefill}.cumodel.rs,tests/qwen3_5/last_mlp.rsNo generated experiment dumps, binary archives or one-off reports are added to the source tree.
Test plan and results
The following checks use integrated head
efd02a896886c4693f04576faf382fcc2d9ebc0a; historical timing below uses a different frozen source and is not a fresh performance claim for this head.cargo fmt --all --checkcargo clippy --workspace --locked --all-targets --features omni-laya/serve -- -D warningscargo test --workspace --locked --features omni-laya/servecargo build --workspace --release --locked --features omni-laya/servepython3 src/backends/cuda/check_contract.py --repo-root .python3 -m unittest discover -s tests/cuda -p 'test_*.py' -vpython3 -m unittest discover -s src/backends/cuda/tests -t . -vmkdocs build --strictCurrent-head HTTP checks completed on 2026-10-26: 508 responses (231 real requests twice, 36 synthetic primary cases and 10 capacity/structure cases), with zero probability/ordinal-score drift, zero decision flips and zero failures against the frozen original responses. All parsed responses were identical after excluding only
metadata.inference_secondsandmetadata.prefix_cache; the latter changes only where within-question sharing is used. Graph capture failures: zero. The synthetic cases include 16,384-token capacity, 17/33 candidates, 2/10 score levels and mixed question kinds; they are numerical/structural coverage, not new model-quality evidence.This used the current frontend and worker, graph replay enabled, and one reserved device with measured CUDA capability 9.0, 132 streaming multiprocessors and 150,121,283,584 visible bytes; driver label NVIDIA L20X, UUID
GPU-76ec3aee-7fec-b98c-562a-7697a4be04c7, driver 570.133.20 / CUDA 13.0.88. It is a different physical device from the historical campaign. The single measured traversal validates integration and does not establish a new balanced performance comparison. No extra performance acceptance is inferred from it.Current worker SHA-256:
5ec48fb7d452f131475e5e4669fc31e6b32f4ccd62bd0ed24f9e291a6a9aa96f. Current CUDA library SHA-256:e256ede7524aff3b79d277df428f8b546fd469d637caaf720fe032fa307bd8e2. Current frontend SHA-256:5c4d458309ca9ed84983a1857c86afaedbf6d37a7124fe2ac059a31ab5b1d265.Current-head raw validation is retained separately in
efd02a8-integration-evidence.tar.gz(13,949,587 bytes, 79 verified archive members), SHA-2565a5d4f3d53a6636152c5a0608aacb2b005214101c88caa37f2f91c24f94eeeeb. It is host-local; the same public-download limitation described below applies.Reproduce the device and full-model checks
Prepare the pinned merged checkpoint using
recipe/open_jev/native.md, adding--max-length 16384during export. Build the CUDA library and release tests. All device commands must run inside the host's GPU reservation. SetOPEN_JEV_MODELto the merged checkpoint,QWEN3_5_MODELto the same directory, and bothOPEN_JEV_CUDA_LIBandCUA_S1_CUDA_LIBto the newly built library.The validation used these release test executables after compilation, with one reserved GPU and serial tests. The shared-prefix rejection test needs a different complete checkpoint and was excluded explicitly. Other complete model checkpoints, multi-request concurrency, other device architectures, and compute-sanitizer remain unverified. The previous candidate's old-library fallback experiment is historical only and was not rerun against the current interface.
Demo / evidence — historical full-request comparison
Before: original source
d577bb824a5dbf0f5e385cf829bb6b9025dabf8d, eager execution.After: frozen cumulative P19 patch on that base, SHA-256
5bb08cafffcf1825c1467de36705ae78baf07e0f7b24662c67ed7237b6504799, graph replay enabled. P18 is the parent experimental candidate. This comparison includes the declared graph-mode treatment; it is not an isolated last-layer gain or a comparison against today's main branch.231 unique public JevBench requests: 139 Choice, 74 Noul, 18 Score, comprising 775 candidate inputs. Maximum candidate length in the primary workload is 4096 tokens. The persistent client sends the next request only after the previous one finishes. Timing includes request serialization, Rust frontend forwarding, model work, full response receipt, parsing and validation; evidence writes are outside the timer. Loading is outside this request timer. There is no cross-request reuse of prefix contents.
The fixed protocol used all six three-arm orders twice:
ABC, BCA, CAB, CBA, ACB, BAC, repeated. A is original, B is P18, C is P19. Each of 36 service starts ran one separate feasibility traversal and eight measured traversals, alternating original order and shuffle seed 20261022. This gives 74,844 responses: 66,528 measured and 8,316 feasibility, or 22,176 measured per arm. No observations were excluded. First traversals mix new-shape captures and existing-shape hits and are retained separately, not called pure cold-start latency.All 74,844 historical responses had zero observed probability/ordinal-score error, decision flips or request failures against the frozen original responses; the predefined absolute-error tolerance was 0.001. Parsed responses were equal apart from timing and prefix diagnostics. Graph capture failures: zero. These are empirical checks on the stated inputs, not a universal bitwise-equivalence guarantee.
The six-request regressing group has 576 measured responses per arm. Its mean decreased from 75.96 to 75.22 ms, while its 95th percentile increased in all 12 paired blocks. The approximate 95% paired-block interval for the tail change is +2.32% to +3.70%. The original +2% all-group guard therefore failed; the contributor's later acceptance does not rewrite that result. Four additional 95th-percentile intervals remain inconclusive:
The conditional final synthetic timing stage did not run after the real-workload guard failed. Earlier synthetic qualification and current integration checks do not replace that missing timing stage. P19's overall mean was only 0.095% below P18, with an interval spanning zero; the 43.13% cumulative gain must not be attributed to the final increment.
Historical workload-group results and paired-block observations
Groups use the longest candidate token count in a request. Each unique request was measured 96 times per arm.
Paired-block relative changes (P19 / original minus one; negative is faster). Intervals use the 12 block ratios, Student t with 11 degrees of freedom; they do not treat every repeated request as an independent dataset sample.
Overall mean-change interval: -43.23% to -43.03%. These paired ratios are included for review; they are not the per-request raw response archive.
Historical provenance, controls and evidence availability
Qwen/Qwen3.8-27Brevision1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0plusZefanCai/Open-Jev-27B-v1.1revision28cf73067d5b337860bbef3c85b8b82ba8730956. Merged bfloat16 weights, unchanged 32-bit trained scalar head, temperature2.5343690298472983, maximum supported length 16,384.GPU-46890c79-bf10-5b49-3d4a-a6b78f956122. CUDA 13.0.88, driver 570.133.20, Rust 1.99.1. The library contains native 8.9 and 9.0 code. Other architectures were not executed in the historical campaign.869260649f7dd5b56cac4d91eaae9087f2e985ee,benchmarks/e2e/text.jsonl, pinned upstream corpusf8ce713. Frozen request manifest SHA-2561f1376b99b12a3eca10f9e0726936585c8875e0eccf54de82ab110fd4e21867f; token-shape manifest6b6bb344513e9b3024a37d5df0dc4b1442a77d5e62ccc03f00fad8dcf469c7d5.4ef036988633a4e2750d98a7ec916c67bd585e48039bab1028555ce4d8b76b32; P19 worker2b8ddb4b75ff5a95076c1d6f63c753431e10b3af1f973ed5967e9e9765b93ff3; P19 CUDA library67e445cfe71f13d5331091878d0a71f47defe6242118621cb08e67ac3cefbe1d.6d5eadc2a505e5e93f3d550c23ff70d14084216fa4deafa0a2d795576c6eb0ef; imported benchmark runner931313c3dc51bca9d3520ac2abdb98ec28a3e45d2c016bf402c8e5bac04d8d56. Each archived invocation records its arguments and binary/model hashes. Reproduction usescampaign.py --worker <arm-worker> --library <arm-library> --passes 8 --graphs <0-for-A-or-1-for-B/C> --reference <frozen-original-responses> --out <new-directory>in the declared 12-block order, followed by the frozen comparison/response-audit scripts.L4-fixed-confirmation-evidence.tar.gz(42,738,920 bytes, 964 verified members), SHA-256c2ef5ab2a9a5655386c4f6416514f9df1ae5cd68a74f925d49803c08abde85e2. Earlier failures and qualifications remain archived separately.Merge Danger
Door: two-way. Revert the commit and rebuild the worker/library together; there is no stored-data migration or response-schema migration.
Blast Radius: shared-executor. Open-Jev-27B opts into the optimizations, but its executor and CUDA code are shared with other models. The integration preserves the current bidirectional and fixed/shared-prefix interfaces and tests their affected operators/paths. Complete other-model checkpoint runs are unverified. Larger retained graph/scratch/prefix capacity costs device memory; new shapes still incur capture cost, so graph mode stays opt-in. The measured tail tradeoff and four inconclusive guards remain visible above.
Self-review
Full source review and executed validation are reported above. Keep this PR in draft pending the contributor's own checklist and resolution of the stated review/evidence limitations. Automated source review and local tests do not replace contributor or maintainer review.