Repository navigation
Conversation
38d63aa to
ad76789
Compare
|
Thanks @Maxrio9. Running the looped schedule on the existing qwen3_5 CUDA engine, with one copy of the weights and a delta-net or KV slot per execution, is a clean way in. The plain path reads unchanged:
Before it can land:
|
ea97191 to
8f55e46
Compare
|
Thank you @Maxrio9. The rebase fixes all three apply problems: registry.zig stays at 600 with the mHC set in registry_joins, the controls file keeps both includes, and the gradient-serving pin is updated. Three things still need your side. Please post green zig and zig-b CI on the head you want landed and rerun the Qwen3.8-27B token comparison there, since the current receipt is from the older base. Please run the full unfiltered kernel contract on SM120 and tick or explain each open checklist box. Last, compare your loop_settings/mhc reader with the one in #3859 so both engines accept and refuse the same values, and tell us which reader should be shared.
|
8f55e46 to
0fc4521
Compare
0fc4521 to
c1ec096
Compare
|
Thanks, Synthena, and thanks for the rebase and re-pin. CI on The new head
|
|
I ran I checked the three conflicts against Igor Lessio - AIFLOW LABS |
c1ec096 to
c19ccfe
Compare
…e (ten blank lines fewer) Main's 0ac3062 moved deltaScan out of the engine to keep it under 600 lines, the room ashhart#3723 had made the same way, so the loop schedule's fields and set-up put cuda_engine.zig at 610. Ten blank lines between adjacent Engine members go; no code changes.
… schedule Follows main's f16f9a5 (a launch trace for unread prompt chunks), whose test builds an Engine by hand and runs forward.body: with ashhart#3723 the forward walks e.steps, so the test sets them from its geometry's schedule, one step for its one layer, as Engine.init does.
…oday's main Main re-pinned the reviewed launch sequence for its moved delta scan and MTP's retained-row tap argument (2099ef3b), and ashhart#3723 re-pinned it for its schedule-driven norm add flags (d3b1945b). The merged sequence hashes to 5a19a37c; the two comments become one line.
|
I rechecked On M5 Max with Zig 0.17.0, this passed 524 tests with 2 skips, including the host kernel contract that contains the CUDA 13.4 registry lookup that failed before the join fix: zig build test-qwen35-loop-host test-qwen35-loop-refusal-host test-gradient-serving test-kernel-contract -Dcpu=apple_m1 -j4 --summary allThe full SM120 device contract and Qwen3.8-27B token comparison are still separate release checks. Igor Lessio - AIFLOW LABS |
c19ccfe to
55bf14d
Compare
…e (ten blank lines fewer) Main's 0ac3062 moved deltaScan out of the engine to keep it under 600 lines, the room ashhart#3723 had made the same way, so the loop schedule's fields and set-up put cuda_engine.zig at 610. Ten blank lines between adjacent Engine members go; no code changes.
… schedule Follows main's f16f9a5 (a launch trace for unread prompt chunks), whose test builds an Engine by hand and runs forward.body: with ashhart#3723 the forward walks e.steps, so the test sets them from its geometry's schedule, one step for its one layer, as Engine.init does.
d358d0b to
3397f12
Compare
…e (ten blank lines fewer) Main's 0ac3062 moved deltaScan out of the engine to keep it under 600 lines, the room ashhart#3723 had made the same way, so the loop schedule's fields and set-up put cuda_engine.zig at 610. Ten blank lines between adjacent Engine members go; no code changes.
… schedule Follows main's f16f9a5 (a launch trace for unread prompt chunks), whose test builds an Engine by hand and runs forward.body: with ashhart#3723 the forward walks e.steps, so the test sets them from its geometry's schedule, one step for its one layer, as Engine.init does.
…oday's main Main re-pinned the reviewed launch sequence for its moved delta scan and MTP's retained-row tap argument (2099ef3b), and ashhart#3723 re-pinned it for its schedule-driven norm add flags (d3b1945b). The merged sequence hashes to 29de8240; the two comments become one line.
|
Thank you for integrating the branch and confirming the earlier review fixes. I have ported an FP32 On that local tree, the focused Qwen Loop, refusal, gradient-serving and serving-pin host checks passed: 21/21 build steps, 252 tests passed and 2 skipped. The modified CUDA image also compiled for SM120 with nvcc 13.4. The full mHC contract, unrounded serial-reference comparison and Qwen3.8-27B final-head comparison are still outstanding; the desktop background GPU request was deferred by admission. The ATC issue check also reported incomplete coverage ( |
|
I ran the stored-FP32 serial comparison on the RTX PRO 4500 for the local candidate based on Ten full token sequences matched. The Fibonacci prompt first differs at output offset 16 (zero-based): reference token 449, TensorFold token 3679. Both tokens have the same HF reference log probability, The modified Is this eager serial reference the one you want for the strict gate, or is there a specific serial runner or pinned fixture I should use for the next comparison? |
|
Thank you for publishing the host-KV and snapshot hooks, the mHC launch fingerprint, and the separate nvcc 13.0 records. Static re-review confirms those requests and the two comment shortenings in the integrated head. One numerical blocker remains on supplied head The local FP32 candidate is helpful, but its strict serial comparison still exits nonzero and it is not the supplied head. Please resolve that comparison against the agreed serial runner or fixture without relaxing exactness, then rerun the requested SM120/nvcc 13.0 mHC contract, the FP32-preserving SenseNova serial comparison, and the final-head/current-main Qwen3.8-27B comparison. Final-head CI also needs to be recorded.
|
|
Pushed
Device, RTX PRO 4500 (SM120), driver 620.73.04
Note on current main (not this PR): on this SM120 card, Qwen3.8-27B greedy decoding on
Final-head CI. GitHub has not run CI on
#3867 is restacked onto |
|
Thank you @Maxrio9 for publishing the FP32 correction and the final compiler/device receipts. Static re-review confirms that stored Three source files are still exactly 600 lines. Please remove the blank separators at After integration we still need green final-head CI and an explicit resolution of the default-PDL Qwen comparison. The We will handle the current-main registration, fixture and source-pin integration; no contributor rebase is needed.
|
a4c769e to
b1d414d
Compare
|
Thank you. On the default-PDL Qwen comparison, with
This PR doesn't change PDL selection or any qmmf or glue launch; the only qwen35 kernel change is |
…nsenova_loop Physical layers keep one weight copy; each execution owns its delta-net or KV slot (42 + 14 for SenseNova-Loop-9B). Plain Qwen checkpoints get the identity schedule. Drafting, learning, pockets and stages are refused for loop models. Refs ashhart#3717
… leave) with host reference and contract cases Refs ashhart#3717
Route, plain norm, mixer, merge around both halves of layers 4..27; streams enter at each pass's first layer and leave at its last. FP32 dt_bias rounds to BF16 at load, as the reference holds it. Execution counts are cached in the geometry. Refs ashhart#3717
…the reviewed launch sequence qwen35_learn and the qwen35 GPU test mains pass null loops. kernels.zig registers the qwen35_mhc image. The launch sequence's three norm add flags come from the schedule's decision, main's values on the plain schedule.
Other backends decide their own drafting for this model type.
…iterations and pre_scale Accept loop_settings.use_gate absent or false, ignore unknown loop_settings keys, and no longer require layer_types. Streams 4 parses but is refused at admission, as are fixed_identity and more than 1000 iterations. The route kernel takes the Sinkhorn iteration count and pre_scale (defaults 20 and 1.0, the default path unchanged). A shared case table, zig/tests/fixtures/sensenova_loop_config.json, runs through the CUDA reader and admission.
…al does The route kernel takes pre_scale as an f32. A positive f64 such as 1e-50 passed the reader and the finite check, then ran as 0. Admission now refuses it with UnsupportedSenseNovaMhc, matching ashhart#3859's reader. Two fixture cases: 1e-30 (a normal f32) accepts, 1e-50 is refused at admission.
Follows main's 0ac3062, which moved deltaScan into cuda_forward.zig to keep the engine under 600 lines: the engine keeps that one, and cuda_delta_scan.zig, the same helper moved for the same reason, goes.
…e (ten blank lines fewer) Main's 0ac3062 moved deltaScan out of the engine to keep it under 600 lines, the room ashhart#3723 had made the same way, so the loop schedule's fields and set-up put cuda_engine.zig at 610. Ten blank lines between adjacent Engine members go; no code changes.
… schedule Follows main's f16f9a5 (a launch trace for unread prompt chunks), whose test builds an Engine by hand and runs forward.body: with ashhart#3723 the forward walks e.steps, so the test sets them from its geometry's schedule, one step for its one layer, as Engine.init does.
… blank lines fewer) Main's fceb497 (keep the main scan owner and both prompt fixture lifetimes) left cuda_engine.zig at 600 lines; with the loop schedule and the earlier ten blank lines out, it stood at 604. Four more blank lines between adjacent Engine members go; no code changes.
…oday's main Main re-pinned the reviewed launch sequence for its moved delta scan and MTP's retained-row tap argument (2099ef3b), and ashhart#3723 re-pinned it for its schedule-driven norm add flags (d3b1945b). The merged sequence hashes to 29de8240; the two comments become one line.
The loop loader rounded the checkpoint's FP32 linear_attn.dt_bias to BF16. It now uploads the stored four-byte values unchanged, sizes them at four bytes per value head, and tf_q35_gdn_pre reads them as f32 when the engine serves a loop checkpoint: a + dt_bias and its softplus stay in f32, as in the reference's F.softplus(a.float() + dt_bias). Other Qwen checkpoints and EXL3 keep their BF16 tensor and the unchanged BF16 arithmetic. The rounding regression becomes an exact FP32-bit preservation test. The launch fingerprint now also covers runPdl launches, so gdn_pre's argument list is pinned; qwen35.cu and the fingerprint are re-pinned. Two comments are shortened under 120 columns, and cuda_engine.zig, cuda_geometry.zig and cuda_native.zig each drop a blank separator to stay under 600 lines.
Remove seven blank separators after current main and the amended upstream changes. Keep the kernels.zig serving pin well formed and retain both current-main provenance and the qwen35_mhc registration.
b1d414d to
c028572
Compare
Review status, head
d358d0b17: the requested host-KV and snapshot hooks, mHC launch fingerprint, and separate nvcc 13.0 records are published. The SenseNova loader still rounds checkpoint FP32dt_biasto BF16. Correcting that and rerunning the device and exact-output gates remain open. The earlier vLLM reference also castdt_biasto BF16, so its token comparisons below do not validate preservation of the stored FP32 values. The historical receipts below are labeled with their measured heads and do not qualify the current head.What this changes
SenseNova-Loop-9B (
model_type: sensenova_loop), a looped Qwen3.5-style hybrid, runs on the qwen3_5 CUDA engine in plain BF16, text only:pre_scalecome from the config (release values 20 and 1.0).Plain Qwen checkpoints get the identity schedule.
11a0de0cfatc overlap --json(ATC 0.9.6) on the pre-rebase headea9719156reported no PR conflicts but was not complete (otherPullRequestsLimit,pullFilesUnavailable,timeLimit). I closed the gap by hand with the same test ATC runs:git merge-treeagainst all 191 open PRs that share a file with it (or list more than 100 files), counting only files that conflict with this head and not with main.registry.zig,registry_joins.zig,contract_controls_set.cu,gradient-serving.tsv,profile.zig,cuda_families.zig,cuda_refusal.zig, the build host lists): whichever lands second keeps both entries.TF_QWEN35_CHUNK_SOLO=8192, solo prompt passes for Qwen 3.5/3.6/3.8 #3294, qwen3_5 cuda: a prompt chunk nothing reads stops its last layer at its keys #3060, qwen35: dense BF16 loading and native prompt logprobs #2020 and Qwen3.5-family CUDA: enable dense MTP drafting #3582 conflict in 1 or 2 short hunks each, where this PR's layer loop walkse.stepsinstead ofe.layersandEngine.inittakesloops.dense_serving_test.zig, so whichever of the two lands second recomputes that hash.Commits
80c95606eexecution schedule and per-execution state slots forsensenova_loop09971de2atwo-stream mHC kernels (enter, route, merge, leave) with host reference and contract casese240669bdtwo-stream mHC in thesensenova_loopforward653af6c9fread-cost test passes finish's pending flage547b3515Engine.initcallers passloops; re-pinkernels.zigand the reviewed launch sequence18adcc42aserver refuses--drafterforsensenova_looponly on CUDA17dd3af00config rules shared with Metal; any mHC iterations andpre_scaleb254e74f1register nvcc 13.4 contract recordsc1ec09679refusepre_scalethat rounds to f32 zeroImplementation and historical checks
loop_settingsandmhcare read from the config root and validated as the referenceexecution_plandoes. The schedule carries per-execution delta and attention slots and mHC boundary flags, and--loops 1..4overrides the trained count.loop_settings.use_gateis accepted when absent orfalse;trueis refused, sinceloop_gateisn't loaded.loop_settingskeys are ignored, as the reference does; unknownmhckeys are refused.layer_typesis optional and falls back tofull_attention_interval, as for plain Qwen3.5.mhc.streamsmay be 2 or 4; 4 streams andfixed_identity: trueare refused at admission (UnsupportedSenseNovaMhc).iterationsfrom 1 to 1000 and any finitepre_scale > 0that stays finite and positive in f32 run: both are route-kernel arguments, and the release values take the same path as before.zig/tests/fixtures/sensenova_loop_config.jsonholds 87 cases (30 accept, 52 refused by the reader, 5 refused at admission). They run through the CUDA reader and admission intest-qwen35-loop-hostandtest-cuda-host.lm_head. FP32 routers are uploaded once per physical layer. The vision tower,loop_gateand MTP are skipped and left out of byte accounting.servedefaults to plain decoding.qwen35_mhc.cuwith a CPU reference, a contract runner case per kernel at rows 1–512 (including a 3-iteration route and apre_scale1.75 route), planted controls and launch records.dt_bias(known issue): this head rounds the checkpoint's FP32dt_biasto BF16 at load. The earlier vLLM reference also rounded it, so that comparison does not validate preservation of the checkpoint values. An FP32 correction is required;A_logstays FP32.Not done
Historical checks (not the current head)
c1ec09679on main11a0de0cf. It is the previous headf70b5ca6a(ondffe42485) rebased; the only conflicts were three lines where main renamedmax_rowstogrid_rows, added thelivingimport, and addedcontract_embed_controls.cuhnext tocontract_mhc_controls.cuh.c1ec09679: parity, chat template and tools, resume, Loop-9B concurrency/decode/prefill, Qwen3.8-27B against main11a0de0cf, the host suite and the build. Ran on the previous head (same PR code, maindffe42485): teacher-forced KL, long context, Qwen3.8-27B at 4 streams, and the full kernel contract.c1ec09679: all 9 jobs pass, includingzig,zig-bandzig-windows.11a0de0cf.zig fmt --check,test-kernel-contract,test-gradient-serving,test-qwen-serving-host,test-qwen35-loop-hostandtest-qwen35-loop-refusal-hostpass.zig build native -Dnvcc=<nvcc 13.4> -Dsm=120 -Dnative-fp-decode=truepasses.Receipt
c1ec09679(measured historical head) andc6415563d(the previous head's tree, ondffe42485) where marked, Zig 0.17.0, nvcc 13.4.sensenova/SenseNova-Loop-9Bat revision329a65f7(Apache-2.0).86014ad4), BF16 weights, BF16 KV, greedy, prefix caching off./v1/completions.--context 8192 --parallel 1 --prompt-cache-gib 0.0.32.0rc1.dev100+g77154ca61with [Model] Add SenseNova Loop support vllm-project/vllm#64832, BF16 weights and KV, prefix caching off; reference top-64 plus tail, 219 held-out rows across 6 categories and 94,235 scored positions.qwen35-cuda windowtool and BF16 KV; the server does not report logprobs for this backend. Tool equivalence to server prefill has not been measured.bench_concurrent.py --alone --serial,--context 8192 --parallel 4, 256 tokens, code and chat prompts):--context 16384 --parallel 1. With the prompt cache on, turn 1 keeps one 309 MiB state at 4096 (all 42 delta-net and 14 KV slots), and turn 2 resumes there (cached_tokens4096). Both turns match a server with--prompt-cache-gib 0exactly. A repeated raw-token completion keeps no state, as with every qwen3_5 model: the planned cache only marks chat history boundaries on its 4096-token grid.bench_openai.py, greedy, 256 tokens, no drafts): 25.9 tok/s at one stream on both prompts; about 100 tok/s aggregate (25.2 per stream) at 4 streams.bench_cache.py --require-cold,--prompt-cache-gib 0): median of 4: 0.75 s at 2048 tokens, 3.06 s at 8192, 13.1 s at 32768 (13.0 on the previous head).--context 135168 --parallel 1 --prompt-cache-gib 0, BF16 KV; FP8 KV is refused for this model type): cold TTFT (median of 3 boots) 12.9 s at 32768 tokens, 28.1 s at 65536 and 64.4 s at 131072; decode right after the prompt 24.3, 22.9 and 20.7 tok/s; peak GPU memory 25.7 GB. At--context 229376the model still loads on the 32 GB card: a 221,184-token prompt takes 126.7 s to first token, decodes at 17.9 tok/s and peaks at 30.9 GB.apply_chat_templatefor plain (18), system plus multi-turn (39), thinking on (20), tools (300) and tool result (334). The tools case returnsget_weatherwith{"city":"Berlin"}, and thinking on returns separate reasoning.--context 32768, runs alternated main/head/main/head, main11a0de0cf):bench_concurrent --alone --serialis equal on main and head.--parallel 4on the previous head against maindffe42485(aggregate tok/s, 6 samples per side): greedy code 438.7 / 438.4 (p=0.53), chat 318.7 / 323.6 (p=0.064); sampled code 456.8 / 457.3 (p=0.79), chat 294.3 / 289.9 (p=0.30). Greedy tokens are identical at both widths, and concurrent equals alone.Kernel contract
qwen35_mhc_enter,qwen35_mhc_route,qwen35_mhc_mergeandqwen35_mhc_leave, all new; none replaces an existing kernel.contract_mhc_controls.cuh). All four are red as planted.c6415563d, SM120, nvcc 13.4,zig build kernel-contract -Dsm=120): 719 kernels pass gates 1–4, 0 fail; 433 controls red as planted, 0 missed; 8 known findings and 597 limit problems. Main81de26f64has 710 kernels pass, 429 controls red, the same 8 known findings and 577 limit problems. The live per-launch limit problem set is identical; the extra 20 are static “no compiled usage recorded” entries for 4 new mHC kernels across 5 SMs, of the same kind as 183 on main. Both runs fail on limits.Checklist
loop_schedule_test,loop_geometry_test,cuda_mhc_test, themhc_reftests, theqwen35_loop_config_hostcase table and thecontract_mhccases fail: main has no loop schedule, mHC kernels orsensenova_loopreader. The host tests need no GPU; the contract cases run only underkernel-contract."draft": false(drafts are refused for this model type), a resumed prompt equals a fresh one, and concurrent equals solo.dt_biasto BF16; the maintainer requested preserving FP32 and a new exact-output comparison. Prior reference matches do not establish that property.--drafter, no slower than without it, greedy and sampled. Qwen3.8-27B decode is level with main (Receipt). This model has no main baseline, and--drafteris refused for it.