draft(qwen4): add hardware-fit runtime and modular artifact path - #1
Conversation
d80149a to
b6c53cb
Compare
|
Important viability update: external RTX 4090 evidence at the current FlashML-org#232 head reports about 69% GPU expert-cache misses with 1,024 slots. That is not a measured SSD-tier miss rate, but it means the earlier 1%/5% FileExpertSource envelopes cannot be treated as expected behavior. For the proposed 12 tier layers, a 69% sensitivity would require 1,242 aligned record reads/s (3,444 MB/s) at 15 tok/s, above the current warm, effectively serial Stage 6 path. Real checkpoint acquisition therefore remains technically blocked pending routing-informed tier selection, another fit-valid placement, or bounded asynchronous FileExpertSource evidence. The draft body now carries the full distinction and table summary; real payload transfer remains zero bytes. |
|
Step 10 / Windows runtime status update (2026-08-29):
So the evidence classification is: Windows ZMQ remediation PASS; Step 10 8K/16K BLOCKED before first-token execution. No quality, throughput, TTFT, or decode claim is being made. The owned runtime tree was torn down cleanly. These Windows follow-ups should remain narrow rather than merging this historical draft stack wholesale. |
|
Step 10 Windows runtime update (2026-08-29, follow-up):
Current classification: single real 8K run MEASURED PASS; deterministic 8K repeat BLOCKED; 16K NOT STARTED. No quality or 16K claim is being made. The owned model process was torn down and RAM/GPU returned. The next patch should remain narrowly scoped to the Windows CPU-AOT toolchain path rather than merging this draft stack wholesale. |
|
Step 10 Windows validation update (measured real artifact evidence):
Durable local evidence: |
|
Stage 12A low-context router update (RTX 5070, frozen 28-file/20-resident QD4 placement, graphs off):
Conclusion: the router patch is not being promoted; the real delta is noise. The dominant cost is eager full-layer expert materialization (~68.15 GB moved per prefill across 48 layers), which makes 1K-4K wall time nearly flat. The next optimization lane should instrument FileExpertSource SSD reads, resident HostBank transfers, and GPU-cache activity separately, then reduce that fixed materialization cost. No 8K confirmation was run because the lower-context gain gate did not pass. |
|
Stage 12C routed-expert prefill update (real artifact, RTX 5070, frozen 28-file/20-resident QD4 placement, graphs and prefill overlap off):
Conclusion: retain routed-set materialization as an opt-in candidate, with the measured sweet spot at 1K-4K and a useful 8K gain. For 16K, the next justified lane is the exact Windows router/attention path rather than further SSD queue-depth tuning. The runtime still reports the known pure-Torch router fallback because |
Important
Upstream PR FlashML-org#232 was closed unmerged on 2026-08-29 as superseded by merged PR FlashML-org#257. This draft remains a historical/component review stack on the old PR232 base, not an upstream merge candidate. The active production runtime authority is PR257. Any upstream follow-up should be split narrowly onto current
main/PR257 rather than merging or retargeting this branch wholesale.Stack and intent
This is a draft, stacked review PR for the Qwen3.8/Qwen4-Exp hardware-fit work. Its review base remains the superseded Qwen4 implementation from FlashML-org/FreeToken#232, while the production runtime foundation is the reviewed and merged PR257 head.
The branch is a review surface, not a merge-ready monolith. Useful pieces should be split or retargeted once their upstream boundaries are agreed.
What is represented
Q3_PLE_32reader/writer with 128 logical source segments.FTEXPERT1sidecars and file-backed expert-source/cache integration.shard_0..shard_127plus the global scale.Real Step 9B completion
Real acquisition and conversion completed under separately authorized supervisor gates:
The active tensor stream naturally ended at
4,804,399,104bytes. The frozen analytical total had counted the separately stored two-byte global PLE scale as one aligned 4-KiB page. The Stage 7K helper adds exactly one zero terminal compatibility page; it does not add a tensor or duplicate the PLE scale. All 1,698 tensor keys, offsets, lengths, dtypes, shapes, kinds, and every pre-tail byte remain unchanged.Final artifact evidence:
06d6af4a40bbe2832fa51dc07d0c2c810c76e3c29e51f723dbe262a4cd92a876d9176faad41119608746567dc9ed9b51ef7046e128f4db921ce3c6cb792fd50da29fd1952f72ee64d55d50b5694b121c483e092506413a53a8d7c7e7bf38142612848C6 static PR257 reopen
The final artifact passed isolated static validation using runtime commit
0307a6114c57b0efc61bc17688f3288fe0bf1dc7:No full model was constructed. No layer or forward pass ran. No inference, generation, serving, throughput benchmark, quality evaluation, populated-context test, retiering, or CUDA-graph optimization ran. Step 10 remains separately gated.
Validation
The isolated Stage 7K authority passed 148 checkpoint tests plus compileall and diff-check. The exact Stage 7J and Stage 7K commits replayed cleanly onto this draft branch; the resulting PR branch passed:
Independent adversarial review found and closed two atomic-index cleanup issues before the Stage 7K commit: stale index-temp contamination of artifact hashing, and partial cleanup before conflicting-candidate discovery.
Review boundaries
The most useful review areas are the explicit source identity model, durable restart semantics, Q3/FTEXPERT1 component boundaries, byte-exact CUDA Q3 encoder, and the FTW terminal-padding recovery contract. Please do not merge this draft as one unit. Production runtime validation, 8K/16K behavior, throughput, quality, retiering, and graph optimization remain outside this PR's evidence.