Repository navigation
Conversation
3081dd2 to
bf0e6f6
Compare
bf0e6f6 to
7c5b820
Compare
24 GB Qwen3.8-27B context and VRAM measurementMeasured on an NVIDIA GeForce RTX 5090 Laptop GPU (24,463 MiB) using TensorFold commit Both variants were started with explicit host embedding residency, one stream (
Safetensors source payload breakdown:
Pinned host memory measured 2.429 GiB for both runs (about 0.061 GiB beyond the embedding payload). The startup lines reported 17.83 GiB and 19.83 GiB of model allocation before per-stream reservation, respectively. The 1 GiB admission reserve reduces the usable budget; it is not a separate allocation. NVML process memory is about 0.28 GiB above TensorFold's active allocator metric, and whole-card use includes about 0.08 GiB outside the process. Target BF16 KV costs 64 KiB/token (16 full-attention layers × 4 KV heads × 256 dimensions × K/V × 2 bytes); the MTP ring adds 4 KiB/token. The non-context column is measured CUDA active memory minus those cache amounts. It includes target/drafter allocations, fixed state and workspaces. TensorFold does not expose separate live counters for target weights, MTP weights and scratch, so this remainder is not a scratch-only figure. The source payloads are not exact device allocations; MTP source tensors are BF16 and are quantized to affine-4 tables at load. Loader note: the Unsloth checkpoint config declares No prompt was submitted at the maximum, so these results establish startup allocation capacity, not full-context prefill, quality or throughput. This means we can store a context of 56,014 tokens with NVIDIA ModelOpt NVFP4, or 25,053 tokens with Unsloth NVFP4, in this 24 GB card under the measured settings. |
24 GB VRAM follow-up: reserve and FP8 KV experimentHardware: NVIDIA GeForce RTX 5090 Laptop GPU, 24,463 MiB capacity (23.89 GiB, sm_120).
The default 1 GiB reserve is an admission margin, not a separate VRAM allocation. With BF16 KV and a 0.5 GiB reserve, ModelOpt started at 63,724 tokens, close to 64k; the 64,000-token probe was refused (rounded planner estimate: 4.76 GiB required versus 4.74 GiB available). FP8 KV is lossy and may change generated tokens. We are aware the current project policy disallows introducing lossy cache formats, including opt-in support; the existing Qwen FP8 path predates that policy (issue #4107). These rows are an interesting experiment in the specific context of constrained 24 GB VRAM capacity, not a proposal to expand FP8 support or change policy. No prompt or output-fidelity comparison was run. Every row reports startup admission only. No prompt was submitted, so these figures do not establish that a full-length prefill succeeds. |
24 GB VRAM follow-up: tap ring and recurrent scratchA source audit explains the earlier 0.13 GiB startup-charge difference and found a separate 60 MiB per-stream omission in MTP admission accounting. MTP tap ring. Qwen3.5 uses 6,144 rows for this scenario (2,048 tap-window rows + 4,096 prompt-pass rows). One BF16 tap at hidden size 5,120 is 62,914,560 bytes = 60 MiB. The target cache allocates it after the MTP drafter installs its tap list, but the target's The 0.13 GiB variation. The earlier 17.83 GiB run logged Rollback and cancellation. MTP depth 3 alone would need at most four verify rows, but the measured dense Qwen3.8 setup also has root/context copies enabled. With a 64-row family width, copy proposals can reach 64 rows, so For this 27B geometry, dropping only the inference before-copy allowance would reduce the current recurrent bound by 153,944,064 bytes = 0.14337 GiB per stream while preserving Sources: tap sizing and allocation, target stream charge, MTP stream facts, cost-cache validation, recurrent bound, and copy width setup. |
00a7fe7 to
3fdd3d9
Compare
3fdd3d9 to
a7c26dd
Compare
Qualification evidence for
|
What this changes
Qwen3.5 CUDA can keep BF16 input embeddings in mapped host RAM.
--embedding-residency auto|device|hostselects host rows when device-memory admission requires them or honors explicit placement. The BF16 row payload is copied unchanged. Supported checkpoint formats are ModelOpt NVFP4 and compressed-tensors NVFP4, including Unsloth; the embedding table itself remains BF16. Existing EXL3 automatic offload behavior is retained.The shared MTP sizing helper is used so embedding auto-selection accounts for an active drafter’s actual startup and resident memory. It preserves the existing scratch layout and does not reduce recurrent scratch or implement the separate MTP charge change from #5134; the admission calculation includes allocator alignment padding (zero for the tested Qwen3.8-27B geometry).
a7c26dd98e7bd5c8b97a0edbbd5686bdca5e0735, one commit onmainat77eae824e425d7d3bea11f15e191983b99b53ba8.Checks
zig fmt --checkandgit diff --checkpassed.sm_120passed.zig build test test-golden: 14,211 passed, 107 skipped; one XPU-only test failed during Level Zero initialization (zeInit: 0x78000001). Golden comparison reported 327/340 equal and 0 unexpected differences (13 known differences). The failure is recorded as an environment limitation; a baseline reproduction was not completed.ATC overlap
Latest scan: 2026-11-27 03:12 UTC, against base
77eae824e425d7d3bea11f15e191983b99b53ba8. It is incomplete because of GitHub result limits. It reports conflicts with PRs #3729, #3567, #3566, #3565, #3564, and #3563, plus 108 overlaps with unknown status. One overlapping worktree is stale and was excluded from this work as directed. The remaining overlap evidence is noted for coordination.Receipt
--embedding-residency, valuesauto,device,host; defaultauto.Checklist
draft: false, resumed versus fresh prompts, concurrent versus solo requests, and main-versus-branch performance remain unqualified.