[GH-ISSUE #1238] 0.1.40: --layer-split auto with STRATA_STAGE_TRIM=1 still picks K=2 on a P40 + RTX 3070; 572b607 fixes it but is not in the release #510

Closed
opened 2026-11-04 01:43:37 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @paulhothersall on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1238

On v0.1.40, --layer-split auto with STRATA_STAGE_TRIM=1 and the P40 first still picks K=2 and prefills at 107 / 112 tok/s (4K / 32K), in two launches; @gopinath87607's 572b607 (the footprint fix posted in #880) picks K=16 and gives 343 / 654. Limit: one rig, IQ3_XXS, three runs per cell; 572b607 was built on the #880 branch (ce1e63f), not cherry-picked onto the 0.1.40 release.

Setup: P40 24 GB + RTX 3070 8 GB, 64 GB RAM, IQ3_XXS, ctx 36,864, --layer-split auto, same-day runs. Prefill = prompt tokens / TTFT (runs 2-3). Decode is not compared (31-45 tok/s inside one launch).

build order trim K prefill 4K / 32K
0.1.40 P40 first 1 2 107 / 112 (two launches)
572b607 P40 first 1 16 343 / 654 (two launches)
0.1.40 P40 first 0 16 192 / 220
572b607 P40 first 0 16 192 / 220
0.1.40 3070 first 0 or 1 43 460 / 617
572b607 3070 first 0 or 1 43 459 / 617

My reading: the 2 MiB-granule pricing in 572b607 closes the gap, as its commit message says. Trim-off and 3070-first match 0.1.40, so the fix changes only the arm that was wrong.
Ask: could 572b607 go into the next release, or is there a reason it stays out?
Not tested: other quants or cards, a single-card case, and 0.1.40 with the commit cherry-picked.

Originally created by @paulhothersall on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1238 **On v0.1.40, `--layer-split auto` with `STRATA_STAGE_TRIM=1` and the P40 first still picks K=2 and prefills at 107 / 112 tok/s (4K / 32K), in two launches; @gopinath87607's 572b607 (the footprint fix posted in #880) picks K=16 and gives 343 / 654.** Limit: one rig, IQ3_XXS, three runs per cell; 572b607 was built on the #880 branch (ce1e63f), not cherry-picked onto the 0.1.40 release. Setup: P40 24 GB + RTX 3070 8 GB, 64 GB RAM, IQ3_XXS, ctx 36,864, `--layer-split auto`, same-day runs. Prefill = prompt tokens / TTFT (runs 2-3). Decode is not compared (31-45 tok/s inside one launch). | build | order | trim | K | prefill 4K / 32K | |---|---|---|---|---| | 0.1.40 | P40 first | 1 | 2 | 107 / 112 (two launches) | | 572b607 | P40 first | 1 | 16 | 343 / 654 (two launches) | | 0.1.40 | P40 first | 0 | 16 | 192 / 220 | | 572b607 | P40 first | 0 | 16 | 192 / 220 | | 0.1.40 | 3070 first | 0 or 1 | 43 | 460 / 617 | | 572b607 | 3070 first | 0 or 1 | 43 | 459 / 617 | My reading: the 2 MiB-granule pricing in 572b607 closes the gap, as its commit message says. Trim-off and 3070-first match 0.1.40, so the fix changes only the arm that was wrong. Ask: could 572b607 go into the next release, or is there a reason it stays out? Not tested: other quants or cards, a single-card case, and 0.1.40 with the commit cherry-picked.
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Thanks for the table. 0.1.40.2 prices a later stage's weights per candidate range when --layer-split auto is used with STRATA_STAGE_TRIM=1: the trimmed arena plus the projections with cudaMalloc's 2 MiB granules, ported from 572b607 onto the current loader (credit to gopinath87607). Runs without the trim are unchanged. We have no unequal pair here, so please rerun your P40 + 3070 case on 0.1.40.2 and say what K it picks.

<!-- gh-comment-id:6038092742 --> @Niko1221 commented on GitHub (Oct 7, 2026): Thanks for the table. 0.1.40.2 prices a later stage's weights per candidate range when --layer-split auto is used with STRATA_STAGE_TRIM=1: the trimmed arena plus the projections with cudaMalloc's 2 MiB granules, ported from 572b607 onto the current loader (credit to gopinath87607). Runs without the trim are unchanged. We have no unequal pair here, so please rerun your P40 + 3070 case on 0.1.40.2 and say what K it picks.
Author
Owner

@paulhothersall commented on GitHub (Oct 7, 2026):

On 0.1.40.2, --layer-split auto with STRATA_STAGE_TRIM=1 and the P40 first now picks K=16 (not 2) and prefills at 342 / 654 tok/s (4K / 32K), one launch; the engine log shows the priced stage at 2363 MiB against 2366 MiB taken. Same rig and setup as the table above (P40 24 GB + RTX 3070 8 GB, IQ3_XXS, ctx 36,864, built from the v0.1.40.2 tag with archs 61, 75, 86; prefill = prompt tokens / TTFT, runs 2-3).

0.1.40.2 arm K prefill 4K / 32K
P40 first, trim 1 16 342 / 654
P40 first, trim 0 16 192 / 220
3070 first, trim 0 or 1 43 458 / 611-616
forced --layer-split 34, trim 1, 3070 first (for #875) 34 446 / 799

The trim-off and 3070-first arms match 0.1.40. For #875: with the 3070 first, auto picks K=43 and reads a 32K prompt at 616 tok/s; a forced K=34 reads it at 799 (4K: 458 vs 446). auto with --kv int8 or --vram-reserve-mib 600 still picks K=47 and drops to 111-113 at 4K (one launch each).

Caveat, measured, cause not found: on this split decode is lower on 0.1.40.2 than on 0.1.40 in interleaved A/B runs (3070 first, K=43, 4K): 29.9 vs 36.7 tok/s and 30.7 vs 35.3 in two sets of 9 vs 9 runs, lower in every round, prefill the same. It is not our extra sm_75 architecture, STRATA_UNBUFFERED_LOAD=1 or STRATA_MMVQ_IL=0 (none restores it). I am bisecting and will open a separate issue if I find the commit.

Not tested: other quants or cards, a single-card decode comparison (queued).

<!-- gh-comment-id:6045365936 --> @paulhothersall commented on GitHub (Oct 7, 2026): **On 0.1.40.2, `--layer-split auto` with `STRATA_STAGE_TRIM=1` and the P40 first now picks K=16 (not 2) and prefills at 342 / 654 tok/s (4K / 32K), one launch; the engine log shows the priced stage at 2363 MiB against 2366 MiB taken.** Same rig and setup as the table above (P40 24 GB + RTX 3070 8 GB, IQ3_XXS, ctx 36,864, built from the v0.1.40.2 tag with archs 61, 75, 86; prefill = prompt tokens / TTFT, runs 2-3). | 0.1.40.2 arm | K | prefill 4K / 32K | |---|---|---| | P40 first, trim 1 | 16 | 342 / 654 | | P40 first, trim 0 | 16 | 192 / 220 | | 3070 first, trim 0 or 1 | 43 | 458 / 611-616 | | forced `--layer-split 34`, trim 1, 3070 first (for #875) | 34 | 446 / 799 | The trim-off and 3070-first arms match 0.1.40. For #875: with the 3070 first, `auto` picks K=43 and reads a 32K prompt at 616 tok/s; a forced K=34 reads it at 799 (4K: 458 vs 446). `auto` with `--kv int8` or `--vram-reserve-mib 600` still picks K=47 and drops to 111-113 at 4K (one launch each). Caveat, measured, cause not found: on this split decode is lower on 0.1.40.2 than on 0.1.40 in interleaved A/B runs (3070 first, K=43, 4K): 29.9 vs 36.7 tok/s and 30.7 vs 35.3 in two sets of 9 vs 9 runs, lower in every round, prefill the same. It is not our extra sm_75 architecture, `STRATA_UNBUFFERED_LOAD=1` or `STRATA_MMVQ_IL=0` (none restores it). I am bisecting and will open a separate issue if I find the commit. Not tested: other quants or cards, a single-card decode comparison (queued).
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156041084 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#510
No description provided.