Repository navigation
Conversation
|
I tested this on Windows with a Ryzen 9 7940HS, RTX 4070 Laptop 8 GB and 64 GB DDR5-5600. There is a promising decode result, but I wouldn't call it a task-completion speedup yet. I adapted ae64f76 onto v0.1.39 (6f32ec0), preserving the newer For the same short coding request, an A-B-B-A run gave:
Requests used high reasoning, seed 4242, temperature 1, top-p 0.95, top-k 20 and the same 3,072-token output cap. All four generated implementations passed an independent 155-case check, plus generator, invalid-input and non-mutation checks. The surrounding tool-call and prompt-cache checks also passed: 36 requests across these four runs. The median decode rate rose about 8.5%, while median request time was essentially unchanged: 40.37 vs 40.05 seconds. Draft acceptance and generated lengths also changed, so this doesn't isolate the saved admission wait. It supports further testing on a PCIe 4.0 laptop, but it doesn't test the greedy reproducibility claim or establish a general quality improvement. |
|
@midhatn you have to good hardware for this patch to matter much. |
…elper/primary slots) and PR Niko1221#764 (STRATA_ADAPT_LAG); keep both against the 0.1.39 code
…#783, Niko1221#742, Niko1221#743, Niko1221#731, Niko1221#764, k1, k2b, the sm_75 BF16 GEMM path), with the measured numbers
|
On the slow hardware this is meant for (PCIe 3.0 x8, DDR3) it is a clear gain. An independent measurement, ported by hand onto 0.1.39 (6f32ec0; the hunks are the same, the context PC: Xeon E5-2673 v3 (AVX2), 94 GB DDR3 dual channel, RTX 4060 Ti 16 GB on PCIe 3.0 x8 (engine probe 6.2 GB/s).
In the code-edit windows the time the window sums do not account for (the wait for the swap copies) was 4.4 ms of a |
… stall (cudaEventSynchronize) so that whether a swapped-in expert runs on the GPU or the CPU in a window - they round differently - no longer depends on when its PCIe copy lands. The wait is bounded by the copy volume: on an RTX 2060 SUPER 8 GB over PCIe 3.0 x8 (Q2_0, 2,262 cache slots) it costs ~4.6 ms of a ~50 ms window at every context length, the same as dropping it with STRATA_ADAPT_NOWAIT=1 recovers. Now a window takes the pending swaps only once they are STRATA_ADAPT_LAG windows old (default 2), and then waits for their copies, which have landed by then. The window that first computes a swapped-in expert on the GPU still depends only on the window count, so greedy output is as reproducible as with Niko1221#463's wait; a swapped-in expert just counts one window later. STRATA_ADAPT_LAG=1 is (serve and generate). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ae64f76 to
5a4e0d6
Compare
…764, ported onto 0.1.40's adaptive tier) A verify window takes the previous adapt round's swaps once they are STRATA_ADAPT_LAG windows old. The default is 1, exactly 0.1.39; lag 2 is opt-in. pending_age resets after every pending.clear(). The batch paths, --pipeline-windows and the peer tier are not lagged. Co-authored-by: Benjamin Larsson <banan@ludd.ltu.se> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
In 0.1.40: STRATA_ADAPT_LAG is in. The default is 1, which is exactly 0.1.39; lag 2 is opt-in until we have a KL check. pending_age is reset after pending.clear(). |
…764, ported onto 0.1.40's adaptive tier) A verify window takes the previous adapt round's swaps once they are STRATA_ADAPT_LAG windows old. The default is 1, exactly 0.1.39; lag 2 is opt-in. pending_age resets after every pending.clear(). The batch paths, --pipeline-windows and the peer tier are not lagged. Co-authored-by: Benjamin Larsson <banan@ludd.ltu.se>
… stall (Niko1221#764, ported onto 0.1.40's adaptive tier) A verify window takes the previous adapt round's swaps once they are STRATA_ADAPT_LAG windows old. The default is 1, exactly 0.1.39; lag 2 is opt-in. pending_age resets after every pending.clear(). The batch paths, --pipeline-windows and the peer tier are not lagged. Co-authored-by: Benjamin Larsson <banan@ludd.ltu.se>
… stall (Niko1221#764, ported onto 0.1.40's adaptive tier) A verify window takes the previous adapt round's swaps once they are STRATA_ADAPT_LAG windows old. The default is 1, exactly 0.1.39; lag 2 is opt-in. pending_age resets after every pending.clear(). The batch paths, --pipeline-windows and the peer tier are not lagged. Co-authored-by: Benjamin Larsson <banan@ludd.ltu.se>
…iko1221#764) 検証窓は、前の適応の巡の入れ替えを STRATA_ADAPT_LAG 窓たってから取り込み、そのときコピーを待つ(もう届いている)。 既定の 1 はこれまでどおり(次の窓が待つ)。2 は opt-in。入れ替えたエキスパートを GPU で計算し始める窓が窓の数だけで 決まるので、答えの再現性は Niko1221#463 のまま(答えは遅らせた分だけ変わる)。batch の経路は遅らせない。DETAILS に書いた。 contrib のビルド、IQ2_XS、デコードだけ(512 トークン × 6 問)、既定と交互に 3 巡、1 枚ずつ: B70 77.85 / 75.59 / 76.10 → 76.82 / 76.69 / 77.13 トークン/秒、RTX 4070 59.19 / 58.94 / 59.02 → 64.24 / 64.16 / 64.24。
#463 made a verify window wait for the adaptive tier's previous swaps (cudaEventSynchronize) so that whether a swapped-in expert runs on the GPU or the CPU in a window - they round differently - no longer depends on when its PCIe copy lands. The wait is bounded by the copy volume: on an RTX 2060 SUPER 8 GB over PCIe 3.0 x8 (Q2_0, 2,262 cache slots) it costs ~4.6 ms of a ~50 ms window at every context length, the same as dropping it with STRATA_ADAPT_NOWAIT=1 recovers.
Now a window takes the pending swaps only once they are STRATA_ADAPT_LAG windows old (default 2), and then waits for their copies, which have landed by then. The window that first computes a swapped-in expert on the GPU still depends only on the window count, so greedy output is as reproducible as with #463's wait; a swapped-in expert just counts one window later. STRATA_ADAPT_LAG=1 is #463's behaviour; STRATA_ADAPT_NOWAIT=1 keeps its meaning. Both decode loops (serve and generate).