[GH-ISSUE #82] Speed data: 2x RTX A4000 16 GB (PCIe 3.0 x16), Xeon W-2135, 128 GB DDR4 - unsloth UD-IQ4_XS (157 GB), 9.0 tok/s decode #32

Closed
opened 2026-10-29 21:19:26 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @speja969 on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/82

Machine

GPUs 2x NVIDIA RTX A4000 16 GB (Ampere, sm_86), both PCIe Gen3 x16
Power GPU 0 capped at 110 W on purpose (blower cooler), GPU 1 at the default 140 W
CPU Intel Xeon W-2135, 6 cores / 12 threads (AVX-512 F/BW/VL/DQ, no VNNI/VBMI, so the AVX2 lane)
RAM 128 GB DDR4-2666, 4 channels (125 GB visible; the engine measured 53 GB/s)
Disks GGUF shards on a Samsung 990 EVO Plus 1 TB (NVMe, ext4), linked into a folder on a WD Black SN770 1 TB that holds the pack
System Debian 13, NVIDIA driver 590.48.01, CUDA 13.0 (V13.0.88), g++ 14.2, Python 3.13

Setup

  • Project Maya v1.0.30 (c189f7a)
  • ./setup.sh --gguf-dir <folder> --gpus 0,1 --context 32768 --nvcc /usr/local/cuda-13.0/bin/nvcc --plain, images on (Maya's mmproj)
  • Model: unsloth/GLM-5.3-Flash-GGUF UD-IQ4_XS, 5 shards, 156.8 GB, architecture glm5next. It needed the workaround for shard 1 from my separate issue.
  • Calibration: the engine's own split (PCIe share 0.60) 9.6 tok/s, share 0.00 5.2, 3 CPU threads 9.2, 2 CPU threads 8.5, so it kept the defaults.

--bench (32K context)

Run Decode (3 answers of 256 tokens) Prefill 2K Prefill 8K
1 8.2 tok/s (7.8 / 8.6 / 8.2) 173 tok/s 438 tok/s
2 9.0 tok/s (8.4 / 9.9 / 8.7) 173 tok/s 437 tok/s

Engine lines from run 2 (also in the attached report):

  • split auto: layers [0,23) on CUDA0, [23,45) on CUDA1, predicted 59.7 ms a token; measured 98.6-118.6 ms
  • VRAM expert pool 9.61 + 9.34 GB (860 + 851 slots); RAM tier 52.15 + 59.99 GB pinned
  • per token: VRAM hit 39.7-51.3%, RAM fetches 94-111, CPU lane 70-88, disk 1.3-2.3 reads (6.9-11.0 ms)
  • MTP with unsloth's NextN block (blk.45, q3_K/q4_K experts): 87.3% of drafts accepted

Through the API (temperature 0, thinking off)

Context Request Decode Prefill
32K 36-token prompt, 512 tokens, 3 times 9.6 / 10.6 / 10.4 tok/s -
96K the same 10.0 / 11.2 / 11.0 tok/s -
96K 80,050-token prompt, 256 tokens 8.3 tok/s 725 tok/s
96K the same again (80,049 tokens reused) 9.1 tok/s -

At 96K: state/KV 0.86 GB on CUDA1 (0.37 GB at 32K), expert slots 820 + 805. The context was changed to 96K in the dashboard after the bench, so the attached config says 96K while the bench section is from 32K.

Observations

  • During decode GPU 0 runs at 100% (107 of its 110 W, 79 °C) and GPU 1 at 62% (87 of 140 W). The split search treats the cards as equal and does not know about the power cap. I have not tried STRATA_GLM_SPLIT yet.
  • For comparison: llama.cpp (a build with GLM-5.3 support, the same GGUF, --fit on -c 32768 -fa on) gave about 4.4 tok/s decode on this machine. That was not measured with the same harness.
  • Images: I used Maya's mmproj. unsloth's mmproj-BF16.gguf has the same projector type (glm5next) and 348 tensors, but no clip.vision.ffn_clamp, so Maya's encoder would run it without the clamp. Not tested.

Not measured

llama.cpp with the same harness, STRATA_GLM_SPLIT or --gpus 1,0, STRATA_GLM_KV_INT8, image requests.

Attached: maya-report.txt (./maya.sh --bench, then ./maya.sh --report).

maya-report.txt

Originally created by @speja969 on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/82 ### Machine | | | | --- | --- | | GPUs | 2x NVIDIA RTX A4000 16 GB (Ampere, sm_86), both PCIe Gen3 x16 | | Power | GPU 0 capped at 110 W on purpose (blower cooler), GPU 1 at the default 140 W | | CPU | Intel Xeon W-2135, 6 cores / 12 threads (AVX-512 F/BW/VL/DQ, no VNNI/VBMI, so the AVX2 lane) | | RAM | 128 GB DDR4-2666, 4 channels (125 GB visible; the engine measured 53 GB/s) | | Disks | GGUF shards on a Samsung 990 EVO Plus 1 TB (NVMe, ext4), linked into a folder on a WD Black SN770 1 TB that holds the pack | | System | Debian 13, NVIDIA driver 590.48.01, CUDA 13.0 (V13.0.88), g++ 14.2, Python 3.13 | ### Setup - Project Maya v1.0.30 (`c189f7a`) - `./setup.sh --gguf-dir <folder> --gpus 0,1 --context 32768 --nvcc /usr/local/cuda-13.0/bin/nvcc --plain`, images on (Maya's mmproj) - Model: unsloth/GLM-5.3-Flash-GGUF **UD-IQ4_XS**, 5 shards, 156.8 GB, architecture `glm5next`. It needed the workaround for shard 1 from my separate issue. - Calibration: the engine's own split (PCIe share 0.60) 9.6 tok/s, share 0.00 5.2, 3 CPU threads 9.2, 2 CPU threads 8.5, so it kept the defaults. ### `--bench` (32K context) | Run | Decode (3 answers of 256 tokens) | Prefill 2K | Prefill 8K | | --- | ---: | ---: | ---: | | 1 | 8.2 tok/s (7.8 / 8.6 / 8.2) | 173 tok/s | 438 tok/s | | 2 | **9.0 tok/s** (8.4 / 9.9 / 8.7) | 173 tok/s | 437 tok/s | Engine lines from run 2 (also in the attached report): - split auto: layers [0,23) on CUDA0, [23,45) on CUDA1, predicted 59.7 ms a token; measured 98.6-118.6 ms - VRAM expert pool 9.61 + 9.34 GB (860 + 851 slots); RAM tier 52.15 + 59.99 GB pinned - per token: VRAM hit 39.7-51.3%, RAM fetches 94-111, CPU lane 70-88, disk 1.3-2.3 reads (6.9-11.0 ms) - MTP with unsloth's NextN block (blk.45, q3_K/q4_K experts): 87.3% of drafts accepted ### Through the API (temperature 0, thinking off) | Context | Request | Decode | Prefill | | --- | --- | ---: | ---: | | 32K | 36-token prompt, 512 tokens, 3 times | 9.6 / 10.6 / 10.4 tok/s | - | | 96K | the same | 10.0 / 11.2 / 11.0 tok/s | - | | 96K | 80,050-token prompt, 256 tokens | 8.3 tok/s | **725 tok/s** | | 96K | the same again (80,049 tokens reused) | 9.1 tok/s | - | At 96K: state/KV 0.86 GB on CUDA1 (0.37 GB at 32K), expert slots 820 + 805. The context was changed to 96K in the dashboard after the bench, so the attached config says 96K while the bench section is from 32K. ### Observations - During decode GPU 0 runs at 100% (107 of its 110 W, 79 °C) and GPU 1 at 62% (87 of 140 W). The split search treats the cards as equal and does not know about the power cap. I have not tried `STRATA_GLM_SPLIT` yet. - For comparison: llama.cpp (a build with GLM-5.3 support, the same GGUF, `--fit on -c 32768 -fa on`) gave about 4.4 tok/s decode on this machine. That was not measured with the same harness. - Images: I used Maya's mmproj. unsloth's `mmproj-BF16.gguf` has the same projector type (`glm5next`) and 348 tensors, but no `clip.vision.ffn_clamp`, so Maya's encoder would run it without the clamp. Not tested. ### Not measured llama.cpp with the same harness, `STRATA_GLM_SPLIT` or `--gpus 1,0`, `STRATA_GLM_KV_INT8`, image requests. Attached: `maya-report.txt` (`./maya.sh --bench`, then `./maya.sh --report`). [maya-report.txt](https://github.com/user-attachments/files/33274908/maya-report.txt)
Author
Owner

@mw00 commented on GitHub (Oct 10, 2026):

Thank you for the full report.

  1. The first shard: fixed in #85 (your #83). The setup will take unsloth's metadata-only shard as it is.
  2. GPU 0 at 100% and GPU 1 at 62%: the split search sizes each card's layers by its memory bandwidth and SMs x clock. It doesn't know about a power limit, so with GPU 0 capped at 110 W the prediction (59.7 ms a token) was far from the measured ~100-119 ms. Moving layers to GPU 1 should help. Please try:
    • "STRATA_GLM_SPLIT": "21" and "19" in the config's "env" block: GPU 0 then takes layers 0-20 or 0-18 (auto gave it 0-22);
    • with Maya stopped, ./maya.sh --bench for each, and post the decode.
  3. The mmproj: keep Maya's. It's the one tested with the encoder, and it has the clamp unsloth's lacks.
<!-- gh-comment-id:6096940670 --> @mw00 commented on GitHub (Oct 10, 2026): Thank you for the full report. 1. **The first shard:** fixed in #85 (your #83). The setup will take unsloth's metadata-only shard as it is. 2. **GPU 0 at 100% and GPU 1 at 62%:** the split search sizes each card's layers by its memory bandwidth and SMs x clock. It doesn't know about a power limit, so with GPU 0 capped at 110 W the prediction (59.7 ms a token) was far from the measured ~100-119 ms. Moving layers to GPU 1 should help. Please try: - `"STRATA_GLM_SPLIT": "21"` and `"19"` in the config's `"env"` block: GPU 0 then takes layers 0-20 or 0-18 (auto gave it 0-22); - with Maya stopped, `./maya.sh --bench` for each, and post the decode. 3. **The mmproj:** keep Maya's. It's the one tested with the encoder, and it has the clamp unsloth's lacks.
Author
Owner

@speja969 commented on GitHub (Oct 11, 2026):

Thanks for the explanation. I ran the splits, but first, two changes since my report:

  • Maya v1.0.34 (git pull, the start recompiled the engine with the same CUDA 13.0).
  • RAM is now 256 GB DDR4-2400 (8 DIMMs, was 128 GB DDR4-2666). The split search measures RAM at 50 GB/s (53 before). The whole model now sits off-card in RAM: RAM tier 52.45 + 74.30 GB pinned, 0.00 disk reads per token.

Context is 98304 for all runs. Each row is one ./maya.sh --bench (3 answers of 256 tokens, greedy, thinking off), run in the order shown.

env GPU 0 / GPU 1 layers Decode (3 answers) Mean Prefill 2K / 8K
(auto) [0,24) / [24,45) 9.3 / 9.6 / 10.1 9.7 171 / 433
STRATA_GLM_SPLIT=21 [0,21) / [21,45) 9.1 / 9.7 / 9.5 9.4 173 / 439
STRATA_GLM_SPLIT=19 [0,19) / [19,45) 8.6 / 9.1 / 8.8 8.9 173 / 441
(auto), again [0,24) / [24,45) 9.4 / 10.0 / 10.3 9.9 172 / 438
STRATA_GLM_RAM_RESIDENT=1 auto 9.9 / 10.1 / 10.4 10.1 172 / 438
RAM_RESIDENT=1, PROMOTE_MIN=6 auto 10.1 / 10.4 / 10.3 10.3 172 / 437

Moving layers to GPU 1 made decode slower, step by step. Later runs had more usage history, which should favour them, and they were still slower. With 256 GB the auto split gave GPU 0 one layer more than before (24 instead of 23). It predicted 69.2 ms a token; glm stat measured 85-108 ms.

GPU 0's 100% utilisation is probably not the limit. During the runs:

Power Temperature Utilisation
GPU 0 (110 W cap) 105-109 W 77-81 °C 0% and 100% in turn
GPU 1 up to 128 W 55-64 °C 0% and 100% in turn

The two cards take turns at 100%, which looks like the pipelined decode rather than a saturated GPU 0.

RAM-resident: with everything in RAM, RAM_RESIDENT=1 + PROMOTE_MIN=6 is about 4-5% faster than auto. That is more than the 9.7-9.9 run-to-run spread. Per token:

Disk waits VRAM hit RAM fetches CPU lane
auto ~10 (0.1 ms) 40-49% ~100-117 ~77-91 experts
RAM_RESIDENT=1 + PROMOTE_MIN=6 0 43-52% ~99-113 ~77-89 experts

So nowhere near the 4090 D's 1.9x: here every token still pulls ~100 experts over PCIe 3.0 and the CPU lane computes ~80. I'm keeping auto + RAM_RESIDENT=1 + PROMOTE_MIN=6.

mmproj: kept Maya's. unsloth's BF16 file also loads and gave practically the same answers on two test images (a TUI screenshot and a 3D scene), but yours has the clamp.

<!-- gh-comment-id:6111243460 --> @speja969 commented on GitHub (Oct 11, 2026): Thanks for the explanation. I ran the splits, but first, two changes since my report: - **Maya v1.0.34** (git pull, the start recompiled the engine with the same CUDA 13.0). - **RAM is now 256 GB DDR4-2400** (8 DIMMs, was 128 GB DDR4-2666). The split search measures RAM at 50 GB/s (53 before). The whole model now sits off-card in RAM: RAM tier 52.45 + 74.30 GB pinned, 0.00 disk reads per token. Context is 98304 for all runs. Each row is one `./maya.sh --bench` (3 answers of 256 tokens, greedy, thinking off), run in the order shown. | `env` | GPU 0 / GPU 1 layers | Decode (3 answers) | Mean | Prefill 2K / 8K | | --- | --- | --- | ---: | ---: | | (auto) | [0,24) / [24,45) | 9.3 / 9.6 / 10.1 | 9.7 | 171 / 433 | | `STRATA_GLM_SPLIT=21` | [0,21) / [21,45) | 9.1 / 9.7 / 9.5 | 9.4 | 173 / 439 | | `STRATA_GLM_SPLIT=19` | [0,19) / [19,45) | 8.6 / 9.1 / 8.8 | 8.9 | 173 / 441 | | (auto), again | [0,24) / [24,45) | 9.4 / 10.0 / 10.3 | 9.9 | 172 / 438 | | `STRATA_GLM_RAM_RESIDENT=1` | auto | 9.9 / 10.1 / 10.4 | 10.1 | 172 / 438 | | `RAM_RESIDENT=1`, `PROMOTE_MIN=6` | auto | 10.1 / 10.4 / 10.3 | **10.3** | 172 / 437 | **Moving layers to GPU 1 made decode slower, step by step.** Later runs had more usage history, which should favour them, and they were still slower. With 256 GB the auto split gave GPU 0 one layer more than before (24 instead of 23). It predicted 69.2 ms a token; `glm stat` measured 85-108 ms. **GPU 0's 100% utilisation is probably not the limit.** During the runs: | | Power | Temperature | Utilisation | | --- | --- | --- | --- | | GPU 0 (110 W cap) | 105-109 W | 77-81 °C | 0% and 100% in turn | | GPU 1 | up to 128 W | 55-64 °C | 0% and 100% in turn | The two cards take turns at 100%, which looks like the pipelined decode rather than a saturated GPU 0. **RAM-resident:** with everything in RAM, `RAM_RESIDENT=1` + `PROMOTE_MIN=6` is about 4-5% faster than auto. That is more than the 9.7-9.9 run-to-run spread. Per token: | | Disk waits | VRAM hit | RAM fetches | CPU lane | | --- | --- | --- | --- | --- | | auto | ~10 (0.1 ms) | 40-49% | ~100-117 | ~77-91 experts | | `RAM_RESIDENT=1` + `PROMOTE_MIN=6` | 0 | 43-52% | ~99-113 | ~77-89 experts | So nowhere near the 4090 D's 1.9x: here every token still pulls ~100 experts over PCIe 3.0 and the CPU lane computes ~80. I'm keeping auto + `RAM_RESIDENT=1` + `PROMOTE_MIN=6`. **mmproj:** kept Maya's. unsloth's BF16 file also loads and gave practically the same answers on two test images (a TUI screenshot and a 3D scene), but yours has the clamp.
Author
Owner

@mw00 commented on GitHub (Oct 12, 2026):

Thank you for the follow-up runs - a clear result for this box: the auto split, RAM_RESIDENT=1 and PROMOTE_MIN=6. Closing; if you try v1.1.3, its expert profile (#88) fills VRAM by a ranking measured on GLM-5.3-Flash's routing, which matters most right after a start.

<!-- gh-comment-id:6125943737 --> @mw00 commented on GitHub (Oct 12, 2026): Thank you for the follow-up runs - a clear result for this box: the auto split, `RAM_RESIDENT=1` and `PROMOTE_MIN=6`. Closing; if you try v1.1.3, its expert profile (#88) fills VRAM by a ranking measured on GLM-5.3-Flash's routing, which matters most right after a start.
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#32
No description provided.