Repository navigation
Research: port V100/SM70 kernel and runtime optimizations into llama.cpp-fork #9
Description
Delivered: owner-selected Q6 optimization on Qwen 27B and Flash Next
PR #23 is merged and deployed as exact revision c2d2a20df48b261d4ce94a3b14374ce4bfed9282. Both physical source checkouts are clean at that merge, and the installed native/RPC pair has source identity c2d2a20df48b261d4ce94a3b14374ce4bfed9282:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. The package label is final-q6-c2d2a20df4. Exact5423 packages and atomic-install backups are retained for rollback.
The owner explicitly selected this Q6 candidate for deployment, accepting its positive gain below the former5% threshold. This supersedes the earlier no-promotion decision; the statistical limits of the two-pair screen remain unchanged. The published diff is exactly the reviewed pure patch 51b9b224b2ff6d3168b5f6cf91720d5a6018b7c77844bd1cabdb92a018b4f7d5: measured SM70 Q6_K W4 shapes plus the W1 draft head and focused backend fixtures. No Q5 or diagnostic overlay is included.
Evidence and acceptance
- Root and independent source review passed; exact merge tree matches reviewed head46871624. EditorConfig3.0.3, model naming and diff checks passed. Existing100 native/RPC CPU-reference rows and both actual-model route proofs bind the same source tree.
- New immutable native/RPC packages were built from the merge archive; both allocator checks passed. This is an exact-merge release, not an experimental package relabeled after merge.
- Fresh proxy8082 checks passed on BOTH models: each completed HTTP200,8192 new prompt tokens,512 output tokens,cache0, with valid raw SSE and idle slots afterward. Qwen reported481 drafted/350 accepted tokens; Flash587/315. Both running builds reported
b11406-c2d2a20dfand matched installed executable/library hashes before and after requests. - Qwen preserves C400000 (native rounding400128),b2048/ub1024,two slots,Q8KV,MTP3,four V100s and66/66 GPU offload. Flash preserves C266240,b1024/ub768,two slots,Q8KV,MTP3,four V100s plus RPC,49/49 target and50/50 draft offload. Pipeline stayed enabled without fallback. Persisted routes and model files were unchanged.
- Normal unload retired model/RPC processes. Final installed-manifest verification retained the NEW Q6 pair, and the wrapper completed successfully without forced cleanup.
- Graceful shutdown was verified offline at13:10:01UTC on2026-10-04 with fresh6W at13:10:00, no hold and zero active requests. No idle inhibition, Block Load write, alarm reset, route retuning or proxy restart occurred.
See the complete deployment/acceptance report. The first live-check attempt's redundant seed CLI argument was corrected before sending any inference request; its successful rollback/off receipt is preserved in the recovery report. The completed build was reused, without another comparative benchmark campaign.
Performance scope and remaining directions
The accepted descriptive two-pair Q6 screen measured Qwen prose/code/structured +3.81%/+3.75%/+3.51%; Flash +4.55%/-0.97%/+0.89%, with substantial Flash output/run variability. These are not five-pair confidence estimates or a universal gain claim. The new live requests prove bounded operation of the installed release, not additional statistical speed or broad answer-quality claims. Earlier Qwen source-only and MTP2/MTP3 comparisons and historical Flash PR22 gains remain separate evidence.
The source now includes PR23 alongside earlier runtime PR12,17,18,20,21,22; PR13/14 are benchmark tooling. Rejected Q5/MMQ/Q8/HC/graph/getter experiments remain unselected. New GDN, lossless backend repacking, GPU-resident MTP handoff and compute/communication-overlap designs remain unimplemented; this task does not claim all ten ideas were implemented or maximum possible performance was reached.
Status: owner-selected Q6 source, exact paired build, installation, activation, both-model live checks and shutdown are complete. Codex /root is accountable. Remaining work for this delivery: none. Close against the acceptance above.
Earlier comparison, selection decisions and historical acceptance (Q6 non-promotion superseded)
Qwen 27B and Flash Next extension: comparison complete; no new candidate selected
Codex /root completed the bounded extension requested by the owner on 2026-10-04. The installed native/RPC release remains 5423bddf352adc41a8cc59ed02d38a511b333d30, the previously accepted Flash delivery below. The extension did not select, merge or deploy another source change. This is not a claim that all ten ideas were implemented or that no further optimization is possible.
Owner scope and final measurement decision
The owner requested a Qwen 27B comparison, raising MTP from 2 to 3, then evidence-led TG optimization experiments on BOTH Qwen 27B and Flash Next. Preserve model/GGUF quality, Q8 KV, existing P2P/resource ownership and model-specific routes. Flash stays C266240/ub768/b1024, two slots, full five-GPU offload and RPC-first pipeline, MTP3 on CUDA1. Qwen stays C400000/b2048/ub1024, two slots, four native V100s, split31,31,30,8 and MTP3 on CUDA3. No proxy runtime repair or speculative subsystem rewrite was authorized by these experiments.
After two interrupted Q6 measurement attempts, the owner stopped competing work and made jarvis-llm exclusive to this task. During the next run, the owner requested a simpler comparison. Root stopped after two complete alternating pairs per model, before reading speed results. The remaining three blocks of the five-pair plan were not run. Two-pair results below are descriptive; they do not satisfy or claim the old confidence-backed promotion gate. Candidate promotion was not selected, so its prospective finished-answer/context/deployment campaign was not performed.
Power authority is explicit and unchanged: wake only for actual build/load/inference; ALL idle-shutdown inhibition is prohibited, including Keep awake, agent leases, OS inhibitors, timer changes and Block Load writes. After owned remote work, restore the release, unload and gracefully shut down immediately; verify offline and fresh standby power before local analysis. No alarm reset, forced interruption of foreign work or proxy restart occurred. A verified shutdown is a timestamped observation, not a promise that another task cannot wake the host later.
Completed Qwen comparison
Fifteen groups and 45 cold8192+512 samples compare pre-#9 7e0d6c85838868ff5fc3541086f656f1bcdf45d6/MTP2, exact5423/MTP2 and exact5423/MTP3 in five alternating blocks. Independent review and exact paired bootstrap are complete. Source-only TG changes were code +0.006%, prose +0.095%, structured +0.189%: no material Qwen gain from the historical Flash-focused code. MTP3 versus MTP2 was code -3.343%, prose +5.475%, structured +4.204%; it is not a universal improvement because code failed the original nonregression threshold. MTP3 remains the owner-requested setting. Outputs matched within fixtures; fixed 512-token reasoning samples do not establish finished-answer quality. See the complete comparison.
Remaining native experiments and disposition
- Restricted Q6 W4 improved twelve selected operator shapes by 5.55%-20.59% in five pairs with intervals above parity. The Q6 W1 head improved 3.29%, below its standalone 5% target. Their combined pure patch
51b9b224b2ff6d3168b5f6cf91720d5a6018b7c77844bd1cabdb92a018b4f7d5built for native/RPC, passed 100 CPU-reference rows and both untimed model-route proofs. The model screen below did not justify production selection. - Both Q5 W4 row-granularity alternatives were rejected: R4 regressed all thirteen operators; R1 regressed twelve and gained only 2.96% on one. Their numerical references passed. No Q5 candidate is retained.
- HC512's modest operator result did not carry to the Flash model screen (-2.38% to -5.78% TG). HC1024 was neutral. Related BF16-to-F32 expansion was slower on all three measured HC operators and adds about 1.19 GiB; no lossless-repacking implementation is selected, and this does not disprove every possible layout.
- MTP getter reuse was near neutral on Qwen (+0.05%-0.20%) and mixed on Flash (-2.15% to +4.75%). It retains the first barrier, host readback and draft staging; no GPU-resident hidden-state handoff is implemented.
- GDN is already fused where applicable and had a small measured TG-interior contribution; no candidate was justified from that profile. The intrusive operator profiler serializes operations, so it cannot establish natural communication overlap or a rigorous speed ceiling. No transport/overlap rewrite is claimed.
- Historical attention, direct-MMQ and graph dispositions remain below. No rejected family is automatically revived and no empty PR is created.
Final simpler Q6 model screen
Two alternating pairs per model: eight complete groups, 24 measured cold8192+512 requests and eight excluded warmups. Original six valid groups were reused by frozen file hashes; two fresh Flash groups completed under the exclusive run. Earlier invalid/interfered pairs stay excluded. A ninth group was interrupted during a pre-load configuration read and produced no measurements; its KeyboardInterrupt receipt is an intentional stop, not a model failure.
| Model | Prose TG change | Code TG change | Structured TG change |
|---|---|---|---|
| Qwen 27B | +3.81% | +3.75% | +3.51% |
| Flash Next | +4.55% | -0.97% | +0.89% |
These paired geometric changes have no confidence-interval claim. Qwen paired outputs matched. Flash paired outputs differed and structured ratios swung from 0.8829 to 1.1528. PP varied by less than 0.5%. The modest Qwen changes and variable Flash outcome do not justify more repetitions or production promotion from this screen. This is a bounded selection decision, not proof of zero effect or a failed five-pair qualification. See the full descriptive report, which gives token/s medians, artifact identity and exclusions.
Retained release and final state
Exact5423 was restored on both hosts with no forced cleanup. The final owned job verified jarvis-llm offline at 11:50:57 UTC on 2026-10-04, fresh standby power 5 W at 11:50:50, no active requests and no hold. No new source PR, release, route change or Q6 promotion resulted from this screen. Candidate patches and raw receipts are retained locally; they are not installed as the production release.
The original exact5423 acceptance record below remains valid and separate. The bounded extension has a result for both models and a scoped disposition for considered candidates; no additional GPU campaign is scheduled. The original permission to record unsuitable/no-benefit directions without an empty PR applies. Unimplemented GDN, GPU hidden-state handoff and communication-overlap ideas remain unimplemented; this issue makes no universal maximum-performance claim.
Delivered TG result and accepted runtime
The owner's corrected TG-first task is delivered by PR #22, merged as 5423bddf352adc41a8cc59ed02d38a511b333d30. The paired native/RPC packages have this exact source identity with the empty source-diff hash. Both physical checkouts converged cleanly to the merge. The source tree equals the reviewed candidate used for the paired qualification; final deployment used newly built exact-merge packages.
Five alternating baseline/candidate pairs, three frozen cold8192+512 fixtures per pair, through proxy :8082 on the same C266240/ub768 configuration:
| Fixture | Baseline median TG | Candidate median TG | Paired geometric TG change | Paired 95% interval |
|---|---|---|---|---|
| Code | 57.87 token/s | 60.05 token/s | +3.34% | +1.79% to +4.50% |
| Prose | 60.21 token/s | 61.92 token/s | +2.38% | +1.49% to +3.27% |
| Structured | 56.21 token/s | 70.01 token/s | +22.76% | +19.22% to +24.92% |
Structured meets the predeclared >=5% improvement and interval-above-parity gate; all native TG cells pass the 0.97 nonregression gate. Code/prose do not meet the 5% gain threshold. These speed measurements used one active request on a server configured for two slots. Per-actual-verification-step speed improves 4.32%; changed MTP acceptance also contributes to the TG result. The three-family geometric +9.11% result is descriptive, not a replacement primary gate. PP and observed peak VRAM were effectively unchanged.
Client wall/TTFT results are mixed, with prose/structured point nonregression flags below 0.97 and unexplained extra time in the last candidate group. No general client-latency gain is claimed. All 30 measured samples are retained, including the last group whose later configuration GET timed out; the separate temporal recovery and independent review are documented in the qualification handoff.
Final configuration and behavior
The persisted route uses the same IQ3_XXS target and Q4_K_M MTP draft files, Q8_0 target/draft KV, b1024, ub768, C266240 shared pool, two slots, pipeline enabled, RPC-first devices RPC0,CUDA0,CUDA1,CUDA2,CUDA3, split 12,12,6,9,10, draft on CUDA1, and MTP maximum3/minimum1. All 49 target and 50 draft offloadable layers are on GPUs. UUID-qualified selective P2P pairs remain unchanged. The model's per-sequence limit remains 262144; no RoPE extrapolation or maximum-context claim is made.
- Two cold requests: each 116224 prompt + 16384 output tokens, for 265216 total and 1024 shared-pool slack. Both slots were actually generating together at 265029 recorded tokens. Each response contained its own nonce and excluded the other lane's; exact token/finish/MTP checks passed. Long-context per-lane TG was 21.38/21.53 token/s, functional observations rather than a speed comparison.
- One cold request: 233216 prompt + 27904 output = 261120 tokens, with 1024 per-slot slack. Native near-full residency, task continuity and cleanup passed; TG was 31.68 token/s. These request results remain unchanged in the original artifacts.
- Fresh MTP probes observed 21 accepted and nine rejected drafts; cached continuation reused 63 tokens. Cancellation returned both slots to idle, and the following request returned
FOLLOWUP_OK. - Three fresh finished-answer fixtures preserved the baseline's two passing cases and the same failing code case, with all protocol checks passing and no new failure. This is a bounded comparison, not broad semantic equivalence; the timed 512-token qualification samples ended during reasoning.
- A separate long-prefix cache check passed: 72941 cached tokens in a 98304-token prompt, with 512 output tokens. It is one functional sample, not a cached-prefix speed claim. Fresh pre/post binary identity and route checks matched, with no active requests or busy native slots at the end.
Both allocator tests passed; focused numerical reference/fallback tests for the selected BF16 shape passed on V100 and RTX 5060 Ti. The exact-merge native CPU dummy-model recurrent checkpoint/rollback CTest passed 2/2. The live MTP probes do not establish Flash GPU checkpoint/rollback equivalence.
Telemetry recovery, deployment and evidence
The first outer final driver rolled back after an RPC SSH sampling timeout during prompt preparation. The one-slot request itself passed. The timeout and its recovery completed before the prompt file was written, which precedes request submission; the request window contains 3336 native and 3341 RPC valid VRAM samples with zero errors. Observed peaks were 15222 MiB on the busiest native GPU and 14867 MiB on RPC. The original failed receipt is unchanged. A separate hash-bound recovery reused the passed model runs, followed by fresh activation/MTP/quality/identity checks; no request or timing sample was dropped or replaced. See the recovery checkpoint.
The final matched pair is installed in the persistent launch location and activated through the normal model lifecycle. Installers verified the old fork processes were absent before exchanging packages; final host/RPC identities match the merge. Source convergence, build, activation and behavior checks are separate recorded stages. This backend deployment did not restart the proxy. The earlier exceptional proxy recovery hard restarts were performed under the owner's separate authorization and are recorded in their original comments; they are not claimed as safe deployment jobs.
All task-owned idle leases are released and read back inactive. The previous c7 pair and configuration remain available for normal rollback. Final local evidence is retained under /home/jarvis/.codex/artifacts/flash9-20261003/: bf16-tg-qualification-analysis/, the original final-tg-acceptance/, final-nearfull-recovery/, final-tg-acceptance-resumed/, final-long-cache-acceptance/, source convergence and immutable build receipts. The final recovered acceptance receipt hash is 483deaf39b56bc3f44e82a9ba0f3c667707a46cce89fe8cf95777dcaca208678; the long-cache receipt hash is 003aa4fda8869fefeb4966b3fab584005caea5fe44a1cfaac5b9b29e76ae4694.
The owner's current TG, >=200k, ub768, two-slot, full-offload and pipeline requirements are met. The older PP target/maximum-context campaign is superseded, not silently counted as achieved. No additional source work is pending for this selected TG delivery; unselected/unmeasured possibilities are listed below without an exhaustive-optimization claim.
Outcome of the considered families
The owner's later TG correction supersedes the earlier PP target and maximum-context sweep. C266240/ub768 is the selected >=200k configuration; it is not a claim that the hardware's maximum possible context was found. The earlier long-cached-prefix PP speed campaign is not part of the TG gain claim. The final combined checks cover long cold one-/two-slot execution plus bounded MTP cache/cancellation and finished answers.
| Family | Outcome and limits |
|---|---|
| Small-query direct-Q8 attention | The tested vector reroute lost all five-pair operator cells and was rejected. This does not rule out every possible Q8 design. |
| Long-KV attention and work partitioning | PR #18 repairs the Volta tile floor; PR #21 retains a guarded sparse path. Five operator pairs show gains for selected sparse Q8 regions, with full-query fallback controls near parity. A separate 70000-token cold proxy trace proved actual sparse launches on all four V100s (QW326/1020) in the instrumented 109ab654 candidate. These are operator gains and runtime-hit evidence, not an end-to-end TG or cached-prefix speed claim on the final package. |
| Quantized small-batch reuse | The explicit Q5_K W4 candidate passed references but was about 2% slower at the actual projection shape. Existing MMVQ handles the observed geometry. The Q6_K row4 prototype remains unbuilt and unselected. |
| PP dequantization/GEMM | Broad direct-MMQ improved PP but lost 7.69% structured TG in five pairs; the narrower gate/up screen also lost code TG. Both were rejected. |
| Backend repacking | No new repacking was selected; the proposed persistent HC expansion carried additional memory cost without a demonstrated TG benefit. PR #22 retains BF16 storage. |
| GDN | The existing path remains unchanged. The intrusive operator profile made it a lower-priority contributor; that profile is not a rigorous end-to-end speed ceiling. |
| CUDA Graphs | Private diagnostic capture/replay was demonstrated on all four native GPUs. The separate uninstrumented screen was mixed and approximately 1% slower per actual verification step, so no production graph-enable change was selected. |
| MTP hidden-state handoff | No handoff optimization demonstrated a matched TG gain. Existing semantics are checked separately; no new handoff implementation is claimed. |
| GPU communication overlap | Existing RPC-first placement/full-offload/pipeline behavior is retained. Configuration screens and an intrusive profile do not establish a communication-overlap speedup; no new overlap implementation was selected. |
| BF16 MMVF launch selection | PR #22 is the selected TG optimization: exact SM70/BF16/K320/M10240/W4 launch shape, existing arithmetic kernel, no repacking. Five paired whole-model samples per family show structured +22.76%, code +3.34%, prose +2.38%. Only structured meets the >=5% gain criterion; all three native TG cells pass nonregression. |
PR #17's head-at-a-time QSA scores reduce the measured standalone scratch graph from 256 MiB to 64 MiB; its paired throughput results are neutral. PR #20 preserves pipeline feasibility with scheduler reservation fallback. PR #12 is the dense-MTP startup prerequisite. These memory/correctness changes are not additional TG speed claims. Unselected Q6 row4 and HC-inject prototypes, as well as larger MTP/communication designs, remain unmeasured possibilities; this task does not claim an exhaustive search.
Acceptance record
- Five paired frozen-workload TG measurements, numerical/fallback tests and independent review are recorded.
- Each considered family has a scoped disposition; operator/memory/correctness results are separate from TG speed claims.
- Reviewed PRs and exact native/RPC artifacts are merged, converged and activated.
- Fixed ub768/C266240, pipeline, full-offload and one-/two-slot near-full behavior are verified.
- MTP, short and long cache, cancellation/follow-up and bounded finished-answer checks are complete.
- Final source identity, persisted route, idle slots, retained rollback and private lease release are verified.
Earlier status snapshots, owner decisions and research (historical; current outcome is above)
Current delivery status (2026-10-04 local)
PR #22 is merged as 5423bddf352adc41a8cc59ed02d38a511b333d30. Its eight-line BF16 MMVF launch-selection change has five paired native TG results on the fixed workload: structured +22.76% (paired 95% interval +19.22% to +24.92%), code +3.34%, prose +2.38%. Structured meets the predeclared 5% gain gate and all TG cells pass nonregression. The within-pair three-family geometric result is +9.11%, descriptive only. Per-verification-step speed improves 4.32%; accepted draft-token differences also contribute. PP and peak VRAM remain effectively unchanged. The qualification report records all five pairs and the independent recovery of the final post-measurement configuration-read timeout without dropping or replacing samples.
Client wall/TTFT metrics are mixed and their prose/structured 0.97 point flags fail; the last candidate group has unexplained extra time outside native PP+TG. No general client-latency gain is claimed. Timing samples stop during reasoning. Three separate finished-answer fixtures give 2/3 on both arms, retaining the same pre-existing code-comprehension failure; they establish no new failing case, not broad semantic equivalence.
Both physical fork checkouts are clean at the merge. The exact native/RPC packages are built and now activated, with both source identities verified, full 49/49 target and 50/50 draft GPU offload, pipeline enabled, two slots, C266240 and ub768. Focused allocator checks on both hosts and the CPU dummy-model recurrent checkpoint/rollback regression pass. See the build report and live acceptance status.
Acceptance is still running; this issue remains open. The final two-slot check uses two distinct 116224-token cold prompts and 16384 output tokens per lane (1024 shared-pool tokens of planned slack). It will be followed by one-slot 233216+27904 generation, MTP/cache/cancellation/isolation and final identity/configuration checks. Actual two-slot overlap is already observed, but full generation is not yet complete. Codex /root owns this sequence and one renewable private idle lease. The c7 native/RPC package is retained for normal failure rollback; the lease is released on completion/failure. No proxy source change or proxy restart is involved.
Owner correction and retained constraints: TG is the objective (2026-10-03)
The owner explicitly corrected Codex: this issue was created to optimize token generation (TG), not prompt processing (PP). The earlier PP-led interpretation and 1000-PP target are superseded. Codex acknowledges the mis-prioritization; prior PP experiments remain historical evidence and are not completion of this issue.
Current operating constraints remain: ub=768, context at least 200k, target pipeline parallelism enabled, two slots, all offloadable target/draft layers on the five GPUs, the same target/draft weights, Q8 KV and MTP max3/min1, and safe selective P2P. Stop further PP optimization and maximum-context sweeps. Freeze a safe >=200k configuration for TG comparisons; validate its final context behavior as a delivery check rather than a separate capacity-optimization campaign.
The live/restoration configuration is the matched merged pair c7de202dfd9551c4a7ad3eef666789dcdb0bbf0d, C266240/ub768, RPC-first split 12,12,6,9,10, draft CUDA1. A frozen cold8k+512 initial screen measured TG 68.046, 79.887 and 79.705 token/s; the lower first request also had different MTP acceptance (346/492 versus 367/429 and 366/432), so investigate the stored continuations and slot/state evidence instead of calling this pure warmup latency. No new TG gain is established yet.
TG work now prioritizes measured decode/verification bottlenecks: small-query Q8 attention, existing quantized small-batch reuse versus actual gaps, native CUDA Graph eligibility/stability, draft placement, and MTP synchronization/communication where critical-path evidence supports a change. PP is only an incidental regression/operability measurement. Use identical frozen work and at least five alternating pairs for any TG gain claim; preserve correctness, rollback, cancellation and slot isolation. The known PP+25% MMQ candidate remains rejected because it regressed TG.
The ub1024 near-full trial was cancelled on the ub768 instruction. The subsequent ub768 context sweep was also stopped on the TG correction, after letting the active operation finish; C282624 and C299008 short requests passed, C315392 reached startup only. Neither is a final near-full capacity claim. Normal restoration to C266240/ub768 completed and the task-owned idle lease was released. Continue TG diagnosis/implementation; issue #9 remains open.
Prior plan and completed work record (superseded by the TG correction above)
The owner explicitly approved implementation of the Flash Next plan in Codex on 2026-10-03, including source changes, separate PRs per beneficial optimization type, review, merge, paired native/RPC build and deployment, real benchmark acceptance through llama-proxy :8082, and persistent winning route configuration. This supersedes the earlier research-only boundary and the Qwen 27B/direct-server/no-RPC workload below and in prior comments. The original research remains useful historical evidence; its simulation is not a native speed result.
Workload and decisions
- Mandatory owner clarification during implementation: target pipeline parallelism must stay enabled; allocation fallback to pipeline-off is not acceptable. Maximize context only among pipeline-enabled configurations.
- Owner minimum added during implementation (2026-10-03): the final shared context pool
-cmust be at least 200,000 tokens. Smaller contexts are measurement fixtures only, not acceptable final delivery. Retain the existing two-slot, pipeline-on, full-GPU-offload and ub PP-tolerance requirements; do not silently relax one to satisfy another. - Exact existing
Qwen3.8-Flash-NextIQ3_XXS target GGUF, Q8_0 KV, two slots with the existing unified KV pool, b=1024, and the existing Q4_K_M MTP draft (maximum 3, minimum 1). Do not change model weights, quantization, public API or GGUF format. Target/draft hashes, tensor types and actual shapes must be verified; an older Flash artifact reports D256/GQA12 rather than the research workload's GQA6. - Four local V100-SXM2-16GB GPUs plus the configured RPC RTX 5060 Ti. Preserve UUID-qualified selective NVLink P2P; never enable unsafe all-pairs P2P. The owner permits moving the same MTP draft between RPC0 and a V100 if measured capacity or speed benefits.
- The former cold-PP target is superseded by the TG correction above. Measure TG on frozen representative prompts and final one-/two-slot behavior; do not restart a PP-led campaign.
- Latest owner choice (2026-10-03): use ub=768 to balance VRAM and PP speed. This supersedes the earlier ub512/1024 selection rule. Measure its resulting speed and maximize stable context with ub768 fixed; do not change the owner's choice based on the earlier 5% comparison gate.
-cis a shared pool, not two independent reservations. Respect the model's actual per-sequence context support. - Use measured per-device weights/KV/recurrent/draft/scratch memory to select placements, including one-layer boundary shifts. The previous maximum-context search is stopped; preserve at least 200k and validate the final chosen configuration. All offloadable main/output layers must remain on the five GPUs, with no silent fit reduction or CPU fallback used to claim success.
Implementation and qualification
Profile the actual Flash workload, then evaluate independently: small-query Q8 attention, PP Q8 attention, live-KV partitioning, quantized small-batch weight reuse, tiled dequantization plus PP GEMM, lossless backend weight repacking, GDN, graph stability, MTP hidden-state handoff, and communication overlap. Give each beneficial independent type a separate issue-linked PR. Record ineligible/neutral/losing candidates rather than creating empty PRs. Attention comes first; subsequent priority follows measured cost. Reuse existing kernels/state/transport mechanisms with shape-qualified fallbacks and bounded scratch.
Establish current-source baseline and A/A variability, then alternating A/B with identical work, three frozen fixture families and at least five paired repetitions for every claimed performance cell. Native operator tests/reference checks and relevant server/state tests cover mask/stride/tails, actual PP/MTP shapes, numerical safety, speculative rejection/rollback, checkpoint, cancellation and sequence isolation. Performance samples are unprofiled and report processed/reused tokens, real emitted tokens, PP/TG/TTFT/total time, MTP acceptance and each GPU's peak VRAM. Speed acceptance retains >=5% gain with a 95% paired interval above parity and no required unaffected cell >3% slower. Capacity gains are reported separately under the owner's PP tolerance. Recheck the combined final binary and near-full-context generation, not just startup.
Operations and current blocker
Source editing, fixture preparation and analysis run locally on jarvis. Wake jarvis-llm only for actual remote commands/builds/tests. One coordinator owns a private agent wake token, renews only while remote work runs, and releases/verifies it immediately on return to local work, waiting, handoff or exit. This is explicit owner authorization for that bounded hold, not permission to change the saved idle setting or another hold.
The initial host-power admission blocker was cleared under the owner's later explicit exceptional proxy hard-restart authority; those recovery actions and old-process retirement are recorded in the comments and are distinct from safe deployment or a runtime repair. No alarm-reset API was used. The independent proxy ggml-org#384 task deployed its own repair; the subsequently observed logged-in-user poweroff refusal is recorded separately in novkien/llama-proxy#547 and has no repair authority in this fork task. Current GPU builds and proxy inference are unblocked, and owned idle leases are released after each actual operation.
Current progress (2026-10-03)
- Baseline artifact inventory, matched native/RPC packages, intrusive profiling, A/A calibration and frozen proxy benchmark support are complete. Benchmark runner PRs #13 and #14 are merged.
- Dense-MTP startup prerequisite #12 is merged and verified on its exact deployed pair; qwen4exp: dense MTP layer aborts on unused QSA pool input #11 is closed. The QSA scratch reduction #17 and Volta attention tile repair #18 are merged, producing current source base
109ab6544090ba9922496c8ca4b34fe6751120ca. Final combined deployment and cuda: SM70 Flash Attention selects an unsupported tile for eight-query GQA12 #15 acceptance remain in this task. - QSA head-at-a-time scores reduced the standalone graph buffer from 256 MiB to 64 MiB in the measured large fixture. Its five paired three-family cold8k campaign is throughput-neutral (PP ratios 0.9951-1.0017, TG 0.9935-1.0053). An earlier actual c200704/ub1024 screen keeps all main/draft layers on GPU and pipeline enabled with four copies. Near-full-pool acceptance and maximum-context selection remain outstanding.
- Existing direct-Q8 vector attention lost all five-pair operator cells and is rejected. Broad direct-MMQ gained 25-27% PP but failed structured TG by 7.69% in five pairs (full report). A gate/up-only screen also shows an adverse code TG cell (screen report); neither MMQ variant is selected for publication under the unchanged gate.
- Scheduler reservation fallback #20 and guarded Volta sparse attention #21 are merged. The exact combined native/RPC pair is built from
c7de202dfd9551c4a7ad3eef666789dcdb0bbf0dwith an empty source diff; focused allocator tests and all three original GGUF SHA256 checks pass. Functional source matches the previously tested combined candidate (the only difference is one explanatory comment). Final activation/behavior acceptance is still in progress. - UB selection is complete: at identical C266240/RPC-first
12,12,6,9,10/draft-CUDA1 configuration, three cold8k samples gave median PP 507.717 at ub1024 versus 429.165 at ub512 (15.47% loss). That earlier ub1024 selection is superseded by the owner's explicit ub768 choice. These medians remain configuration-screen evidence, not statistical gain claims. - Moving the draft to CUDA2 and using RPC-first split
11,12,10,6,10passed the C282624 short screen; C299008 then failed with CUDA OOM and completed normal managed model cleanup/restore. This is a short-request bracket for that placement, not a near-full capacity claim. No idle hold remains between remote jobs. - On the exact merged pair, the current near-full trial uses C266240, split
12,12,6,9,10, draft CUDA1, all 49 target/50 draft layers on GPU and pipeline enabled. Both slots are actually busy with distinct 116224-token cold prompts and 16384 output tokens requested per lane, targeting 1024 tokens of shared-pool slack. This ub1024 trial was cancelled when the owner selected ub768. Only the two task-owned requests were disconnected; normal restore completed, proxy request count returned to zero, and the owned hold was released. It is not a capacity pass or failure. The exact merged pair is now being screened at C266240/ub768 with the same split/draft; near-full capacity must be qualified again under768. Long cached-prefix end-to-end sparse qualification, final one-slot capacity, cancellation/continuation and the combined proxy matrix remain with the root task. No whole-model sparse speed gain or maximum stable context is yet claimed. - Separate confirmed issues cuda: long unmasked F16 attention exceeds CPU-reference tolerance #16 (synthetic unmasked F16 attention tolerance), cuda: quantized MUL_MAT_ID aborts on explicit F16 source precision #19 (explicit F16 MMQ source hint), and novkien/llama-proxy#549 (phase wait; cause unknown) are recorded without claiming repair or blocking unrelated authorized work.
Accountable implementation and acceptance
Codex task /root is coordinator/acceptance owner. Source base verified as master 7e0d6c85838868ff5fc3541086f656f1bcdf45d6; capture actual deployed binary manifests separately. Isolated local worktrees use codex/flash9-* branches. Worker ownership is bounded by source area; the main agent authors maintained instructions/docs and reviews all candidates before publication.
- Current-artifact metadata, matched native/RPC build manifests, baseline settings and A/A are recorded.
- Each retained optimization has focused numerical/state tests, actual route-hit evidence and an independently attributable A/B result.
- Every considered family has a supported outcome; neutral/ineligible/failed work is not mislabeled as a gain.
- Separate reviewed PRs are published/merged and exact paired artifacts activated through the existing model lifecycle.
- ub/placement/context selection passes full five-GPU offload and near-full-pool generation with two-slot coverage.
- Final combined build and persisted route pass proxy :8082 acceptance; report TG and its paired evidence against the baseline.
- Evidence and rollback artifacts are retained; all task wake leases are released and verified.
Historical research and source evidence (superseded workload/authority)
Goal and delivery boundary
Improve novkien/llama.cpp-fork itself by adapting applicable V100/SM70 kernel and runtime architecture ideas from V100-focused repositories. Keep native llama.cpp, GGUF, the dashboard/proxy integration and existing model behavior. The owner explicitly clarified that the research is for optimizing this fork, then requested this issue before implementation in Codex on 2026-10-01.
This is a feature/research preparation issue, not a confirmed correctness bug. Issue creation and source investigation are authorized; a production implementation or undeployed runtime patch still requires the owner's approval of a concrete scope. Do not replace the engine with vLLM/NInfer, change model/quantization or tune unrelated launch settings under this issue.
Current source, hardware and evidence
Verified fork master: e58b770f3c2346deab036d9e4c3b2ea61ca0bbc5. The physical GPU-host checkout remains at 95e656597..., while its built runtime and inspected origin/master identify e58b770f3...; do not use physical HEAD as the deployed revision.
Target: four Tesla V100-SXM2-16GB GPUs, Qwen3.8-27B UD-Q5_K_XL GGUF, Q8_0 K/V, b=2048, ub=1024, 20 threads, four native slots, layer split 31/31/30/8, native MTP draft maximum 2. Live model metadata confirms architecture qwen35, 24 query heads, four KV heads (GQA ratio 6), and K/V head dimensions 256.
Fresh nvidia-smi topo -m shows NV6 links for physical GPU0-GPU2 and GPU1-GPU3; other links traverse PCIe. Preserve the selective peer-access contract from #3/PR #4. CUDA ordinals depend on the launch's UUID order: do not substitute physical ordinals into its P2P-pair setting.
The issue #5 research result completed 12 actual target-engine GPU runs with fixed settings and synthetic 8192+32768-token prompts, both slot orders, three repeats each. Median total PP was 42.5830 s concurrent and 42.25655 s serial: about 0.77% difference. This motivates examining kernel/dataflow bottlenecks; it does not prove a particular kernel is slow. A separate MTP-prefill harness ran out of memory on device 3 and has no valid timing result. That experimental failure is not evidence of a production defect.
The current backend already implements Volta m8n8k4 MMA, FlashAttention, CUDA graph capture/replay, GDN CUDA kernels and all-reduce. The research is about better eligible shapes, data reuse, memory layout and transfer scheduling, not adding these features from zero.
Candidate techniques and applicability
1. Volta D256/GQA6 attention for long-prefix PP
Sources: 1Cat SM70 Split-D/N32 design, GQA-packed QK/PV architecture PR #286, and mistrjirka's SM70 attention dispatcher.
Mechanism: pack the six query heads sharing a KV head into useful Volta Tensor-Core work; use D256-specific operand ownership, software/register prefetch, reduced shared-memory permutation/transpose work, and bounded split-KV partials with online softmax. Select the route by actual shapes/strides/dtypes rather than model names.
Fork fit: the live D256/GQA6 geometry matches the architectural motivation. Current Volta dispatch uses power-of-two GQA groups; the specialized six-head packing is a candidate delta. Integrate through native FLASH_ATTN_EXT and preserve GGUF/Q8_0 KV.
Limits: 1Cat's accepted routes use particular FP16 KV layouts and query lengths, while this host uses Q8_0 KV and ub=1024. Its 750 MiB score-workspace architecture cannot be copied indiscriminately onto nearly full 16GB cards. Adapt and bound workspace, retain supported fallback paths, and validate online-softmax/reduction precision. Reported operator speedups are not whole-model speedups. mistrjirka's +47.45% PP result is a cached 100k-prefix + 1k-suffix case on different hardware/settings, not our cold PP measurement.
2. Small-query Q8_0 KV attention for MTP verification
Source: mistrjirka fattn-q8-volta.cuh.
Mechanism: keep persistent KV in ordinary llama.cpp Q8_0, widen only each small loaded tile into FP16 shared memory, and consume it with Volta MMA. Reuse K/V across the verification queries/GQA heads instead of repeatedly loading them through a less suitable small-query path.
Fork fit: a close GGUF/native-tensor adaptation; the current fork has no BEST_FATTN_KERNEL_VOLTA_Q8_W4 specialization.
Limits: the external dispatch is explicitly W=4, D=256, GQA6, one sequence, with additional layout/mask constraints. Our current maximum draft count 2 produces up to three verification tokens per slot, and multiple slots add different shapes. Do not change draft depth merely to make the imported kernel eligible. Qualify current three-token and multi-slot shapes or retain the existing route. The cited kernel includes reduced-precision intermediate partials; copied code is not automatically numerically equivalent.
3. Reuse quantized weights across small verification/decode batches
Sources: mistrjirka Q5_K/Q6_K four-column MMVQ specializations, v100-skinny QPN kernels, and NInfer-V100.
Mechanism: decode a quantized weight block once and reuse it for several token rows; arrange register fragments around Volta's eight-row tensor instruction and avoid a persistent full-FP16 weight copy. Compare custom small-matrix kernels with the existing MMVQ/cuBLAS dispatch.
Fork fit: Q5_K/Q6_K specializations are the closest native GGUF candidates. Identify actual tensor types and row counts in the owner's quant, including the three-token MTP geometry, before selecting a kernel.
Limits: QPN2/QPN8 handle NVFP4/FP8 encodings, not GGUF Q5_K. Their dataflow may inform a GGUF implementation; their decoder/prepack code is not a drop-in replacement and changing the model representation is outside scope. Do not globally force MMQ or FP16 accumulation. Current Volta FP32 accumulation is deliberate, and generic Tensor-Core support already exists.
4. Keep MTP/GDN transfer and state work on GPU where useful
Sources: v100-skinny GDN fast path and NInfer's device-state/graph execution architecture.
Current source evidence: MTP process() consumes nextn embeddings and copies rows into host verify_h/pending_h vectors. llama_get_embeddings_nextn*() synchronizes the target context. This establishes a transfer/sync path, not its share of total runtime.
Proposal: profile the dependency chain; investigate a device-resident hidden-state handoff, GPU-side state/index handling and graph-safe reuse if they remove critical-path host round trips. Reuse existing GDN kernels and rollback snapshots rather than add a second state manager.
Limits: Torch boolean-index fixes cannot be transplanted into ggml verbatim. Preserve accepted-prefix semantics, speculative rejection/rollback, per-sequence isolation, cancellation, checkpoints and buffer lifetime. Capture/replay already exists; the desired change must eliminate a demonstrated gap beyond the current graphs.
5. Topology-aware multi-GPU execution and communication overlap
Sources: 1Cat's tensor-parallel/native-MTP paths, mistrjirka all-reduce, and the existing fork's multi-GPU contract.
Mechanism: distribute useful work within a layer across GPUs when beneficial, overlap transfers/reductions with independent work, and exploit fast intra-NVLink-pair paths with correct inter-pair transfer fallback. Higher instantaneous GPU utilization is not itself the acceptance metric; reduced complete PP/TG time is.
Fork fit/limits: the current layer split and two NVLink islands justify measuring pipeline/communication gaps. Native tensor mode is already experimental and explicitly does not support quantized KV. Therefore retaining this owner's Q8_0 KV may require a substantial meta-device/cache-layout extension, not a launch-flag change. Profile the actual model/transport first. Never enable all-pairs P2P, bypass #3's unsafe-PCIe protections or assume the four cards form one NVLink mesh.
Suggested research order
- Profile the existing GGUF workload: attention, quantized projection/cuBLAS, GDN, draft catch-up, transfer/sync, graph gaps and peak workspace. Identify actual shapes and source dispatch.
- Evaluate the closest native SM70 attention and quantized small-batch deltas first, with bounded eligibility and current fallback paths.
- Use the measured remaining bottleneck to decide whether GPU-resident MTP dataflow is worthwhile.
- Treat topology-aware tensor/quantized-KV work as a separate larger design if communication/parallelism evidence warrants it.
This ordering is a proposal for owner review, not implementation permission or a promise that every candidate will help.
Validation and acceptance for an approved candidate
- Record the precise candidate, source provenance/license obligations, eligible shapes, memory budget, expected benefit and approved implementation boundary.
- Use maintained native tests plus disposable kernel/full-model fixtures; preserve GGUF/model weights and the fixed hardware/runtime settings in each control/candidate pair.
- Prove selected kernel/dataflow hits, not only that the model starts. Test unsupported shapes/layouts and current native fallbacks.
- Measure synchronized operator timing and unprofiled complete-model PP/TG separately, with warmups and shuffled/alternating repeated runs. Include cold PP and cached-prefix suffix PP, one/two slots and actual MTP=2. No unrelated config sweep.
- Predeclare numerical/quality checks: finite results, appropriate operator/reference error bounds, deterministic output comparisons where applicable, and representative sampled/task-quality checks. Preserve causal masks, KV/state isolation, checkpoint restore, cancellation and speculative acceptance/rollback.
- Stay within the four 16GB cards including weights, recurrent state, target/draft contexts and scratch. A microbenchmark requiring memory unavailable in the real engine is not acceptance.
- Select a candidate only after complete-model benefit exceeds run variability; reject neutral/regressing paths and keep their evidence.
- Implementation publication/deployment/live acceptance remains governed by the subsequently approved fork-specific scope.
Search, status and next action
Searched all current/historical fork issues and PRs by SM70/V100, CUDA kernels, attention, MTP and multi-GPU scope. #5 owns phase exclusion; #3/PR #4 own completed selective P2P; #6 owns a different Nex DFlash/image defect; #1 owns RAM cache retention. None owns this kernel/runtime-port research. Link #5 for baseline evidence and preserve #3's transport boundary.
Status: research issue prepared by Codex; no production source mutation or implementing claim. External source snapshots inspected: mistrjirka e62f86f96cafaa10dde027404b9dd5a45cbb6899, 1Cat d30469863287471a7082842500ae73299a697e0d, v100-skinny 5b589c0dc81223e0ba65bcb3e755874723f8b515. External speed figures remain repository reports, not verified gains on this host.
Next: the owner reviews the candidate families and chooses/approves a bounded investigation/implementation scope. Before writing runtime code, recheck current fork source, profile the selected path and resolve its eligibility/numerical/memory contract. Keep this issue open until the owner-approved endpoint has evidence; issue creation is not completion of an optimization.
Activity
novkien commentedon Oct 1, 2026
Nghiên cứu bổ sung V100/SM70: kỹ thuật có thể chuyển vào llama.cpp-fork, phần đã có và kế hoạch kiểm chứng
Ngày rà soát: 2026-10-01. Đã đọc issue, kiểm tra lại
master = e58b770f3c2346deab036d9e4c3b2ea61ca0bbc5, đối chiếu các đoạn CUDA/graph liên quan với tài liệu thiết kế, mã nguồn được dẫn và PR của các dự án tối ưu V100.Kết luận: còn nhiều cơ hội ngoài năm nhóm trong body, nhưng phần đáng chuyển là dataflow, layout và lựa chọn kernel theo shape, không phải thay engine hoặc bê nguyên kernel FP8/NVFP4 sang Q5_K. Những bổ sung có giá trị nhất là: backend-only weight repacking; GEMM tuning tách khỏi layout; fused/tiled dequantization cho prefill; tối ưu việc đọc/chuyển đổi KV; phân vùng attention theo KV đang sống; ổn định CUDA Graph; và tối ưu đúng đường GDN đang được dispatch.
Giới hạn bằng chứng: đây là nghiên cứu nguồn và thiết kế tích hợp. Không có benchmark GPU mới trên máy chủ trong lượt nghiên cứu này; không sửa runtime, đổi cấu hình, deploy hay xác nhận mức tăng tok/s. Những con số từ donor bên dưới là tác giả donor báo cáo, không phải kết quả của fork này.
1. Baseline và những điều không được suy diễn sai
Giữ nguyên baseline của issue: 4x V100-SXM2-16GB, GGUF UD-Q5_K_XL, K/V Q8_0, architecture
qwen35, D256/GQA6,b=2048,ub=1024, 4 slots, layer split hiện tại và MTP tối đa 2 draft. Mỗi slot có thể cần xác minh tối đa 3 token; tổng số row của GEMM phải lấy từ trace thực tế, không đồng nhất số slot với query length của attention.Đọc lại code cho thấy:
delta-net-base.cppđã có cả fused và chunked graph; chọn theofused_gdn_ar/ch. Chunking GDN thường dùng CS=64; KDA có nhánh riêng. F4attn_normvới ba nhánh, tổ chức concurrency và bảo vệ lifetime. F5turing_mma_available. F6Qwen35 còn chứa các loại layer khác nhau; tối ưu D256 full attention không đồng nghĩa tối ưu toàn bộ mạng. Cần cộng thời gian từng nhóm layer/operator trước khi chọn việc. F7
2. Donor nào đáng học và học phần nào?
zhinianqin/marlin_v100PackedMacroNkhỏiCTA_N. Snapshot kiểm tra:3f16d442cdb4c24dd225bbec196c982a54d9a31c. S1, S2dnv2003/v100-skinnygeoffwatts/ninfer-v100b37d0dd3e1163b9d802d8bccfa89918bf68d793e. S51CatAI/1Cat-vLLMmistrjirka/llama.cppai-bond/flash-attention-v100Không tính các fork NInfer có cùng phần kế thừa là nhiều bằng chứng benchmark độc lập. NInfer cũng ghi rõ một đường long causal prefill dùng kernel FlashAttention MMA lấy từ llama.cpp: phần này có thể là vòng quay mã nguồn, không phải phát minh mới để “port ngược”. S5
3. Các hướng bổ sung chi tiết
A. Offline shape tuning và dispatch riêng SM70 — ưu tiên P0/P1
Kỹ thuật donor: Marlin V100 mô tả geometry gồm
CTA_M, CTA_N, CTA_K, Warps, WarpM, WarpN, WarpK, cùng split-K và lựa chọn cách cache metadata. Có cả kiểm tra phân rã warp lẫn contract iterator/epilogue; tổ hợp đúng số học vẫn có thể không hợp lệ với layout. FasterTransformer dùng bước tìm GEMM config trước khi chạy. S2, S12Thiết kế đề xuất:
ne[],nb[], GPU, GEMM M/N/K, số sequence, query width, live KV, kernel/nhánh được chọn, conversion bytes, scratch peak.UD-Q5_K_XLlà tên gói model, không đủ để kết luận mọi tensor là Q5_K.Vị trí:
ggml-cuda.cumatmul dispatch,mmvq.cu,mmq.cu/helpers liên quan, test/benchmark backend hiện có.Điều kiện thành công: bảng tuning phải giúp các shape có trọng số thời gian đáng kể, không chỉ chọn shape đẹp. Bao gồm chi phí conversion, reduction và workspace trong thời gian op. Nếu kernel chỉ nhanh khi loại bỏ conversion khỏi phép đo thì chưa đạt.
B. Lossless backend-only weight repacking — ưu tiên P2, có thể có lợi lớn nhưng không miễn phí
Kỹ thuật donor: QPN sắp mã weight theo register fragment order để bớt shuffle trong inner loop. NInfer biến đổi code/scale planes khi load, gắn tag cho view runtime, rồi giải phóng temporary. Marlin tách macro-layout của packed weight khỏi tile GEMM đang chạy. S3, S5, S2
Áp dụng cho GGUF: không requantize, không sửa GGUF trên đĩa; chỉ đổi thứ tự biểu diễn backend của những tensor đủ điều kiện. Decoder phải xử lý đúng từng loại Q5_K/Q6_K và loại thực tế trong census, bao gồm scale/min/high bits, không coi chúng là một format INT4 đơn giản.
Contract cần thiết trước khi code:
v100-skinnymô tả trường hợp NVFP4 giữ cả bản QPN lẫn Marlin: không được gọi mọi prepack là “zero-extra-VRAM”. S3Vị trí: CUDA buffer/tensor upload trong
ggml-cuda.cu, metadata ở CUDA backend, kernel đọc quantized weight; chỉ đụng loader chung nếu backend hiện tại không diễn đạt đủ ownership. Ưu tiên không sửa định dạng GGUF hay API người dùng.Tiêu chí bỏ hướng: thêm một bản nén làm workload target/draft hết VRAM, hoặc fallback phải unpack quá thường xuyên đến mức không còn lợi ích E2E.
C. Prefill: fused/tiled GGUF dequantization + GEMM thay vì dựng toàn bộ tensor FP16 — ưu tiên P2
Trong
ggml_cuda_mul_mat_cublas_impl, khi type không trùng compute type, có allocation/conversion cho các phần tử của tensor đầu vào của phép gọi trước khi GEMM. Đây là một nơi có thể phát sinh conversion/scratch; chưa có trace để kết luận chiếm bao nhiêu PP. F2Đề xuất: giữ weight nén trong HBM, đọc một tile, giải mã sang FP16 ở register/shared memory gần consumer, dùng Volta MMA với accumulator FP32. So sánh hai thiết kế: đọc GGUF gốc trực tiếp, và đọc layout backend của mục B. Không bắt buộc phải repack mới có prototype.
Tổ chức software pipeline hợp SM70: prefetch tile kế tiếp vào register khi xử lý tile hiện tại, double-buffer shared memory khi thực sự giảm stall, bố trí code/scale để coalesced load và tránh bank conflict. CUTLASS
mma_pipelined.hlà mẫu double-buffered threadblock GEMM để học. S11Các lưu ý quan trọng:
vector_wordsso với chia theo lane thay vì giả định giữ mọi scale là tối ưu.Bộ nhớ: nếu một phép gọi đang tạo tensor FP16 KxN thì riêng phần đó có kích thước
2*K*Nbyte; đây là công thức cho tensor của phép gọi, không phải khẳng định engine giải nén toàn model cùng lúc. Candidate phải báo cả dequant tile, split-K partials và output staging, không chỉ bỏ một khoản khỏi báo cáo.D. Attention: tối ưu đường đọc KV và dependency trước khi thay toàn bộ thuật toán — ưu tiên P1/P2
PR 1Cat ggml-org#268 là bằng chứng cụ thể: reuse page IDs và ghép các lần load/chuyển đổi đã cải thiện batched E5M2 XQA. Tác giả báo operator khoảng 1.21–1.27x ở các shape mẫu, trong khi E2E pure decode ở hai cell long-context tăng khoảng 6–8%. Counter cho thấy HBM bytes và occupancy gần như không đổi; giảm instruction/load-request/dependency mới là cơ chế chính. S6
Với Q8_0 của fork:
nb[], có scalar/tail path.Đây là phần mở rộng thực chất cho D256/GQA6 trong body. Không đổi Q8_0 sang E5M2/FP16 để làm donor kernel chạy được; làm vậy phá baseline và thay bài toán bộ nhớ.
Vị trí:
fattn.cu,fattn-common.cuh, các MMA/vec/tile helpers và specialization mới có gate hẹp. DùngFLASH_ATTN_EXThiện có.E. Split-KV theo live work, bounded scratch và bỏ chính xác tile bị mask — ưu tiên P1 nếu trace chứng minh khoảng trống
v100-skinnymô tả việc loại chi phí decode phụ thuộc quá mạnh vàomax_model_lenkhai báo khi KV thực tế còn ngắn. 1Cat ggml-org#328 nhảy thẳng tới tile đầu nằm trong sliding window vốn có của DFlash2 draft, thay vì đi qua prefix chắc chắn bị mask. S3, S7Cần kiểm tra trong fork, chưa coi là bug đã xác nhận:
Thiết kế: chọn số partition từ query width, số KV head, live/visible KV range, SM budget và workspace cap. Ít partition quá sẽ thiếu parallelism; nhiều quá tăng launch/partial/reduction. Không hardcode “luôn split tối đa”.
Để giữ graph ổn định, có thể dùng một số bucket partition và bounds trên device; chỉ áp dụng nếu phần work thừa trong bucket nhỏ hơn chi phí recapture. Không lấy chiều dài về CPU bằng synchronous readback mỗi token chỉ để tiết kiệm một kernel.
Causal prefix hoặc sliding window phải dựa trên mask/position thật. Full attention của target vẫn phải thấy toàn bộ KV hợp lệ; tuyệt đối không đưa cửa sổ 2048 của DFlash2 vào model hiện tại. Với mask tùy ý phải chứng minh toàn tile bị loại, không chỉ nhìn query cuối.
FP32 partial online-softmax merge phải xử lý
m/l/outputnhất quán; một partition rỗng hoặc hàng all-masked không được sinh NaN hay đọc dữ liệu cũ. Bộ nhớ partial tăng theo số query, partition và head dimension; cấp phát có giới hạn theo GPU hiện có.F. CUDA Graph ổn định theo shape, không chỉ “bật graph” — ưu tiên P1 nếu host/launch gap đáng kể
Fork đã có graph key/cache và yêu cầu các lần gọi có properties ổn định để qua warmup; properties đổi sẽ quay lại execute trực tiếp. F1 NInfer là donor hữu ích về tổ chức shape-specific execution và dữ liệu runtime, không phải bằng chứng rằng fork chưa có graph. S5
Delta đề xuất:
Vị trí: graph key/properties/cache và compute/capture trong
ggml-cuda.cu, scheduler/input plumbing liên quan nếu trace yêu cầu. Đây là công việc nhỏ hơn GPU-resident MTP toàn tuyến, nên có thể làm trước nếu nó tự mang lại lợi ích.G. Shared activation staging và fusion đúng chỗ — ưu tiên P1/P2
NInfer reuse cùng staged FP16 activation cho nhóm projection. FasterTransformer gộp các operator nhỏ và tái sử dụng workspace giữa layer. S5, S12 Fork đã có concurrency/fusion infrastructure, nên chỉ thêm phần thiếu được trace xác nhận. F5
Các candidate cần đo:
wqkv; không “merge QKV” thêm lần nữa như một tối ưu mới. F7Vị trí: CUDA graph optimizer/fusion matcher,
norm.cu, matmul epilogues và graph builder tương ứng, sau khi xác định pattern thật. Cập nhật allocation dependencies cùng lúc với fusion, không tách thành bước “sửa sau”.H. GDN: tối ưu đường prefill thực sự, không chỉ kernel recurrent — ưu tiên P1 để profile, P2 để implement
Đây là phần cần bổ sung mạnh vào kế hoạch vì code có hai đường khác nhau:
build_delta_net_fused()tạoGGML_OP_GATED_DELTA_NET; kernel CUDA hiện giữ state trong register và đi tuần tự theo token. F3, F4build_delta_net_chunking()tạo các graph op cho pad, transpose/contiguous, cumsum, decay mask, GEMM và triangular solve; lựa chọn phụ thuộcfused_gdn_ch. F4Thực hiện nghiên cứu đúng thứ tự:
fused_gdn_ar/ch, số token/sequence và kernel/operator trace cho actual PP và MTP verify. Các flag hiện tại là baseline, không đổi chúng trong A/B của một thay đổi khác.transpose -> cont -> cumsum, lặp decay mask, scale/beta preprocessing và nhiều kernel nhỏ quanh GEMM/solve. Có thể prototype fused prefix-scan/preprocessing với output layout phù hợp consumer để tránh copy trung gian.Vị trí:
src/models/delta-net-base.cpp,ggml/src/ggml-cuda/gated_delta_net.cu, CUDA cumsum/solve_tri/matmul helpers, state layout hiện hành.Đây là đề xuất tích hợp suy ra từ code fork và nguyên lý fusion/tiling, không phải tuyên bố đã tìm được một kernel GDN donor tương thích hoàn toàn. Không cần đưa Torch/TileLang vào ggml chỉ vì donor dùng chúng.
I. MTP: tối ưu hidden-state handoff và phần control/sampling theo contract — ưu tiên P2, sau khi có attribution
Giữ hướng device-resident MTP trong body, nhưng chia thành các khoản đo riêng: lấy hidden state, copy/compact row, target/draft synchronization, draft LM head, sampling, verification và rollback. Nhanh một kernel draft mà mất nhiều hơn ở synchronization không phải thắng.
Candidate nhỏ nhất là handoff buffer device-to-device/device-view có event và lifetime rõ, giữ public host getter cho caller cần CPU. Không âm thầm đổi API từ trả host pointer sang device pointer. Handoff cross-GPU phải tuân thủ P2P policy; same-device và peer/non-peer là ba trường hợp khác nhau.
Có thể học device-side selection/sampling của các native engine và FasterTransformer, nhưng không khẳng định fork thiếu toàn bộ GPU sampling chỉ vì thấy CPU code. Audit sampler chain thực tế trước. Grammar, penalties, logprobs, RNG, cancellation và MTP accept/reject vẫn phải đúng; GPU argmax chỉ tương đương khi semantics đang thực sự là greedy. S12
NInfer còn có context-lookup proposals được target xác minh. Đây là hướng riêng cho workload lặp/copy, không nằm trong baseline MTP=2: không kéo draft depth lên 15 để lấy kết quả của donor. Tương tự, tối ưu/thu gọn proposal LM head chỉ có thể áp dụng phía draft khi đã định nghĩa rõ proposal distribution; tuyệt đối không cắt vocabulary của target để tăng tốc. S5
J. Communication/topology: chỉ bổ sung overlap có dependency thật — ưu tiên P2/P3
Không lặp lại đề xuất “bật NVLink/all-reduce” vì fork đã có. Việc đáng nghiên cứu là timeline compute/copy/event tại ranh giới layer và giữa target/draft; dùng event/stream dependency thay cho host-wide sync khi tương đương, pooled pinned staging cho đường không-peer, chunked transfer nếu giúp overlap mà không tăng launch quá nhiều.
Giữ nguyên allowlist #3/PR #4. Không enable P2P cho các cặp PCIe chưa an toàn, không suy từ GPU0 sang mọi GPU và không nhầm CUDA ordinal theo UUID với physical ordinal. Thêm stream không tạo parallelism cho các layer vẫn có dependency tuyến tính. Muốn tensor parallel + Q8 KV cần thiết kế meta-device/cache-layout riêng như body đã cảnh báo, không gộp vào PR kernel nhỏ.
4. Những hướng phải loại khỏi baseline hoặc ghi rõ giới hạn
ggml_forward_mul_mat_xxx()branch for non-contiguoussrc0ggml-org/llama.cpp#441 báo pathology từ tile tuned trên GB300 cho pre-Ampere và còn chỉ ra đã có lúc tune nhầm file không được dispatch. Model/operator của họ khác workload này: học cách kiểm tra route, không mang hệ số 19x vào dự báo cho Qwen35 của fork. S85. Kế hoạch thực nghiệm và điều kiện nghiệm thu bổ sung
5.1. Evidence pack trước khi chọn kernel
Lưu commit/binary hash, driver/toolkit/compiler, build flags, model và quant metadata, actual tensor types, GPU UUID/ordinal mapping, topology, memory headroom, graph config, GDN route và MTP depth. Không suy deployed revision chỉ từ physical checkout HEAD đã được issue cảnh báo.
Thu trace trên đúng cấu hình baseline, với profiling tắt khi lấy số E2E cuối. Các counter/trace nên có chế độ opt-in; tránh log đồng bộ theo từng token làm sai latency. Kết quả cần chỉ ra tên candidate, selected call count, fallback call count/reason và tỷ trọng thời gian của đường đủ điều kiện.
5.2. Ma trận test tối thiểu
Khung timing giữ lại fixture 8192/32768 và slot-order của #5 để đối chiếu được, bổ sung decode/MTP và cached prefix. Các context dài hơn chỉ chạy trong ngân sách VRAM đã kiểm tra; không có yêu cầu cố chạy một case sẽ OOM. Trộn prompt ít lặp, code, prose và nhiệm vụ copy để tránh speculative acceptance bị thổi phồng bởi filler.
5.3. Numerical, memory và synchronization gates
5.4. Cách kết luận có lợi
Dùng warmup, các lượt A/B xen kẽ hoặc đảo thứ tự, ít nhất 5 cặp đo cho các cell quyết định; tăng số lần nếu nhiễu lớn. Báo median, độ phân tán và khoảng tin cậy phù hợp. Lưu cả case thua.
Báo operator time có đủ conversion/reduction và E2E riêng: cold PP, prefix-suffix PP, TTFT, TG/TPOT, committed tokens/s, MTP acceptance và peak VRAM. Không đếm draft/rejected tokens là output throughput. GPU utilization cao hơn không phải tiêu chí merge.
Áp dụng Amdahl để tránh hứa quá mức: nếu một op chiếm tỷ lệ f, nhanh lên s lần thì trần tăng tốc tổng lý tưởng là
1 / ((1-f) + f/s), chưa tính overhead mới. Ví dụ giả định f=20%, s=2 thì tổng chỉ khoảng 1.11x, không phải 2x. Tỷ lệ f của máy này hiện chưa đo trong lượt nghiên cứu này.6. Thứ tự triển khai đề xuất cho một scope được phê duyệt
Checklist cho PR được chọn:
v100-skinnyphân biệt MIT kernel với Apache-2.0 fork patches; không áp một license chung tùy tiện. S3Đề xuất quyết định: ưu tiên đo và thử các delta native trước; coi repack + SM70 GEMM là khoản đầu tư lớn hơn, không phải patch vài dòng. Issue nên tiếp tục mở: comment nghiên cứu không thay cho implementation hay xác nhận tối ưu thành công.
Các liên kết F1–F7 trong nội dung trỏ tới code fork được pin theo commit; S1–S14 trỏ tới nguồn tham khảo tương ứng. Với nguồn theo branch hoặc repo homepage, phải pin lại revision và kiểm tra diff trước khi port code.
novkien commentedon Oct 1, 2026
Simulation results: PP/TG shortlist, numerical tests, and rejected shortcuts
Research date: 2026-10-01. Owner direction: continue the V100 research and actually test candidates in a self-created simulation environment. Rechecked
masterbefore publication:e58b770f3c2346deab036d9e4c3b2ea61ca0bbc5.Conclusion: the strongest first native experiment is direct-Q8_0 attention for SM70 / D256 / GQA6 / W3 verification, avoiding full-view FP16 materialization and reusing KV across query/head rows. Long-prefix PP needs its own larger query tile. The simulation rejects both “force the existing vector route and assume it wins” and “reuse a tiny decode tile for all prefill.”
This is a workload-specific prioritization, not a measured V100 speedup. Overall target-performance verdict: PARTIAL.
1. What actually ran
The sandbox has 5 logical CPUs, Python 3.13.5, NumPy 2.3.5, CPU-only PyTorch, no
nvcc, nonvidia-smi, and zero CUDA devices. No target model weights, CUDA binary or GPU instruction trace was loaded. No production source/configuration/service/GPU job was changed.Executed an independently authored CPU semantic harness and a deterministic source-informed cost/resource simulator:
Attention/GDN tolerances were
atol=2e-5, rtol=2e-5; GEMMatol=2e-4, rtol=2e-5. The predicate ismax_abs_error <= atol + rtol * max_abs_reference, with finite outputs. Block decoding and packing round-trip require exact equality.The negative controls deliberately omit a sequence mask and overflow an unscaled FP16 partial. Both are rejected. The overflow is not a reproduction of a donor bug: current kernels already contain scaling safeguards.
Limit: these CPU prototypes do not validate native HMMA fragments, per-instruction rounding, MMVQ Q8_1 activation quantization, existing FP16 probability/FTZ intermediates, CUDA races, or complete-model quality. The repack test is an invertible byte-plane demonstration, not a tuned QPN layout. W1024 CPU algebra is not a proposal to allocate all queries in one CUDA block. CPU elapsed times are not extrapolated into V100 tok/s.
2. New concrete source finding: W3 crosses a KV-materialization boundary
In the current dispatcher, GQA6 yields effective power-of-two grouping 2. Under supported D256, padded KV, compiled Volta MMA and applicable layout conditions:
Q.ne[1]If the vector Q8_0/Q8_0 template was not compiled, even VEC can convert to FP16.
The extra-data and launch helpers allocate
ggml_nelements(K)*sizeof(half)and the corresponding V buffer, then actually convert the tensor views. Mask-bound processing comes after conversion. Existing split/stream-K, FP32 combination, and mask scanning must be reused rather than presented as missing features.A passed view is not necessarily one slot's live length. Trace the actual
ne[],nb[], view identity and mask. Do not multiply a unified cache span by four simply because four slots exist.For one distinct K/V stream, Hkv4/D256, separate K and V:
The last column is logical traffic, not a measured DRAM counter or extra simultaneous allocation. Summing layer writes does not give peak VRAM.
A proposed W3/Hq24/D256, 32-partition FP32 output/max/denominator layout is
3*24*(256+2)*32*4 = 2,377,728 bytes, about 2.268 MiB. That counts partials only, not all workspace. Partition count 32 is semantically tested, not selected as fastest.3. Rejected shortcut: simply force W3 onto VEC
The existing vector wrapper already supports multiple queries using two-query blocks and tail checks. It is a valuable low-effort native control, but not automatically the winner.
For eligible W3, current TILE sizing gives query tile4/GQA tile2. VEC gives query tile2/GQA tile1. For a near-full prefix at N131072, with no redundant-read cache reuse:
These are output-tile pass counts, not instruction or HBM traces. Partitions divide KV work; they do not each scan the full span.
Forcing VEC can remove the FP16 buffer yet increase total reads. In the toy cache model with the same redundant-read reuse fraction for both arms, its byte comparison flips near 48% reuse; this is not a measured cache-hit rate.
Even the conservative one-consumer-pass comparison gives
(272+512+512)/272 = 4.765in logical bytes. Neither 4.765 nor the nominal 8.529 byte ratio is an attention or TG speedup. The sensitivity grid includes candidates losing because math, decode, bandwidth efficiency or other costs dominate.The first GPU comparison should therefore be stock TILE vs existing Q8 VEC W3 control vs new grouped Q8 W3, not a global dispatcher override.
4. PP: a tiny TG tile can regress badly
For eligible W1024, the inspected SM70 MMA route uses query tile32/GQA tile2, giving
ceil(1024/32)*ceil(6/2)=96nominal KV passes. A proposed all-six-head Q8 tile trades query reuse for head reuse: grouping six heads does not independently confer a 3x gain when fewer queries fit the same matrix tile.At N131072 with no modeled redundant-read cache reuse, the baseline conversion plus 96 FP16 passes accounts for 49936 MiB:
These are cumulative accesses, not VRAM capacity. This rejects “the W3 kernel is also the best prefill kernel.” PP tile10/tile16 are better traffic candidates, but useful math rate and resource limits still determine whether either actually wins.
NVIDIA's Volta guide gives 96 KiB shared memory per SM and requires explicit dynamic opt-in above 48 KiB. For the proposed W3/GQA6 layout, 18 useful rows padded to 24:
These are minimum budgets, not ptxas occupancy results. Register allocation, additional arrays and padding can worsen them. Do not increase MTP depth merely to fill a convenient MMA tile.
5. GEMM: dequantization fusion is not universally faster
The native quant layouts use 176 bytes/256 weights for Q5_K and 210/256 for Q6_K. Optimistic Q5_K weight-only arithmetic intensity is about 2.91 FLOP/B at M1, 8.73 at M3, versus 2979 at M1024, excluding activation/output traffic, repeated loads and integer work. NVIDIA's GEMM guide explains why these regimes need different tile/reuse tradeoffs and why roofline alone is insufficient.
Counterexample in the simulator, weight traffic only:
The full FP16 temporary disappears, but packed weights and decode work repeat too often. Larger tiles and sufficient useful math throughput can win; merely deleting the temporary does not prove it. Baseline tile choices and the simulator's illustrative 600 GB/s / 60 TFLOP/s parameters are assumptions, not host measurements.
The current MMVQ already handles multiple
ncols_dst. Do not compare new weight reuse against an invented sequence of M independent GEMVs. Repeated source helper calls also do not prove M-fold DRAM traffic after compiler/cache reuse.6. Why the PP/TG priority is workload-dependent
Using the public Qwen configuration as a structural surrogate, the modeled trunk projections total 24,350,556,160 weights. This includes query gating and recurrent projections; it excludes output-head selection, recurrent updates, small ops and MTP. It is not a census of the owner's mixed-quant GGUF.
The full-attention/trunk-projection FLOP ratio is:
This supports prioritizing attention more strongly for long cached-prefix PP than for short cold PP. It does not establish per-operator time fractions.
The existing GDN graph already has fused/chunked alternatives. The numerical GDN experiment validates block algebra and selected states, not a new faster native kernel. Profile the actually selected route, preprocessing and intermediate tensors before choosing a GDN change.
Graph replay is already supported on Volta. Device-resident MTP handoff may remove a critical sync, but payload size alone cannot rank it: W3/hidden5120 has only 120 KiB of hypothetical FP32 round-trip payload per sequence, while the latency of waiting is unknown. PP1024 has 20 MiB one-way payload.
For fixed MTP depth2, an illustrative conditional-acceptance model gives
TG=(1+p+p^2)/(verify_W3+2*draft_step+catchup_and_other_costs). Keep acceptance and draft depth fixed when testing a kernel. A donor's deeper speculation or different NVFP4 artifact is not a causal gain for this GGUF workload.An ideal independent-work pipeline simulation with assumed stage costs31/31/30/8 gives about 3.016x at 32 work items, but this is a zero-transfer upper bound, not an available fork speedup. The current engine may already overlap work, and single-sequence dependent TG cannot use that same independent-job assumption. Preserve the selective P2P/NVLink-island contract.
7. Conditional priority and exact native comparison
Required native evidence:
1/(0.7+0.3/2)=1.176, not 2x. Actual fractions and component gains must be measured.No timing model was fitted to issue #5's target-only PP total: that does not identify operator fractions and excludes MTP. No donor headline tok/s was used as a calibration factor. The 4080 sensitivity combinations are not a success probability.
Reproducible artifact
Delivered to the owner in the accompanying ChatGPT response:
v100-simulation-lab-20261001.zip(23 files, 82359 bytes), SHA-256:It contains the complete independent prototype/simulator source,
run.sh, a 3852-word English report, every numerical and sensitivity result, environment/provenance records, reproduction verification and checksums. Runbash run.shin the extractedv100_sim_labdirectory; it writes a separatererun-resultsdirectory and does not contact or alter the server. The archive is not committed to this repository and this comment is not a deployment claim.Status: CPU semantic validation PASS; analytical research complete for this iteration; actual V100 performance PARTIAL/unmeasured. Keep issue #9 open.
novkien commentedon Oct 1, 2026
Implementation and native acceptance plan: Qwen 27B, 50k context, direct llama-server
Owner direction, 2026-10-01: prepare the detailed implementation and speed-validation plan here. Use the existing Qwen 27B model at 50k context. Start
llama-serverdirectly and send requests directly to that process; do not use llama-proxy, its launcher, routes, metrics or dashboard.This comment is the implementation/test specification, not a report that code has been implemented or that a GPU benchmark has passed. The preceding simulation report establishes candidate mechanisms, not native speedups. The latest 50k test requirement replaces the earlier proposed 128k/256k performance workload for acceptance.
Rechecked fork
master:e58b770f3c2346deab036d9e4c3b2ea61ca0bbc5. PR #4 and PR #8 are merged. Preserve their selective-P2P and MTP behavior. At implementation time, rebase the design assumptions against current source without resetting, switching or rebasing a shared working checkout.1. Deliverables and implementation order
Implement and measure independent changes, then combine only qualified winners:
Steps B and C are the first concrete kernel work. Step D is not permission to rewrite unrelated runtime subsystems. CUDA Graph stabilization, GPU-resident MTP handoff and topology changes remain separate candidates until a trace demonstrates their critical-path cost. Do not force a simulated favorite to win at 50k by changing the model, quantization, batch sizes or speculation depth.
Proposed exact implementation targets (new paths below are deliverables to create, not claims that they already exist):
ggml/src/ggml-cuda/fattn.cu: eligibility, stock controls and measured SM70 dispatch.ggml/src/ggml-cuda/fattn-common.cuh: shared planning/allocation integration where needed; preserve existing mask, split and reduction contracts.ggml/src/ggml-cuda/fattn-sm70-q8.cuhandfattn-sm70-q8.cu: local Q8 decoding, Volta operand mapping, online softmax and bounded partition combination. Reuse helpers inmma.cuhand existing quant types instead of duplicating them.ggml/src/ggml-cuda/CMakeLists.txtonly as necessary for registration/templates; its current CUDA source glob requires reconfiguration after adding files. Preserve HIP/MUSA and other CUDA builds.tests/test-backend-ops.cpp; use existing server test infrastructure for lifecycle/sequence regressions. Do not create a competing general test framework.scripts/bench-sm70-qwen27b.py: stdlib-based direct-process/direct-HTTP fixture, repetition, SSE and result runner. No proxy dependency.docs/development/sm70-q8-attention.md: dispatch/precision/workspace contract, exact reproduction and results; link it from the appropriate existing documentation.mmvq.cu, the actual matmul selector inggml-cuda.cu, or the measured GDN path ingated_delta_net.cu/src/models/delta-net-base.cpp. Do not include all of them by default.Keep changes reviewable by these boundaries. No production merge, service restart or deployment is part of posting this plan.
2. Fixed workload and what “50k context” means
Use the same existing Qwen3.8-27B UD-Q5_K_XL GGUF identified in this issue, not another Qwen 27B quant, a freshly downloaded replacement, or NVFP4. Confirm
general.architecture=qwen35, actual attention geometry, tensor-type histogram and MTP availability from the local artifact. Record every GGUF shard and any separate MTP artifact with SHA-256. The filename alone is insufficient.For the primary performance campaign:
--ctx-size 5000031,31,30,8proportions in every arm--batch-size 2048 --ubatch-size 1024--threads 20 --threads-batch 20none, and nativedraft-mtp, maximum 2 draft tokensThis is a 50k-capacity, near-full-context workload, not a claim of feeding exactly 50,000 prompt tokens and then generating beyond a 50,000-token limit. Record allocator padding and effective context from startup and
/props; retain the logical workload limits above. A short prompt with only-c 50000does not satisfy acceptance.No YaRN/RoPE override, context shifting, automatic context reduction, quant change, MTP-depth increase, RPC device, or CPU layer fallback may be introduced to rescue a candidate's result. Check actual target/draft allocations and layer placement, not just argv.
For the separate four-slot regression, retain
--ctx-size 50000 --kv-unified --parallel 4. This is one shared 50k pool, not four 50k reservations. Use four distinct 12,000-token prompts and 128 generated tokens each (48,512 total), plus a ragged case with lengths 8,000/10,000/14,000/16,000. Keep all active sequence budgets within the pool. Do not silently expand to 200k or advertise four simultaneous near-50k sequences.3. Establish a trustworthy native baseline
The runner must collect before benchmarking:
nvidia-smi topo -m, GPU/process/memory snapshots, clocks, power limits and temperatures. Record the exactGGML_CUDA_P2P_PAIRSmapping afterCUDA_VISIBLE_DEVICESordering. Do not assume physical GPU numbers are process ordinals.--version,--help,--list-devices, startup log,/healthand/props. Verify that the listener belongs to the child process just launched.Use an available GPU window. Do not kill unrelated jobs or invoke proxy APIs to unload/restart services. Insufficient VRAM or interference is a recorded blocked/invalid experiment, not a reason to alter the fixed configuration. This resource check does not require globally serializing unrelated repository work.
Build baseline and candidate identically. Use a CUDA 12.x toolkit that can build SM70, not the driver-reported “CUDA Version” as a compiler selector. CUDA 13 removed offline Volta compilation/library support N1. Example for each already-resolved source snapshot:
These flags follow current build options S4. Freeze the remaining relevant build options equally. Confirm the Q8_0/Q8_0 vector template and native SM70 code are present; otherwise a control can unexpectedly materialize FP16. Record linking so A cannot accidentally load B's
libggml-cudaor a production library.4. Implement the W3 attention path without changing semantics
Observed starting point: for the eligible D256/GQA6 shape, the current SM70 selector uses effective GQA grouping 2; W1 takes VEC, W2-W8 take TILE, and larger widths take MMA_F16. TILE/MMA materialize the passed Q8 K/V view as FP16 S1, S2. The old W4 donor specialization cannot simply be renamed W3.
4.1 Eligibility and a single shared execution plan
Create one deterministic plan used by support/dispatch, allocation sizing and launch. It must carry the selected route, tile geometry, partition count, required alignment and byte counts. Do not select one route when reserving scratch and a different route at launch.
The first new fast path is restricted to native NVIDIA SM70, Q F32, K/V Q8_0, Dk=Dv=256, Hq/Hkv=6, W=3, one sequence, supported strides/views and an additive mask. Initially exclude ALiBi/max-bias, softcap, sinks, sparse-gather mode and other unimplemented variants. Decide eligibility from tensor/op properties, never from a model filename. Unsupported inputs use the existing path unchanged.
Cover W1/W2 and multi-sequence inputs as explicit fallback tests; do not claim that four server slots imply an attention width of 12. Measure actual
ne[],nb[], mask dimensions and sequence layout. If the target 50k run does not produce eligible W3 calls, report this and qualify the observed shape instead of changing draft depth.Add a new, test/debug selector such as
GGML_CUDA_SM70_Q8_ATTN_MODE={stock,vec-w3,tg,pp,auto}. This variable does not exist yet and is part of the implementation:stock: preserve the current route and allocator behavior.vec-w3: use the already-compiled Q8 vector route only for eligible W3 as a control.tg: enable only the new W3 path.pp: enable only the separately qualified PP path.auto: combine only measured eligible winners; all other inputs fall back.Parse once before capture. Print the selected mode once. A forced candidate that never executes is not a successful benchmark. Keep route/reason/bytes counters opt-in and aggregated; no per-layer console writes in timed release runs. Do not add a new server public API for this experiment.
4.2 Kernel and numerical contract
Load ordinary
block_q8_0data with its FP16 scale and signed int8 values. D256 comprises eight quant blocks. Respect tensor byte strides and the block's actual alignment; a 34-byte block is not automatically 16-byte aligned. Reuse existing safe load/conversion helpers.For each KV tile, decode near the consumer and reuse it across the three queries and six related query heads. Use existing Volta MMA building blocks and explicit lane/fragment ownership. Do not use Ampere
cp.async, modern-only MMA shapes, BF16 Tensor Cores or FP8 instructions.Maintain FP32 running maximum, normalization sum and output accumulation/partition combination. Apply actual additive mask values and causal/sequence restrictions, including padded tails. Handle empty partitions without
exp(-inf - -inf)NaNs. Qualify the existing all-masked-row contract before enabling it. Do not drop low-probability terms or change precision/FTZ behavior merely to win a benchmark; any different intermediate rounding must pass native numerical and model checks.Start with small single-buffer KV tiles (16/32) and a bounded partition set such as 1/2/4/8/16/32. Measure before adding double buffering. NVIDIA documents 96 KiB shared memory per Volta SM and explicit opt-in for dynamic allocations above 48 KiB N2. Account for all arrays, padding, registers and spills, not only the KV buffer.
4.3 Workspace, graphs and fallback
Do not allocate a full FP16 K/V copy for the new route. For a partitioned FP32 result, account for at least
W * Hq * (Dv + 2) * partitions * sizeof(float), plus alignment/metadata and actual liveness. Set an initial deterministic per-op scratch cap of 8 MiB for the W3 candidate; it is a proposed engineering budget, not a measured requirement. P=1 may write the normalized output directly where safe.Use the existing backend allocator/pool, streams and capture-safe ownership. No lazy allocation, device synchronization, environment lookup or host data-dependent shape decision inside capture. Recompute plan keys on relevant shape/stride changes. Verify graph replay after alternating prompt tails and W1/W3 generation.
If a shape/resource combination is ineligible, choose stock before allocation/launch. Do not attempt to recover from a poisoned CUDA context after an illegal access or OOM and call it fallback. Keep
supports_op, allocator bytes and launch semantics consistent.5. Implement PP separately, then profile remaining PP work
Reuse the correct Q8 load/softmax machinery, not the tiny W3 query tile. Test query tiles 8/10/16 (including their Volta padding and tail masks) against the existing MMA path for the actual 1024-query microbatch and its tails. Six-head packing can reduce the number of queries that fit; it is not a free 3x reuse multiplier.
Begin PP with no KV partitioning or very few partitions when query tiles already expose enough parallelism. Propose a 64 MiB maximum per-op PP global scratch budget, reducing partitioning or selecting stock when needed. Never materialize a full
query_count * KV_lengthscore matrix. Actual peak memory on every card, including draft/recurrent state, is still the acceptance criterion.Measure conversion + attention + partition reduction together. A candidate that removes FP16 storage but repeatedly decodes/reads Q8 too often can lose. Final dispatch needs a simple measured shape/length boundary, not a global “always direct Q8” switch or runtime autotuning during a request.
At 50k, cold PP may still be dominated by projections/GDN. The diagnostic trace must separate full attention, weight conversion/GEMM, recurrent/GDN work, draft catch-up, copies/synchronization and graph overhead. Do not infer shares from FLOPs or layer counts.
If Step D is warranted:
Each extra candidate gets its own ablation. If only TG improves, report TG improvement and PP neutral; do not describe the entire PP/TG goal as completed.
6. Direct llama-server launch contract
The benchmark driver must start the actual binary with
subprocess.Popen(argv, start_new_session=True)and connect only to its loopback listener. Useurllib.request.ProxyHandler({})or equivalent to prevent environment HTTP proxies. No proxy launch job, routing API, reverse proxy, production port or dashboard scraper participates.Below is the native launch form to implement. Resolve paths, UUIDs and the unused port from local preflight; these variables deliberately do not assert stale host facts.
PROFILEisnoneormtp2,SLOTS=1for primary results andSLOTS=4only for the bounded regression above.The candidate-mode variable above is the new implementation control from section 4, not an existing native CLI option. Stock baseline must not receive an invented feature flag. Verify the candidate's startup marker rather than assuming an ignored environment variable worked.
Current native syntax is
--spec-type draft-mtp --spec-draft-n-max 2;--draft-maxis removed. Current device syntax is--device, not an assumed--devicesalias S3. Confirm these against the built artifact's help before execution. Resolve default/explicit draft offload, split and cache behavior from actual startup; if extra placement arguments are needed to preserve the verified fixture, freeze and include them in the recorded argv of both arms. Do not silently disable MTP if the artifact cannot initialize it S7.The disabled RAM archive/idle-slot policy is an explicit isolated benchmark profile, not a production configuration change. In-memory per-slot prefix reuse and checkpoints remain testable. Keep it identical across A/B and report it.
Runner lifecycle requirements: reserve/check an unused port, start only one tested arm at a time on the same GPUs, capture stdout/stderr, poll its health until ready while also checking child exit, and use an external monotonic deadline. Suggested defaults are 600 s for readiness and 1800 s per long request, recorded as timeout limits, not performance targets. On error save evidence; do not auto-restart and overwrite the failed trial. Stop only the owned child/process group and wait for it to exit. No
pkill llama-server, systemd restart, clock/power-limit change, or proxy operation.7. Deterministic fixtures and direct request sequence
Implement three frozen text fixtures: technical prose, code, and structured records with nontrivial cross-record questions. Do not fill 49k with one repeated token/line that makes MTP artificially easy. Store their generation seed, source text, template choices, token arrays and hashes.
Use the baseline native
/apply-templateand/tokenizeduring preparation, outside timings. Reserve the correct template prefix/suffix and adjust only the body token budget to obtain 49,152 valid IDs. Explicitly include required special tokens once./completionaccepts an integer token array and does not automatically prepend BOS to this form S3. Submit the same arrays to every arm; verify compatible tokenizer metadata.Produce these payloads per fixture:
cold.json: complete 49,152-token array,cache_prompt=false, 512 output tokens.prime.json: first 48,128 IDs of that same array,cache_prompt=false,n_predict=0.cached.json: complete 49,152-token array,cache_prompt=true, 512 output tokens.Use
id_slot=0for primary runs. Common timed-generation fields:{ "n_predict": 512, "temperature": 0.0, "seed": 424242, "samplers": ["temperature"], "repeat_penalty": 1.0, "presence_penalty": 0.0, "frequency_penalty": 0.0, "ignore_eos": true, "stop": [], "n_probs": 0, "n_cache_reuse": 0, "id_slot": 0, "stream": true, "return_tokens": true, "return_progress": false, "timings_per_token": false }Add the full token-array
promptand the appropriatecache_promptto make each complete payload. For the prime request setn_predict=0andstream=false. No generated tokens from a priming completion are needed. Native documentation explicitly supports cache-only evaluation withn_predict=0S3.The native request path, usable directly from a second terminal while that server runs, is:
The Python runner additionally timestamps request start, every token-bearing SSE event and completion with a monotonic high-resolution clock. Parse SSE records, not TCP reads/lines; ignore heartbeats and empty events. One event can carry several accepted MTP tokens, so event count is not token count. Deduplicate any final response token representation rather than counting it twice. Preserve raw responses for auditing.
Cache validity is compulsory. For cold runs require
timings.cache_n=0and the expected processed prompt length. For cached runs retain the prime result and inspecttimings.cache_n,prompt_nand checkpoint reuse. A recurrent model may re-evaluate a boundary token or rewind to a checkpoint: compare equal reuse/processed-work states between A/B and use actualprompt_n, not an assumed 1024. Report extra re-evaluation separately. If a genuine cached case cannot be produced, mark that cell PARTIAL; do not label a full prefill as suffix PP. Re-prime before every measured cached case; never let the previous 512 generated tokens become an uncontrolled cache state. Do not import saved slots across binaries or assume target/draft persistence is interchangeable.8. Native numerical and regression tests
Extend the existing backend tests with fixed seeds and replayable shape fixtures; retain their operator-specific reference/error criteria. Do not carry over the CPU simulator's tolerances as proof of HMMA equivalence. Record finite checks, maximum absolute error, relative/normalized error and worst-case location; set any additional tolerance before looking at performance results. Never relax a failing tolerance merely to retain a fast tile.
Minimum coverage:
For all-masked rows, first establish the maintained operator's defined behavior; do not impose a new zero-output convention silently. Candidate behavior must match that contract or the case remains ineligible.
Use a SM70-supporting Compute Sanitizer installation. Run memcheck, then racecheck/synccheck and relevant initcheck on focused native fixtures, with
--error-exitcode 1; a zero application exit alone is insufficient N3. Select the operator/backend filters from the builttest-backend-ops --help, saving the exact invocation. Separate sanitizer OOM/tool limitations from kernel findings. Sanitizer/profiler runs are never throughput samples.On the full 27B model, retain generated token IDs/hashes for greedy A/B. Investigate any divergence at the same prefix with limited teacher-forced/logit checks outside timing, plus task-specific correctness on the three fixture families. Exact greedy parity is strongest evidence; it is not a blanket claim that all valid floating-point kernels must be bitwise identical. If outputs diverge, numerical and task-quality qualification is required before any win is accepted, and changes to speculative acceptance must be disclosed. Do not claim “same semantic work” solely because both responses contain 512 tokens. Ordinary task-quality checks must also run with normal EOS behavior;
ignore_eos=trueis only the fixed-work timing control.9. Instrumentation: show the candidate actually removes the cost
In short diagnostic runs record target/draft identity, tensor name, dtype,
ne[]/nb[], W, GQA grouping, visible/passed KV span, selected route/reason, query/KV tile, partitions, scratch bytes and FP16 materialization bytes. Aggregate repeated shape records. Record enough chronology to separate prefill, draft catch-up and verification.For a winning attention route require evidence of its actual launches and absence of the full-view FP16 K/V conversion on those calls. A process-wide allocation remaining for unsupported fallback does not mean the route failed, and disappearance of one allocation alone is not speed proof.
Use CUDA events/native backend synchronization for complete operator timing, including conversion, attention and reduction. Use Nsight Systems/Compute only in diagnostic runs with an installed version that supports V100. Inspect memory traffic, Tensor-Core activity, occupancy, shared memory, spills and graph/copy gaps where supported. Nsight Compute can replay, flush caches or serialize work; final E2E timing must therefore be unprofiled N4. Do not change device clocks for just one arm.
10. Performance matrix and correct PP/TG accounting
Compare these arms during screening, without conflating their effects:
stockmode; establish that instrumentation/dispatch scaffolding itself is neutral versus A.vec-w3control, not automatically a production choice.Required primary cases, always with one slot and requested context 50,000:
At the pinned source,
server_slot_statsserializes these metrics and excludes the first generated token from TG rate, since it comes from final-prefill logits S5, S6:Use final
timingsas the primary native stage metrics; recompute the rates to audit the reported fields.cache_nis reused prompt work and must not enter the PP numerator.predicted_n-1is emitted-token work for this metric, not the number of verifier launches. Obtain verification-round counts from diagnostic stats/traces rather than assuming they equal token count. Missing or zero timing denominators invalidate the corresponding measurement; no substitute 0/1 values.For MTP, report accepted/rejected drafts and observed W1/W2/W3 distribution, not merely the configured depth. Never count draft tokens as user-visible TG output. Compare
noneA/B separately frommtp2A/B; comparing candidate MTP-on with baseline MTP-off would measure different features.Also report wall-clock token delivery. SSE batching makes per-token GPU latency unobservable from event spacing alone: retain token counts per event, and do not divide one network interval into invented individual-token times. For four slots compute aggregate rate on a common wall interval; do not add rates with unrelated time denominators.
11. Repetition, selection and explicit success criteria
First screen candidates using focused native operator tests and three alternating A/B pairs on one frozen long fixture. Freeze the candidate geometry/dispatch before the final campaign. Keep screening data distinct from final acceptance; do not choose a tile on the same trials presented as independent confirmation.
For each claimed primary workload/profile, run at least five paired repetitions per frozen fixture across the three fixtures. Counterbalance A/B launch order, keep equal warmup, and warm the real PP/W3 shapes outside recorded samples. A clean startup per arm/pair is preferred for controlled cache/allocator state; model loading is outside request timings but is still recorded. Never treat a previous-request prefix as “warmup only” and then count its cache hit as cold PP.
Record environmental conditions throughout, using the same low-frequency telemetry in both arms. Predeclare invalidation causes: wrong hashes/route/context, unequal processed or cached work, unrelated GPU interference, timeout, truncation/context shift, missing final response, OOM/Xid, or sampler/output-budget mismatch. Preserve every invalid/failed trial and its reason. Re-run a paired block for a documented external disturbance, not because a valid run was slow.
Proposed practical acceptance thresholds, fixed before the final run:
Use separate verdict columns: cold PP, cached PP, TG without MTP, TG with MTP2, correctness, memory. A kernel may pass one performance goal while another remains neutral or PARTIAL. Do not claim both PP and TG improved unless the respective cells pass. A proven regression/correctness failure is FAILED; an unsupported fixture, noisy interval, absent route hit or missing hardware evidence is PARTIAL.
The five/three-percent figures are proposed engineering acceptance criteria, not simulated speed predictions or an asserted standard. Better measured gains are welcome; screenshots, peak tok/s and byte-saving ratios alone are not acceptance.
12. Publication and issue closure checklist
Attach or commit, through the normal authorized repository workflow, the exact implementation and a durable results directory containing:
The driver must make a disconnected/malformed SSE stream, wrong token budget or missing timing field visible as an invalid trial, not silently produce a summary row marked successful. Add parser tests for multi-token MTP events, empty events, final-token duplication, cache counts, zero denominators and process failure. A normal rerun should require one manifest and the two immutable binary directories, not hand-edited responses.
llama-server, with no proxy control/data/measurement path.Source anchors checked for this plan
novkien commentedon Oct 3, 2026
Work report - approved Flash Next implementation intake
Owner and scope: Codex /root coordinates the owner's explicit 2026-10-03 implementation request for this issue. The new current-scope section records the accepted five-GPU Flash Next workload, separate optimization PRs, end-to-end delivery and energy policy; it supersedes the older direct Qwen 27B research restrictions.
Done: re-read the body and all three research comments, verified current master 7e0d6c8, found no competing open PR, and established isolated local codex/flash9-* worktrees. No source optimization or GPU speed result is claimed yet. The current route uses IQ3_XXS, Q8 KV, two slots, b/ub1024, c262144, target devices CUDA0..3 plus RPC0, and MTP maximum3. Actual artifact shapes and running-build identity will be captured before candidate qualification.
Blocker: proxy :8082 has no resident/active model work but still has the host-power failed fence. Owner notified to use the owner-only Reset alarms control; this task will not invoke it or bypass admission. Independent local source/benchmark preparation proceeds.
Next: /root owns hardware/lease/proxy operations and benchmark acceptance. Separate local workers inspect attention candidates and prepare the reproducible benchmark harness; no worker independently activates GPU workloads or mutates route/power state. The next report will contain baseline/artifact evidence or a concrete blocker update.
novkien commentedon Oct 3, 2026
Work report - owner-authorized exceptional proxy recovery
The owner explicitly instructed this Codex task to hard-restart the proxy if the existing alarm blocks the Flash benchmark, while another named Codex task implements llama-proxy ggml-org#384. This later direct instruction authorizes this bounded recovery action; it is not ordinary source deployment or authority to reset alarms through the owner-only API.
Evidence: acquiring the task's agent idle hold returned HTTP409,
host power transition already committed; cannot prevent it; no lease or GPU command started. Proxy still reports host_power failed with the power-confirmation error and no loaded model, active request, resource owner or pending MCP work. Current serving release/startup pointer is adfe3aa7ad0f4924af111e589c998f2e2a69e0ac. Management status has no nonterminal restart job; the last ggml-org#542 job b5ee7a62c59f4bfa93d1d92f8507d32a completed with all participants retired. Compatible managed handoff retains the failed power state and thus does not clear this recovery blocker. The separate ggml-org#384 task is authoring its fix locally, not activating a candidate at inspection.Next: preserve pre-recovery evidence, recheck restart ownership and activity under the deployment lock, then restart only the proxy user unit at its current startup pointer. Verify old-process retirement, same source release, :8082 readiness, power/admission state and hold acquire/release. Report this as hard-restart recovery, not a safe restart or ggml-org#384 bug fix. No model/GPU/ComfyUI/host reset is included.
novkien commentedon Oct 3, 2026
Work report - exceptional proxy recovery verified
The owner's explicitly requested hard restart completed at the existing source/startup pointer adfe3aa7ad0f4924af111e589c998f2e2a69e0ac. Preflight under the deployment lock found no nonterminal safe-restart job, resident model, active request, resource owner or pending MCP/Comfy work. Old supervisor/authority/worker PIDs 1186435/1186423/1186434 retired; new supervisor 1408702 serves :8082. Startup pointer and release are unchanged. Read-back alarms=[], power phase=idle.
This is bounded hard-restart recovery, not a safe-restart job and not acceptance of the ggml-org#384 source fix. No alarm-reset API, GPU-host power cycle, model/Comfy stop or source deployment was performed. The ggml-org#384 implementation remains with its existing task. The Flash optimization task can now attempt its owned short-lived agent hold and resume artifact/baseline collection. Private pre/post operational evidence is retained locally; no private request contents or credentials are published.
novkien commentedon Oct 3, 2026
Work report - exact Flash artifact and installed-runtime screening
The current IQ3 target is verified as qwen4exp: 48 trunk blocks, embedding2560, attention D256/Hq24/Hkv2 (GQA12), 512 experts/10 active, full-attention interval4 and native context262144. Both shards and the existing Q4_K_M draft were hashed. The second 26.822GiB shard contains only per_layer_token_embd.weight, an existing CPU lookup table; it is not evidence of trunk-layer fallback. Target quantization is mixed, so optimizations must be selected by actual tensor types rather than the IQ3 filename.
Artifact SHA256: target shard1 219ea929900dfa9ef091f3aa473fdba6874b65fcb36526d7d851ac9e95856d15; shard2 316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113; draft b646ef60eaae2a9ed849e75f15f399629ca22633555e99e809959e95f22a1575.
The installed native/RPC pair is source98b3e092d34b99222d9144f90e388767f02ec117 with an empty patch, even though physical source HEAD is7e0d6c858. Normal proxy Load succeeded in41.24seconds at unchanged c262144/ub1024/two slots/ts11,10,11,10,7/MTP3 on RPC0. Native logs prove target49/49 and draft50/50 offload. Target graph reservation first failed, then retried without pipeline parallelism; final compute allocations are about3520MiB per target GPU plus1210MiB for the RPC draft. Initial free memory in process-device order is2289/3161/723/1071/601MiB. These are startup facts, not proof of the causal share of PP time.
Three screening requests through proxy8082 used one frozen structured fixture with exactly8192 newly processed tokens (cache_n0) and512 generated tokens, greedy sampling/MTP unchanged. Native PP:453.98,490.28,491.97tokens/s; native TG:61.00,69.43,71.78tokens/s; wall:27.69,33.14,24.77seconds. These are installed-runtime screening results, not the five-pair/three-fixture acceptance campaign or a claimed optimization gain. The first run's slower warm state and wall/native gap remain explicit.
Next: matched immutable host/RPC baseline builds from7e0d6c858 are now compiling (CUDA12.9/SM70 native; CUDA13.3/SM120a guest). This separates upstream mask changes from our candidates. Opt-in local diagnostic patches collect actual attention dispatch/shape and MTP getter/catch-up cost before kernel/dataflow changes. An independent local placement analysis uses per-layer GGUF sizes and startup allocations. No optimized PR, speed gain or final context selection is claimed yet. Owned wake leases were released after completed inspection/screening commands; a lease is now renewed only while the actual build commands run.
novkien commentedon Oct 3, 2026
Work report - owner requires pipeline parallelism
After seeing the installed-runtime allocation fallback, the owner explicitly clarified that disabling pipeline parallelism is not acceptable. Final acceptance now requires the target's pipeline parallelism to remain enabled with no allocation fallback. Existing pipeline-off screening is retained only as historical installed-runtime evidence, not a valid final configuration or the pipeline-enabled A/B baseline.
The context search is constrained by pipeline-on operation. First rebalance actual layer allocations and draft placement, compare ub512/1024 at equal pipeline-enabled settings, and establish the largest stable shared context that meets the owner's PP tradeoff. Retain proof of the final runtime scheduler state, not just the early 'enabled' startup message. No automatic runtime guard or removal of native fallback is requested.
The unmodified 7e0d6c8 native/RPC baseline build has completed. Next: package matched immutable artifacts, activate through normal model lifecycle, verify pipeline behavior and run comparable measurements. Source diagnostics and offline placement work remain local; no GPU benchmark is run concurrently with a build.
novkien commentedon Oct 3, 2026
Work report - controlled upstream comparison and startup prerequisite
The owner clarified that real upstream speed gains may justify higher compute VRAM, while pipeline-on remains mandatory. We will preserve and measure those changes, not revert them based on allocation size alone. Upstream ggml-org#29751/66e0c17ee rewrites QSA/indexer pooling; ggml-org#29824/4e2713c16 changes mask construction and notes the compute-buffer cost. Their published speed claims concern other hardware and are not results for this V100/RPC host.
The new immutable 7e0 native/RPC pair completed its build and was installed through normal proxy unload and complete-package atomic exchange, retaining the old pair. A placement chosen from exact layer sizes (ts12,8,10,9,10; draftCUDA1; c262144; ub512; b1024; two slots; ngl99) successfully reserves target pipeline copies4 without fallback. It then aborts during the draft's startup decode check. The stack and exact reproduction are recorded in prerequisite issue #11.
A controlled reinstallation of the retained 98b3 pair with that same configuration loads successfully, keeps target pipeline copies4, and serves three exact8192+512 cold SSE requests. All three benchmark records are valid (cache_n0): PP404.71/415.77/415.58, TG66.68/73.69/73.78tokens/s. This separates the 7e startup regression from placement/OOM. It is configuration screening, not final multi-fixture A/B acceptance or an isolated ub tradeoff because the earlier installed screening used a different placement and pipeline state.
Matching startup graph allocations differ materially: 98b3 uses target compute2969/3085/3085/3085/3089MiB; 7e0 uses4315/4426/4426/4426/4435MiB. Both retain all target layers on GPU. The exact causal/lifetime attribution of this ~1.34GiB/device growth is under local source review; it is not assumed to be all attention conversion.
Confirmed #11 cause: global trunk QSA metadata causes the MTP graph to register pool inputs although its actual layer48 compress ratio is0. That dense layer never consumes k_idxs, leaving its buffer unallocated while set_input writes it. The minimal compatibility repair constructs the pool only for a QSA-enabled MTP layer and preserves the upstream target graph. Codex /root/flash_attention owns that isolated prerequisite source change under /root coordination; independent review, matched rebuild and live startup/MTP acceptance follow. No optimized kernel or speedup is claimed yet.
Separately, a newly observed explicit systemd logged-in-user refusal is recorded in llama-proxy#547. The owner-authorized second hard restart restored proxy admission at unchanged ea35908 with old processes retired; no alarm reset API or proxy source patch was used here. Proxy ggml-org#547 is outside this fork implementation and remains open.
novkien commentedon Oct 3, 2026
Work report - benchmark tooling PR opened
PR #13: #13
Reviewed head:
ae14eb10fc26138f54e7c66b473ad15ace533598.This support PR adds the Flash Next proxy stream runner, focused parser/provenance tests, and its usage guide. It records token/cache counts, native PP/TG/TTFT timings, raw SSE artifacts, and immutable host/RPC/model evidence. Missing evidence yields a screening-only result; an environment change invalidates the campaign. This PR adds no inference optimization and makes no speedup claim.
Validation on the reviewed files: 13 focused unit tests passed, Python compilation passed, and
git diff --checkpassed. Live screening results remain configuration evidence only and do not meet issue #9's multi-fixture paired acceptance.At handoff, the issue backlink is present. The PR's Lint, editorconfig, labeler, model-naming, and two Python type-check jobs are still pending; local scoped checks passed and no required branch gate is configured. The optimization issue remains open for the separate source PRs, full A/B results, final pipeline-on context selection, and proxy acceptance.
novkien commentedon Oct 3, 2026
Work report - prerequisite publication, validated runner and first dispatch trace
Prerequisite PR #12 for #11 is merged at
8d75def06db97c8736989c795be403faf214a9d4. Its maintained tiny Qwen4Exp fixture aborts on unmodified7e0 at the same unused pool-input buffer assertion and passes all3 focused tests after the one-line repair (ordinary architecture, dense MTP, QSA MTP). Exact merged-pair deployment acceptance remains open; the currently running screening pair is still7e0 plus the reviewed correctness patch.Benchmark support PR #13 preserves raw SSE bytes, exact token/cache counts, campaign/arm/lane/prompt identities, native/proxy identities and immutable host/RPC binary/library/model hash evidence. Thirteen focused tests and scoped ty0.0.84 checks pass. Incomplete provenance is explicitly screening-only; a mid-run environment change invalidates the campaign. This is supporting measurement work, not a performance optimization claim.
The temporary diagnostic pair completed an8192+512 request and was removed through normal unload/package exchange afterward. Actual native traces show SM70, Q8_0 K/V, D256,24 query/2 KV heads (GQA12): decode/MTP widths1/2/4 take the F16-converting tile path, PP512 takes MMA-F16. At roughly8.5k-9k KV cells, each K/V F16 scratch is about8.7-9.2MB; those are allocation sizes, not measured traffic. RPC uses direct-Q8 vec for width2 and MMA-F16 for width4/PP. The first per-op profiler overflowed its512-key limit and omitted fused groups/RPC teardown totals, so its operation ranking is incomplete. The revised temporary diagnostic expands bounded keys, measures fusion groups and emits cumulative snapshots; profiled timings will not enter speedup acceptance.
Source and process evidence now confirm native graphs disabled by environment presence and fusion enabled (
GGML_CUDA_DISABLE_FUSION=0); RPC does not inherit native environment and currently uses graph captures. A route value0 cannot enable native graphs because that switch uses presence semantics and the launcher always inserts it. No proxy runtime change is authorized or made. Per-row MTP getters measured62.938ms across8803rows under the intrusive profile, too small there to justify a speedup PR; bulk waiting remains required. QSA score in-place addition is already eligible for gallocr reuse, so no redundant in-place-only PR is planned.Configuration screening has now proved ub1024 can fit with pipeline ON: c65536, b1024, two slots, ts12,8,10,9,10, draftCUDA1,49/49 target and50/50 draft GPU layers. Target compute buffers are2276/2513/2513/2513/2516MiB, well below the c262k estimate. Three exact cold8192+512 requests pass: PP484.63/487.93/487.17 and TG78.07/79.53/79.83tokens/s. These are single-fixture screening results, not five-pair acceptance. A fixed-scratch extrapolation from c262k to smaller contexts would be invalid because QSA scratch scales with context and ubatch; the same-context ub512 arm is next. The final largest stable context and near-full-pool generation remain unverified.
Next source experiment: /root/flash_attention owns a separate family1 direct-Q8 TG probe, starting with existing vector kernels on SM70/D256/GQA12 widths1-4, actual strides/masks, CPU-reference correctness and synchronized microbenchmarks before any live selector claim. Other families await complete cost attribution. Root alone coordinates GPU operations and releases each owned idle lease at the end of the actual command/build/benchmark. No final configuration or1kt/s result is claimed.
novkien commentedon Oct 3, 2026
Work report - PR #13 Lint result
PR #13 remains open at reviewed head
ae14eb10fc26138f54e7c66b473ad15ace533598. Its Lint workflow failed with two findings:NP100forbidsprint()atscripts/bench_flash_next.py:1475, andE402flags the post-sys.path.insertimport attests/test_bench_flash_next.py:10. Labeler and model-naming passed; editorconfig and the two Python type-check jobs were pending. The focused 13-test suite, Python compilation, andgit diff --checkpassed locally.No merge was performed. The source owner has assigned these two minimal lint corrections; root review and a new head authorization are required before publication continues. Issue #9 remains open for the optimization and proxy acceptance work.
novkien commentedon Oct 3, 2026
Work report - benchmark support validation update
PR #13 now points to reviewed head
1ebe411a30851671e59d616fa20d16a66a3bb670. The two CI Lint findings from the prior head are corrected; CI Lint passed on this head (run 37094369075). Editorconfig, labeler and model-naming passed. Two Python type-check jobs remain pending; scoped local type-check, 13 focused tests, Python compilation andgit diff --checkpassed.The change remains measurement support and makes no speedup claim. #9 remains open for optimization candidates, paired performance acceptance, final pipeline-on context selection and proxy verification. The support PR is ready to merge at this exact reviewed head; outstanding checks are optional and no required branch gate is configured.
novkien commentedon Oct 3, 2026
Owner decision - final context must be at least 200k
The owner clarified directly in the active Codex task on2026-10-03 that the final context must be at least200k tokens. In the already approved unified-KV contract, this is a minimum200,000-token shared
-cpool across the two slots. Smaller contexts remain useful controlled comparison fixtures but cannot be the final configuration. The existing pipeline-on/full-GPU-offload requirements and ub512 median-PP-loss<=5% rule still apply; no relaxation was authorized.The completed c65536 screen compared the same source, placement, draft, sampling and exact8192+512 fixture: medianPP487.167 with ub1024 versus406.114 with ub512 (about16.64% loss). It is an initial three-run/single-fixture screen, not the final paired campaign. Observed ub1024 VRAM peaks there were roughly12.3-12.9GiB/device (12,608-13,176MiB), and both KV and QSA scratch grow with context. Next: measure ub1024 at c200704 with pipeline/full offload checks, then use measured memory and local source candidates to satisfy the new minimum and maximize capacity. The final near-full-pool test remains required.
The body now includes this minimum and updates the obsolete initial power-blocker paragraph to the already recorded recovery/current state. No new proxy-runtime authority is inferred.
bench : add Flash Next proxy stream benchmark harness (#9) [no release]
64 remaining items
novkien commentedon Oct 4, 2026
Shared resource released; Flash routeproof resumed
The separate archive stage completed and its process exited. Its own helper receipt records the lease released with final inactive status; a fresh proxy read agreed. Root waited for this evidence before any further power action. Graceful shutdown then completed at 09:39:50 UTC with offline plus fresh 4 W, no hold and no active LLM work.
The next Flash-only verification job has now passed preflight and started baseline identity setup. It reuses only the complete, hash-bound 100-row CPU and Qwen diagnostic stages; the prior partial Flash group remains excluded. The resumer and bounded load-status read recovery passed root and independent review. The Pi audit also reconciled the earlier accepted Flash load job to
succeeded, with slot admission/completion at 09:07:02 UTC; the missing evidence is the diagnostic request, not proof of a model-load failure.Both-model TG qualification remains the next phase after Flash routeproof and restored/off cleanup. The prepared final quality/context coordinator has also passed offline root and independent review but remains disabled until the model gain gates justify that acceptance stage. No new production source, route configuration, proxy repair, foreign hold mutation or additional experimental family was introduced.
novkien commentedon Oct 4, 2026
Combined Q6 correctness and actual-route verification complete
Root completed the missing Flash Next diagnostic request and restored both installed packages to the unchanged 5423 baseline. Graceful shutdown was verified at 09:46:51 UTC, offline with a fresh 6 W reading and no idle hold.
The combined pure candidate
5423:51b9b224...retains the previously verified 100 passing CPU-reference rows (25 cases x baseline/candidate x native/RPC). The separately built diagnostic candidate5423:3e0a14e5...now has complete source-bound cold8192+512 structured probes on BOTH Qwen27B and Flash Next. These diagnostic timings are excluded from performance qualification.For Flash, the exact benchmark manifest window was 09:44:17.563308-09:44:45.405043 UTC. Its native log contains 31 W1 head branch markers (K2560/M248320, CUDA1/SM70) and two periodic W4 markers (calls4096/8192, K6144/M2560, CUDA0/SM70) inside that request. Startup markers were excluded. The response passed transport/work counters: 8192 processed, zero cache reuse, 512 output tokens, HTTP200 and no sample-invalid reasons. The counter marks branch selection before launch, not individual kernel completion. Qwen's previously completed actual-request W4 proof and CPU references were reused only through pinned completed artifacts; the old partial Flash attempt is excluded.
Root and an independent reviewer checked the actual request/window and package evidence. No model configuration or production source has changed. Next is the reviewed pure-candidate campaign: five alternating baseline/candidate pairs for each model and each of prose, code and structured cold8k+512 fixtures (20 load groups, 60 measured requests, 20 excluded warmups). A speed claim requires at least 5% native TG gain, a 95% paired interval above parity, and no required case below 0.97. Full quality/context acceptance and PR delivery follow only if those model gates pass; otherwise the baseline remains selected.
Local evidence:
jobs/quant-verify-resume02/result.jsonSHA256b35f458b96f5191bed833b17c138e5198c0ed2495d705b1301f74f7818a22285,profile-job/result.jsonSHA2563964d89435e7bb52ab5f7751bed497bfda4267d911e8813a76ab8e5b89b7ae9e, androot-routeproof-review.jsonunder the retained flash9-next campaign artifacts.novkien commentedon Oct 4, 2026
Pure Q6 TG campaign interrupted by a telemetry failure
The first campaign stopped after seven complete groups. The eighth group (pair1 Flash baseline) completed all three frozen requests, but one of 184 RPC VRAM collector rows records an 8-second SSH timeout inside the code request window. The strict collector-validity gate stopped the campaign; it is not a model/kernel failure or a valid negative speed result. Root has not computed candidate/baseline speed comparisons from this partial run. All original data remains unchanged.
Both installed packages were restored to exact 5423. The first shutdown attempt was blocked by a foreign agent idle hold. Read-only evidence identified a concurrent archive stage, whose lease interval was 10:17:51.171288-10:25:12.926435 UTC. The stage completed, exited and released its own lease; root never modified that lease or interrupted the task. The existing graceful shutdown helper then completed at 10:26:44 UTC with offline plus fresh 6 W and no hold. Temporal overlap does not prove the archive caused the SSH failure.
The first six groups (both models' pair0 and both Qwen arms of pair1) completed before the foreign stage and have no collector error rows. Pair1 Flash Q6 code/structured requests overlap that stage; the subsequent Flash baseline warmup and all three measured requests also overlap, including the RPC timeout. To preserve complete paired comparisons and avoid result-based sample selection, the proposed recovery retains only the first six complete groups, excludes BOTH original Flash pair1 arms from qualification with the reason recorded, and reruns that complete Flash pair plus pairs2-4. The excluded raw groups remain available. Independent review is checking the exact retained boundary and evidence validity before the resumer is enabled.
The resumer will use the same pure source, fixtures, sampling, configurations, five-pair alternating order, telemetry assertions and unchanged analyzer. It will pin the original receipt and retained artifacts, perform fresh baseline/package/model identity setup, run fourteen new groups, and restore/shutdown again. No production candidate has been selected, no performance claim made, and no proxy runtime/configuration or idle-inhibition change is included.
Original failed/restored receipt SHA256:
30428d2e78038a5680b409fdd95a836150b0063b5698c94e0c5651b264625b6b. Local evidence is retained underflash9-next-20261004/jobs/quant-tg05and itsquant-tg05-powersibling, including the sanitized foreign-stage completion and final shutdown receipts.novkien commentedon Oct 4, 2026
Reviewed fourteen-group TG resumption started
Root and independent review validated the retained first six groups before any speed comparisons: all 18 measured runs pass the unchanged request adapter, every raw SSE/prompt/source binding matches, and all three VRAM/slot streams are error-free and cover their request windows. The last retained request ended at 10:14:06.561 UTC, before the concurrent archive interval. Both original Flash pair1 arms remain excluded as a complete pair, with their raw data preserved.
The separate resumer pins the failed/restored original receipt, the exact six-group records, and all 394 files under those group directories. It passed root full review, independent code review, default/explicit five-pair CLI tests, and offline scheduling/cleanup stubs: six reused groups followed by fourteen fresh groups in canonical order; fresh baseline setup before the first new Flash-Q6 load; cleanup on injected install/request failures. Two local-only wrapper defects (module-global evidence binding and explicit forwarding of the five-pair default) were corrected before any live resumption. The frozen parent, request adapter, pure candidate, telemetry assertions and final analyzer are unchanged.
The resumer is now active from an offline/no-hold preflight and has started fresh baseline identity setup. Enabled resumer SHA256:
6e1d5faa2b85d23f7069930ffb8b3cdd931251ce638896011bdd68af38169c56; retained-file manifest SHA256:1a467e6a97ba0988c5cf76de5b4fae2e344be6eeb5ab7ea507d44743c6a0750c. New output isjobs/quant-tg05-resume01/result.json; its eventual composite evidence references the unchanged original six group directories and fourteen new ones. It must finish complete/restored, then verify shutdown, before the unchanged five-pair analyzer runs. No model-level performance claim or new production selection has been made.novkien commentedon Oct 4, 2026
Second TG interruption and bounded paired recovery
The reviewed resumer restored exact 5423 after the first new pair2 Qwen baseline group failed the unchanged RPC telemetry gate. All three model requests completed, but the RPC collector recorded seven SSH errors (connection, banner and command timeouts); native GPU and slot streams had no errors. This is invalid telemetry, not a negative Q6 speed result. No comparative speed analysis has been performed.
A separate archive stage held the GPU host from 10:56:45.533247 to 11:04:16.587021 UTC. It overlaps 18.79 seconds of the newly measured Flash pair1 baseline code window and the entire 27.30-second structured window; all pair2 Qwen baseline windows overlap it. This temporal overlap does not prove the cause of the RPC errors. Both newly measured Flash pair1 arms are excluded as a complete paired unit, and the incomplete pair2 is excluded. The original six validated groups remain the only retained prefix. Every original and resumed raw artifact is preserved.
The benchmark unloaded its model and restored both installed packages. The first shutdown was blocked by the foreign hold; root did not modify it or interrupt the stage. Once the stage exited and released its hold, the unchanged graceful shutdown helper verified offline with fresh 5 W at 11:05:23 UTC. Failed/restored resumer receipt SHA-256:
363bf58437dee713744d10f6cb1e0530b52123908f031d08b2baaeef59f59013. Recovery boundary:1185d93c137dcf5100801ba38ad9dfee340094d33ee5e5005f843ee7d3551dd2.Root is preparing a bounded recovery that executes one complete model/pair unit per owned job, with baseline setup, two unchanged alternating arms, restoration and verified shutdown. Subsequent jobs must hash-validate the accepted prefix and prior restored segment before reuse; only the final complete 20-group result is eligible for the unchanged five-pair analyzer. A read-only public hold observer will reject an entire segment on foreign hold or observation failure. No hold mutation, relaxed collector assertion, sampling/configuration change, proxy runtime repair or speed-based sample selection is included. The coordinator remains disabled until root and independent review finish.
Remaining: collect the fourteen valid groups, analyze all six model/family cells, and perform applicable acceptance plus exact-merge delivery only if Q6 qualifies. The accepted production pair remains 5423; no new candidate is selected.
novkien commentedon Oct 4, 2026
Owner stopped competing work; resume the unchanged reviewed campaign
The owner stated in the current Codex task that the Ren'Py task has been stopped and jarvis-llm is now exclusively available to this work. Its last archive stage exited and released its hold. The host was online again during that stage after an earlier verified shutdown; root corrected its stale status wording. The latest graceful shutdown completed at 11:37:17 UTC with offline, fresh 5 W and no hold, followed by a separate non-multiplexed SSH check.
This resolves the recurring competing-work dependency. The newly prepared segmented controller remains disabled and will not be used. Root will resume with the already reviewed, unchanged fourteen-group controller (
6e1d5faa2b85d23f7069930ffb8b3cdd931251ce638896011bdd68af38169c56) into a freshjobs/quant-tg05-resume02directory. Its offline preflight revalidated the original six-group prefix and pinned files. Both interrupted attempts remain excluded exactly as recorded; no comparative speed analysis has occurred.The same pure Q6 package, baseline, alternating order, three cold8192+512 fixtures, telemetry assertions and five-pair analyzer remain in force. The sole owned job must restore exact 5423 and verify shutdown before analysis. No idle inhibition is allowed. If it qualifies, the existing acceptance coordinator has a reviewed disabled v2 adding the originally required one-slot near-full check alongside the existing two-slot stage; no new fixed long-cache threshold was added.
Remaining: fourteen valid groups, all-six-cell TG analysis, applicable acceptance, and exact-merge source/package delivery only for a qualified candidate. Issue #9 remains open and root remains accountable.
novkien commentedon Oct 4, 2026
Work report - owner-requested simpler comparison; Q6 not selected
Codex
/rootremains accountable. During the resumed campaign, the owner asked why so many comparisons were needed and requested a simpler approach. Root stopped after the current complete pair, before examining speed results, rather than running the remaining three paired blocks. This changes the measurement plan; it does not create a new confidence-backed gain claim.Eight complete groups provide two alternating baseline/Q6 pairs for each model, with 24 measured cold8192+512 requests and eight separate warmups. The six original valid groups were reused with frozen file hashes; the two fresh Flash groups passed the same source, request and raw telemetry checks. Earlier contaminated/invalid pairs remain excluded. The ninth group was interrupted during its pre-load configuration read and produced no measurements. The receipt's
failedstatus records this intentionalKeyboardInterrupt, not a model or telemetry failure.These are descriptive two-pair results, without confidence intervals or formal qualification. Qwen paired outputs matched; Flash paired outputs differed, and its structured TG ratios ranged from 0.8829 to 1.1528. PP changed by less than 0.5% in every cell. The modest Qwen results and variable Flash results do not justify more repetitions or promotion from this screen. This is a selection decision, not proof of zero Q6 benefit or a failed five-pair gate.
The exact-5423 native/RPC pair was restored successfully with no forced cleanup. Graceful shutdown was verified offline at 11:50:57 UTC on 2026-10-04 with fresh 5 W (11:50:50 sample), zero active requests and no idle hold. No idle inhibition, proxy restart, alarm reset, route change, new PR or production Q6 deployment occurred. The immutable candidate remains exact 5423 plus pure patch
51b9b224b2ff6d3168b5f6cf91720d5a6018b7c77844bd1cabdb92a018b4f7d5; its passed 100 numerical reference rows and both diagnostic route proofs are separate from these TG results.The local descriptive report is
jobs/quant-tg05-resume02-two-pair-summary.json, SHA-2568e18430d9523d4b94ab2f2a1f7ce390d6916c6f733d18d38103bf491ec3ac000. All original receipts and excluded raw files are retained. Remaining: independent raw-result review and final issue-wide disposition. No additional GPU campaign is scheduled; the previously accepted exact-5423 release remains installed.novkien commentedon Oct 4, 2026
Final handoff - bounded extension complete, exact5423 retained
Codex
/rootreviewed the independent result: all eight completed groups, 24 measured samples and eight excluded warmups are valid; original six-group provenance, raw SSE hashes, native/RPC source identities, unchanged model/startup settings, normal unload and complete error-free telemetry agree with the root analysis. The independent six-cell TG calculation matches the descriptive result. Its local report SHA-256 is350965208288684fd138c5d3c8c8151ace156db18cd586d3dde696316a7259fc.The owner asked to simplify repeated comparisons. The completed two-pair screen gives modest Qwen gains below the original 5% target and variable Flash results; it does not justify another GPU campaign or Q6 promotion. No confidence-backed speedup, five-pair failure, semantic equivalence or zero-effect claim is made. The unresolved statistical variability is a limit of the reported screen, not pending acceptance for a release being installed.
The Qwen pre-/post-code and MTP2/MTP3 comparison is complete with its five-block report; all considered follow-up candidates have scoped dispositions in the current body. No new source candidate is retained for delivery. Under the original instruction to record unsuitable/no-benefit directions without empty PRs, this concludes the bounded extension. The previously accepted PRs #17, #18, #21 and #22 and exact-merge native/RPC release
5423bddf352adc41a8cc59ed02d38a511b333d30remain the delivered outcome. The retained release's prior runtime acceptance is separate from the unpromoted Q6 experiment. This does not mean all ten optimization ideas were implemented or all possible future designs exhausted.Restoration passed with no forced cleanup. Shutdown was verified offline at 11:50:57 UTC with fresh 5 W, zero requests and no hold. A later read-only check at 11:58 UTC still reported offline, no loaded models, no requests and no hold. All raw/failed/excluded receipts and local candidate patches are preserved. No idle inhibition, alarm reset or proxy restart was used, and no GPU work remains running or scheduled by this task.
Remaining work for this bounded task: none. Closing with the accepted historical release and the completed, explicitly limited follow-up results. Future source work can use this evidence without treating unimplemented ideas or the Q6 screen as verified production improvements.
novkien commentedon Oct 4, 2026
Owner decision and implementation claim - promote the reviewed Q6 candidate
The owner explicitly instructed Codex in the current task to deploy the Q6 small-batch optimization, accepting a positive gain below the earlier 5% threshold. This supersedes the prior decision not to promote the two-pair screen. The owner has not requested another performance campaign. Reopening this same work issue for delivery of the already reviewed candidate; this is not a new regression.
Codex
/rootis accountable for exact pure patch51b9b224b2ff6d3168b5f6cf91720d5a6018b7c77844bd1cabdb92a018b4f7d5on base5423bddf352adc41a8cc59ed02d38a511b333d30, in branchcodex/flash9-quant-combined-5423. Scope is the measured SM70 Q6_K W4 shapes plus the measured W1 draft-head shape and their existing backend fixtures. No Q5, profiling overlay, model/GGUF change, route retuning or proxy runtime change is included.Reuse the passed native/RPC builds, 100 CPU-reference rows, both actual-model route proofs, and independently validated two-pair screen. Those descriptive gains remain Qwen +3.51%-3.81%; Flash -0.97% to +4.55% with run-to-run variability. Owner acceptance of this candidate does not turn them into five-pair confidence estimates or universal speedup claims.
Next: root revalidates the unchanged patch and focused local checks; a delivery delegate publishes the reviewed PR and merges the exact head with this open issue linked. Build a new matched native/RPC release from the exact merge, retain 5423 for rollback, activate via normal model lifecycle, and verify source identity plus bounded inference on both models through proxy8082. No repeated TG campaign or unrelated full-context sweep is required for this unchanged dispatch-only candidate. Keep all power constraints: no idle inhibition; wake only for actual build/load/inference, then immediate unload/shutdown with physical verification. Issue stays open until the merged pair is actually installed and the live checks complete.
novkien commentedon Oct 4, 2026
Pre-merge handoff — Q6 candidate
PR #23: #23
The PR is based on
masterat5423bddf352adc41a8cc59ed02d38a511b333d30, with reviewed head46871624dfd0b8b28fcc91683b82838d392dedef. The exact base-to-head patch hash is51b9b224b2ff6d3168b5f6cf91720d5a6018b7c77844bd1cabdb92a018b4f7d5; onlyggml/src/ggml-cuda/mmvq.cuandtests/test-backend-ops.cppchanged.Root reviewed the full patch and surrounding kernel/security logic; focused style/name/diff checks passed; independent review returned GO on the same patch. Reused evidence: native/RPC builds, 100/100 CPU-reference cases, actual Qwen and Flash route proofs, and the descriptive two-pair-per-model screen. The reported screen remains Qwen +3.51% to +3.81% and Flash -0.97% to +4.55%, without confidence intervals or a universal speedup claim.
The PR is mergeable.
masterhas no branch protection and the repository has no rulesets; pending/queued CI is not an enforced merge gate. After merge, Codex/rootremains responsible for building the exact merge, deploying it, and verifying bounded inference on both models through proxy :8082. This issue remains open until those steps pass.novkien commentedon Oct 4, 2026
Final handoff - Q6 merged, deployed and live-verified
The owner's explicit Q6 deployment decision is fulfilled by PR23, exact merge
c2d2a20df48b261d4ce94a3b14374ce4bfed9282. Native and RPC packages were built from that merge and are now installed and retained. Root verified running executable/library identities and HTTP200 cold8192+512 inference on BOTH unchanged Qwen27B and FlashNext routes, normal slot release/unload, final installed identities and retained rollback packages. The complete acceptance report separates source/build/install/activation/behavior and records the corrected CLI-only first attempt.The earlier two-pair gains remain descriptive; the owner selected them without the former5% promotion threshold. No repeated comparative benchmark or unrelated optimization was added. Final wrapper exit0 confirms accepted Q6 retention and no forced cleanup. Shutdown was physically verified offline at13:10:01UTC on2026-10-04 with fresh6W, no hold and zero requests. All idle-inhibition prohibitions were preserved.
No remaining work for this selected Q6 delivery. Closing issue9 with the current body updated to the actual deployed revision. The previous no-promotion decision is superseded; unselected and unimplemented optimization families remain honestly scoped in the history.
novkien commentedon Oct 4, 2026
Owner-directed comparison baseline is ready
The owner asked to prepare the latest stock llama.cpp binary first, preserve the best selected fork release, and let the owner load both backends and compare. The owner also explicitly directed the next native optimization work to implement a candidate, test TG, merge when it improves, and discard neutral/regressing candidates; the former5% promotion threshold is not to be reintroduced. Existing correctness and scope constraints remain. Further experiments wait for this owner-run comparison rather than changing the fork baseline underneath it.
Stock backend
llama.cppis now built and installed as a matched native/RPC pair at upstream revision46847e61582097979f539595d893d83d8e1d1af1, with an empty source-diff hash. Native uses CUDA12.9/SM70-real; RPC uses CUDA13.3/SM120a-real. Build, dependency resolution, native version output, installed manifests and file hashes passed. No model was loaded and no inference or comparison was run by the agent; this is binary readiness for the owner's next load, not a claim of model-level acceptance.The existing stock checkouts were on
restored-20260927at b23efaa with eleven local source modifications. Those branches, HEADs and edits were preserved. Clean upstream source was fetched into separate worktrees at/home/jarvis/.local/share/llama-builds/upstream-46847e615820/sourceon both hosts; only the complete installedllama.cpp/build/binpackages were exchanged, with rollback copies retained.The fork remains exactly PR23/
c2d2a20df48b261d4ce94a3b14374ce4bfed9282on master and in both installed packages. Full before/after fork manifests and source identity checks matched. Routes, model files and bridge/proxy services were unchanged.The completed stock update receipt SHA-256 is
cdba18a894497d913746a71a8cb456ca739b84179b066c21610df019e7621d55. The native build finished in the first compile interval; the RPC build continued from its cache in a second bounded interval without idle inhibition. Final shutdown was verified offline at14:49:57UTC on2026-10-04 with fresh3W, no hold and zero requests. The owner's immediate pull/build preparation request is complete. When source optimization resumes after the comparison, recheck the current base and reopen the primary work issue before edits/PRs, reusing the owner's decision above without asking again for the unchanged scope.