[GH-ISSUE #272] Single L40S-48Q (vGPU) + Xeon 8580, unsloth UD-Q5_K_XL, 512K ctx, KV int8: decode ~21 tok/s - is this the ceiling, or is something mis-tuned? #101

Closed
opened 2026-10-29 21:20:50 +07:00 by bsakaguchi · 2 comments
Owner

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

Summary

One 48 GB vGPU, 251 GiB RAM, unsloth's UD-Q5_K_XL (225 GB of experts). Decode is a steady 20-25 tok/s. Before the install we hoped for 50+ tok/s. After reading the speed reports here (#218, #260), we suspect ~21 tok/s is close to what this machine and quant can do. We would like to confirm that, and learn what is still worth tuning.

The numbers below come from the engine's own glm stat: lines during real use (sampled, thinking on). They are not a ./maya.sh --bench run yet. We can run --bench and --report and attach maya-report.txt if that helps.

Version

  • Project Maya v1.1.15, commit a4e1ff0, the installer build (./maya.sh --setup, nothing patched).
  • CUDA 12.9 (nvcc), driver 550.127.05, g++ 11.4, Ubuntu 22.04.5, Linux 6.8, Python 3.10.12.

Hardware (a VM)

  • GPU: NVIDIA L40S-48Q. This is a vGPU profile of an L40S (Ada, sm_89), 47.71 GB visible to CUDA. nvidia-smi does not report the PCIe gen or width inside the VM.
  • CPU: Intel Xeon Platinum 8580 (AVX-512, AMX), 32 vCPU, 1 thread per core, 1 NUMA node, 300 MB L3.
  • RAM: 251 GiB. The type and channel count are not visible from inside the VM.
  • Model: on a local volume. The disk tier never engages (0 reads/tok).

Setup

./maya.sh --setup --plain --yes --no-start --nvcc <cuda-12.9>/bin/nvcc \
  --gguf-dir <models>/UD-Q5_K_XL --models-dir <models> \
  --gpu 0 --context 131072 --draft mtp --port 8080
  • Model: unsloth/GLM-5.3-Flash-GGUF, UD-Q5_K_XL (rev a38483c, 6 shards).
  • Vision: the Maya repo's mmproj-GLM-5.3-Flash-F16.gguf plus the vocab GGUF.
  • Config edits after the setup: --max-context 524288 and --kv int8. Everything else is the setup's default: --expert-cache auto --prefill auto --kv-streaming on --expert-profile data/expert-profile-glm.bin.
  • No env block, no STRATA_GLM_* overrides, and --calibrate not run yet.
  • Requests use temperature 1.0, top_p 0.95, thinking high (32768 budget), with one request at a time.

What the engine reports at start

glm pack: CUDA0 latent cache INT8 (544 bytes a position and layer)
glm pack: CUDA0 KV streaming: 32768 of 524288 positions of each of 11 DSA layers in VRAM (0.20 GB), the latent cache in 3.14 GB of pinned RAM
glm fast: CUDA0 VRAM before the expert pool: 15.65 of 47.71 GB in use - dense weights 8.62, state/KV (524288 ctx) 1.10, activations 0.17, other (context, MTP, scratch, prompt path) 5.76
glm fast: CUDA0 the vision encoder borrows the pool's tail (9.47 GB) while it encodes
glm fast: CUDA0 layers [0,45) expert pool 31.35 GB, 40-56 slots/layer (1808 total)
glm fast: CUDA0 RAM tier 192.37 GB pinned, 11092 slots
glm fast: CUDA0 tiers warm: 12096 experts (225.2 GB) in 72 s (3.13 GB/s)
glm fast: CUDA0 CPU lane: 21 threads, an expert 0.140 ms on the CPU vs 0.737 ms over PCIe -> of 0..8 RAM-tier experts the CPU takes 0 1 2 3 4 4 5 6 7

Our reading: an expert is about 18.6 MB (225.2 GB / 12096). The CPU then reads it at about 133 GB/s, and the PCIe path moves it at about 25 GB/s.

What the engine reports during decode (typical lines, ~150 requests)

glm stat: decode 46.66 ms/tok (21.43 tok/s) | vram hit 50.92% | ram fetches 15.27/tok | disk 0.00 reads/tok in 0.64 waits/tok, 0.01 ms/tok | promotions 15.90/tok | cpu lane 148.85/tok in 23.37 ms/tok | prompt 1.3 ms/tok | vram 1716/1808 ram 10346/11092
glm stat: decode 43.44 ms/tok (23.02 tok/s) | vram hit 53.58% | ram fetches 12.48/tok | ... | cpu lane 142.00/tok in 22.24 ms/tok | ...
glm stat: decode 50.61 ms/tok (19.76 tok/s) | vram hit 44.36% | ram fetches 20.18/tok | ... | cpu lane 163.99/tok in 25.86 ms/tok | ...
glm kv: KV streaming: 99.85% of 1697641 block reads hit VRAM, 5.4 MiB read from RAM
  • Decode: 40-50 ms/tok (19.8-24.9 tok/s), with VRAM hit 44-54%.
  • CPU lane: 133-165 experts/tok, taking 21-26 ms/tok, which is about half of every token.
  • KV streaming: hits VRAM 97-99.9% of the time, so the 512K context with INT8 KV does not look like the bottleneck.
  • Prefill: an 11.2K-token prompt took about 11 s (~1000 tok/s). Short prompts run at ~150 tok/s.
  • MTP: draft_n is 0 in /v1/status. As we understand the docs, MTP drafting is off on one GPU by design.

Comparison with reports here

report GPUs model (size) decode
#260 1x H100 80 GB Maya-M-Derisked IQ2_S (116 GB), vram hit 75-85% 61.4 tok/s (bench)
#218 2x RTX PRO 5000 (72+48 GB) unsloth UD-Q4_K_XL / UD-Q6_K_XL / Q8_0 56.0 / 32.7 / 25.0 tok/s (bench)
this 1x L40S-48Q (vGPU) unsloth UD-Q5_K_XL (225 GB of experts), vram hit ~50% ~21 tok/s (sampled, thinking on)

Only about 14% of the expert bytes fit in VRAM here (31.35 of 225.2 GB). Our own estimate: to reach 50 tok/s (20 ms/tok), the CPU-lane time alone would have to drop by more than half.

Questions

  1. Is ~21 tok/s expected for this combination: one 48 GB GPU, UD-Q5_K_XL, and the RAM tier with the CPU lane? Or does something in the lines above look wrong?
  2. Is ./maya.sh --calibrate likely to help here? The engine picked 21 CPU-lane threads out of 32 vCPU.
  3. The shipped expert-profile-glm.bin was presumably made with Maya's own packs. Does it fit unsloth's UD-Q5_K_XL routing as well? Or should we build our own with STRATA_GLM_USAGE or --expert-profile-save?
  4. On one GPU with half the experts streamed from RAM, is STRATA_GLM_MTP_DECODE=1 worth trying? The docs say it is "usually slower" in that case.
  5. How much faster would Maya-L (156 GB) or unsloth UD-Q4_K_XL be on this machine? We would rather not trade quality blindly, so a rough estimate from the hit rate would help.
  6. Anything specific to vGPU (L40S-48Q) we should check? For example: pinned memory limits, PCIe measured at 0.737 ms an expert, or the 9.47 GB the vision encoder borrows.
  7. Do the --kv int8 or 512K settings cost decode speed on one GPU, compared with the default KV and 128K?

Thanks for the project. The install built and ran on this VM without any change, and images work with the F16 mmproj.

Originally created by @talisp on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/272 ## Summary One 48 GB vGPU, 251 GiB RAM, unsloth's UD-Q5_K_XL (225 GB of experts). Decode is a steady **20-25 tok/s**. Before the install we hoped for **50+ tok/s**. After reading the speed reports here (#218, #260), we suspect ~21 tok/s is close to what this machine and quant can do. We would like to confirm that, and learn what is still worth tuning. The numbers below come from the engine's own `glm stat:` lines during real use (sampled, thinking on). They are **not** a `./maya.sh --bench` run yet. We can run `--bench` and `--report` and attach `maya-report.txt` if that helps. ## Version - Project Maya v1.1.15, commit a4e1ff0, the installer build (`./maya.sh --setup`, nothing patched). - CUDA 12.9 (nvcc), driver 550.127.05, g++ 11.4, Ubuntu 22.04.5, Linux 6.8, Python 3.10.12. ## Hardware (a VM) - **GPU:** NVIDIA L40S-48Q. This is a vGPU profile of an L40S (Ada, sm_89), 47.71 GB visible to CUDA. `nvidia-smi` does not report the PCIe gen or width inside the VM. - **CPU:** Intel Xeon Platinum 8580 (AVX-512, AMX), 32 vCPU, 1 thread per core, 1 NUMA node, 300 MB L3. - **RAM:** 251 GiB. The type and channel count are not visible from inside the VM. - **Model:** on a local volume. The disk tier never engages (0 reads/tok). ## Setup ``` ./maya.sh --setup --plain --yes --no-start --nvcc <cuda-12.9>/bin/nvcc \ --gguf-dir <models>/UD-Q5_K_XL --models-dir <models> \ --gpu 0 --context 131072 --draft mtp --port 8080 ``` - **Model:** `unsloth/GLM-5.3-Flash-GGUF`, UD-Q5_K_XL (rev a38483c, 6 shards). - **Vision:** the Maya repo's `mmproj-GLM-5.3-Flash-F16.gguf` plus the vocab GGUF. - **Config edits after the setup:** `--max-context 524288` and `--kv int8`. Everything else is the setup's default: `--expert-cache auto --prefill auto --kv-streaming on --expert-profile data/expert-profile-glm.bin`. - No `env` block, no `STRATA_GLM_*` overrides, and `--calibrate` not run yet. - Requests use temperature 1.0, top_p 0.95, thinking `high` (32768 budget), with one request at a time. ## What the engine reports at start ``` glm pack: CUDA0 latent cache INT8 (544 bytes a position and layer) glm pack: CUDA0 KV streaming: 32768 of 524288 positions of each of 11 DSA layers in VRAM (0.20 GB), the latent cache in 3.14 GB of pinned RAM glm fast: CUDA0 VRAM before the expert pool: 15.65 of 47.71 GB in use - dense weights 8.62, state/KV (524288 ctx) 1.10, activations 0.17, other (context, MTP, scratch, prompt path) 5.76 glm fast: CUDA0 the vision encoder borrows the pool's tail (9.47 GB) while it encodes glm fast: CUDA0 layers [0,45) expert pool 31.35 GB, 40-56 slots/layer (1808 total) glm fast: CUDA0 RAM tier 192.37 GB pinned, 11092 slots glm fast: CUDA0 tiers warm: 12096 experts (225.2 GB) in 72 s (3.13 GB/s) glm fast: CUDA0 CPU lane: 21 threads, an expert 0.140 ms on the CPU vs 0.737 ms over PCIe -> of 0..8 RAM-tier experts the CPU takes 0 1 2 3 4 4 5 6 7 ``` Our reading: an expert is about 18.6 MB (225.2 GB / 12096). The CPU then reads it at about 133 GB/s, and the PCIe path moves it at about 25 GB/s. ## What the engine reports during decode (typical lines, ~150 requests) ``` glm stat: decode 46.66 ms/tok (21.43 tok/s) | vram hit 50.92% | ram fetches 15.27/tok | disk 0.00 reads/tok in 0.64 waits/tok, 0.01 ms/tok | promotions 15.90/tok | cpu lane 148.85/tok in 23.37 ms/tok | prompt 1.3 ms/tok | vram 1716/1808 ram 10346/11092 glm stat: decode 43.44 ms/tok (23.02 tok/s) | vram hit 53.58% | ram fetches 12.48/tok | ... | cpu lane 142.00/tok in 22.24 ms/tok | ... glm stat: decode 50.61 ms/tok (19.76 tok/s) | vram hit 44.36% | ram fetches 20.18/tok | ... | cpu lane 163.99/tok in 25.86 ms/tok | ... glm kv: KV streaming: 99.85% of 1697641 block reads hit VRAM, 5.4 MiB read from RAM ``` - **Decode:** 40-50 ms/tok (19.8-24.9 tok/s), with VRAM hit 44-54%. - **CPU lane:** 133-165 experts/tok, taking 21-26 ms/tok, which is about half of every token. - **KV streaming:** hits VRAM 97-99.9% of the time, so the 512K context with INT8 KV does not look like the bottleneck. - **Prefill:** an 11.2K-token prompt took about 11 s (~1000 tok/s). Short prompts run at ~150 tok/s. - **MTP:** `draft_n` is 0 in `/v1/status`. As we understand the docs, MTP drafting is off on one GPU by design. ## Comparison with reports here | report | GPUs | model (size) | decode | |---|---|---|---| | #260 | 1x H100 80 GB | Maya-M-Derisked IQ2_S (116 GB), vram hit 75-85% | 61.4 tok/s (bench) | | #218 | 2x RTX PRO 5000 (72+48 GB) | unsloth UD-Q4_K_XL / UD-Q6_K_XL / Q8_0 | 56.0 / 32.7 / 25.0 tok/s (bench) | | this | 1x L40S-48Q (vGPU) | unsloth UD-Q5_K_XL (225 GB of experts), vram hit ~50% | ~21 tok/s (sampled, thinking on) | Only about 14% of the expert bytes fit in VRAM here (31.35 of 225.2 GB). Our own estimate: to reach 50 tok/s (20 ms/tok), the CPU-lane time alone would have to drop by more than half. ## Questions 1. Is ~21 tok/s expected for this combination: one 48 GB GPU, UD-Q5_K_XL, and the RAM tier with the CPU lane? Or does something in the lines above look wrong? 2. Is `./maya.sh --calibrate` likely to help here? The engine picked 21 CPU-lane threads out of 32 vCPU. 3. The shipped `expert-profile-glm.bin` was presumably made with Maya's own packs. Does it fit unsloth's UD-Q5_K_XL routing as well? Or should we build our own with `STRATA_GLM_USAGE` or `--expert-profile-save`? 4. On one GPU with half the experts streamed from RAM, is `STRATA_GLM_MTP_DECODE=1` worth trying? The docs say it is "usually slower" in that case. 5. How much faster would Maya-L (156 GB) or unsloth UD-Q4_K_XL be on this machine? We would rather not trade quality blindly, so a rough estimate from the hit rate would help. 6. Anything specific to vGPU (L40S-48Q) we should check? For example: pinned memory limits, PCIe measured at 0.737 ms an expert, or the 9.47 GB the vision encoder borrows. 7. Do the `--kv int8` or 512K settings cost decode speed on one GPU, compared with the default KV and 128K? Thanks for the project. The install built and ran on this VM without any change, and images work with the F16 mmproj.
Author
Owner

@talisp commented on GitHub (Oct 19, 2026):

A follow-up: two Strata changes from after 0.1.41. The CHANGELOG mentions Strata only up to 0.1.41, so we are not sure whether either of these is in Maya, or whether either applies to the GLM engine:

  1. Strata 0.1.45, #1896: "a resident-RAM copy keeps the prompt path's lend region". Strata reports +7% decode and +2.5% prompt on an RTX 3060 when there is room in the RAM budget. Our case looks similar. The prompt path borrows about 9.2 GB of the expert pool on a 48 GB card, and the RAM tier has 192 GB pinned. Is the same idea in Maya already, planned, or not applicable?

  2. Skipping light misses on one GPU. Strata 0.1.42 turned STRATA_ROUTE_TAIL_SKIP=7 on by default on CUDA (+13-16% decode). Maya has the opt-in STRATA_GLM_TRUNK_KEEP_MAP and STRATA_GLM_MISS_SKIP_W / _FROM. SETTINGS.md measures them on Maya-M / Maya-S24 (for example, _MAP=...5555555444... with KL ~0.017-0.027). On this machine about half of every token's time is the CPU lane (~150 experts/tok, ~24 of ~46 ms). Would you start from the same map or MISS_SKIP_W 0.12 with _FROM=23 for unsloth's UD-Q5_K_XL on one GPU? Or are the KL numbers expected to differ for a 5-bit file? We would measure KL and our own task suite before keeping anything.

We can run ./maya.sh --bench / --report with and without these settings, and post the numbers here if that helps.

<!-- gh-comment-id:6260001340 --> @talisp commented on GitHub (Oct 19, 2026): A follow-up: two Strata changes from after 0.1.41. The CHANGELOG mentions Strata only up to 0.1.41, so we are not sure whether either of these is in Maya, or whether either applies to the GLM engine: 1. **Strata 0.1.45, #1896: "a resident-RAM copy keeps the prompt path's lend region".** Strata reports +7% decode and +2.5% prompt on an RTX 3060 when there is room in the RAM budget. Our case looks similar. The prompt path borrows about 9.2 GB of the expert pool on a 48 GB card, and the RAM tier has 192 GB pinned. Is the same idea in Maya already, planned, or not applicable? 2. **Skipping light misses on one GPU.** Strata 0.1.42 turned `STRATA_ROUTE_TAIL_SKIP=7` on by default on CUDA (+13-16% decode). Maya has the opt-in `STRATA_GLM_TRUNK_KEEP_MAP` and `STRATA_GLM_MISS_SKIP_W` / `_FROM`. SETTINGS.md measures them on Maya-M / Maya-S24 (for example, `_MAP=...5555555444...` with KL ~0.017-0.027). On this machine about half of every token's time is the CPU lane (~150 experts/tok, ~24 of ~46 ms). Would you start from the same map or `MISS_SKIP_W` 0.12 with `_FROM=23` for unsloth's UD-Q5_K_XL on one GPU? Or are the KL numbers expected to differ for a 5-bit file? We would measure KL and our own task suite before keeping anything. We can run `./maya.sh --bench` / `--report` with and without these settings, and post the numbers here if that helps.
Author
Owner

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

Thanks for the detailed numbers. With unsloth's UD-Q5_K_XL (225 GB of experts) on one 48 GB card, most experts a token come from RAM over PCIe, so ~20-25 tok/s is about what that setup allows - nothing looks mis-tuned. The speed comes from how much of the model the GPU holds: Project Maya's own quants (Maya-M, 116 GB, or Maya-S, 96.5 GB) keep far more of each token's experts on the card, and ./maya.sh --calibrate tunes the CPU lane for your Xeon. Closing as answered - feel free to reopen with a Maya-M run if it still looks low.

<!-- gh-comment-id:6360580517 --> @mw00 commented on GitHub (Oct 23, 2026): Thanks for the detailed numbers. With unsloth's UD-Q5_K_XL (225 GB of experts) on one 48 GB card, most experts a token come from RAM over PCIe, so ~20-25 tok/s is about what that setup allows - nothing looks mis-tuned. The speed comes from how much of the model the GPU holds: Project Maya's own quants (Maya-M, 116 GB, or Maya-S, 96.5 GB) keep far more of each token's experts on the card, and `./maya.sh --calibrate` tunes the CPU lane for your Xeon. Closing as answered - feel free to reopen with a Maya-M run if it still looks low.
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#101
No description provided.