[PR #75] [MERGED] EXL3 quants (exllamav3) for GLM-5.3-Flash: packer, device and CPU kernels, prompts, MTP #320

Closed
opened 2026-10-29 21:24:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/75
Author: @needmorevram
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @mw00

Base: main ← Head: exl3


📝 Commits (2)

  • 25cbbf3 EXL3 quants (exllamav3) for GLM-5.3-Flash: packer, device and CPU kernels, prompts, MTP
  • 182c49f Setup: turboderp's EXL3 3.05bpw quant as a download (experimental, NVIDIA only)

📊 Changes

21 files changed (+4251 additions, -51 deletions)

View changed files

📝 CMakeLists.txt (+8 -1)
📝 README.md (+5 -0)
📝 docs/SETTINGS.md (+1 -0)
📝 include/strata/core/glm_model.hpp (+18 -0)
➕ include/strata/kernels/cpu/exl3_cpu.hpp (+35 -0)
➕ include/strata/kernels/cpu/exl3_ref.hpp (+20 -0)
➕ include/strata/kernels/exl3.hpp (+120 -0)
📝 maya.py (+164 -17)
📝 src/core/glm_fast_path.cu (+291 -12)
📝 src/core/glm_fast_state.hpp (+17 -3)
📝 src/core/glm_model.cu (+359 -4)
📝 src/core/glm_prefill.cu (+128 -9)
➕ src/kernels/cpu/exl3_cpu.cpp (+270 -0)
➕ src/kernels/cpu/exl3_ref.cpp (+79 -0)
📝 src/kernels/cpu/native_expert.cpp (+4 -0)
➕ src/kernels/cuda/exl3.cu (+1053 -0)
📝 src/kernels/cuda/glm_fast.cu (+21 -1)
➕ tests/exl3_test.cu (+550 -0)
➕ tools/exl3_pack.py (+743 -0)
➕ tools/glm_chat_template.jinja (+257 -0)

...and 1 more files

📄 Description

Runs EXL3 (exllamav3) quants of GLM-5.3-Flash on Maya's engine. The engine reads the trellis-coded weights in place from the model's safetensors, so nothing is converted or copied. It was tested with turboderp/GLM-5.3-Flash-exl3 at 3.05 bpw (125 GB). The open items are at the end.

./maya.sh --setup --model EXL3-3.05bpw

or by hand:

python tools/exl3_pack.py --model ~/models2/GLM-5.3-Flash-exl3-3.05bpw
build/strata --serve --glm-pack ~/models2/GLM-5.3-Flash-exl3-3.05bpw/pack

Summary

  • tools/exl3_pack.py builds a pack beside the model and copies no weights. It writes four things:

    • a companion maya-exl3.gguf, holding llama.cpp's glm5-next metadata, the tokenizer, and every unquantized tensor under llama.cpp's name and layout (kv_b split into attn_k_b / attn_v_b, A_log -> ssm_a, the fused q|k|v conv split in three);
    • index.txt / dense.bin, where EXL3 matrices are rows of a new kind x;
    • exl3.txt, with each EXL3 matrix's trellis / suh / svh offsets and each routed expert's nine pieces (one model groups its tensors by type, so an expert's parts are not contiguous);
    • Maya's GLM chat template (tools/glm_chat_template.jinja, the same template Maya's GGUFs carry), or the model's own with --model-template.

    The NextN (MTP) block is packed too. --check <gguf> compares the result with a GGUF of the same model: against Maya-L, cosine is 0.999 at 5-6 bits and 0.98-0.99 at 3 bits.

  • Device kernels (src/kernels/cuda/exl3.cu).

    • The mul1 / mcg / 3inst codebooks and the trellis decode use exllamav3's arithmetic.
    • The decode GEMV is batched with split-k: the last block reduces in a fixed order, so the result is deterministic.
    • The routed-expert step runs gate/up with the clamped SwiGLU, then down summed in plan order.
    • Full reconstruction to FP16/BF16 serves the prompt path.
    • Prompts get mma.sync GEMMs (sm_80+) that decode the trellis as they go.
  • CPU lane (src/kernels/cpu/exl3_cpu.cpp). RAM-tier EXL3 experts are computed on the CPU, with AVX-512F/BW and a scalar fallback. The mul1 codebook is affine in a byte sum, so the kernel adds the bytes with vpmaddubsw / vpmaddwd and keeps F32 activations. It uses the device's exact affine constants.

  • Engine.

    • The safetensors are mapped as extra shards.
    • The fused KDA q|k|v projection is served as three column views of one matrix.
    • An expert's blob is assembled from its pieces: reads less than 64 KB apart are coalesced, and the warm-up reads in file order (much faster on a rotational disk).
    • EXL3 is handled in mv(), the MoE step, the CPU lane, the prompt path, load_mtp, and the 2-4 GPU split search's costs.
  • Prompts take each EXL3 expert by its row count. An expert routed to at most 64 of a chunk's tokens goes through the tensor-core kernels; a busier one is reconstructed to FP16 once and multiplied by cuBLAS. Dense weights always use reconstruct + cuBLAS. New setting STRATA_GLM_EXL3_MMA_ROWS (default 64, 0 = cuBLAS for every expert), with a row in docs/SETTINGS.md.

  • Fix for main: a race in glmfast::Workers::run (the shared CPU pool). A straggler from the previous batch could claim an index under the next batch's larger job count. It then ran the new job, and run() could return while that job was still running. This shows when consecutive batches differ in size; here it was an intermittent segfault at start (kernel log segfault at 0x2000000010 in a fast_cpu_experts lambda). run() now closes the ticket before it publishes the new job. A standalone stress test hits the race on the old pool and is clean on the new one.

  • native_fmt refuses types outside ggml's table. EXL3's type id is 200, which indexed past the table.

  • The setup offers the EXL3 model as a download (EXL3-3.05bpw). It is marked experimental, is never the default, and is not offered with --backend hip.

    • The catalog names all 27 files of the 3.05bpw branch, pinned to its commit 332ab45, each with its size and sha256 (125.3 GB, mtp.safetensors included).
    • A download counts as whole at its published size, and each file is checked against its hash.
    • The model step checks config.json (glm5_next, exl3) instead of a GGUF header.
    • The pack step runs tools/exl3_pack.py.
    • The pictures use the Maya repo's vision files.
    • The README notes it under the models table.

Tests

Rebased on v1.0.34 (bdd4167). The rebase resolved conflicts in glm_fast.cu (the EXL3 jobs are taken before the HIP mv_rdna batch, which takes only BF16 and Q6_K jobs), the README (the setting row moved to docs/SETTINGS.md), maya.py and its tests (Maya-M-Derisked and the ZFS tests kept). On the rebased branch:

  • strata and exl3_test build for sm_86 and sm_120;
  • tools/check_hip_compat.py passes;
  • tools tests: 210, OK; server tests: 145, OK (3 skipped);
  • exl3_test passes on all nine GPUs, the RTX 3090 and the eight RTX 5060 Ti (0 failures, 0 launch errors);
  • the 9-GPU benchmark gives the same speeds as on v1.0.30 (the rebased table under Benchmarks), and its answers are coherent.

Read for main's parallel split load (#80): each part loads its own EXL3 tables and shards in load_pack, the kernels' shared GPU scratch is created under a mutex, and the EXL3 CPU lane is set up in the deferred fast_setup_finish.

On the v1.0.30 build:

  • exl3_test (new ctest). The device kernels against the scalar reference (src/kernels/cpu/exl3_ref.cpp):

    • every K (1-8) and codebook;
    • split-k, column views, q8_1 input and batches;
    • the expert step, reconstruction, gemm_rows;
    • the tensor-core set kernels;
    • the CPU kernel.

    It passes on an RTX 3090 (exl3_test: ok (0 failures, 0 launch errors)), built for sm_86 and sm_120.

  • The model.

    • Answers are coherent: a README summary, and factual questions such as "capital of France".
    • The decoded weights agree with Maya-L's (--check, cosines above).
    • The CPU lane's experts match the device kernels'.
  • tools/check_hip_compat.py passes. The tensor-core kernels are CUDA-only (mma_supported() is false on HIP), but the HIP build was not compiled here.

  • Unit tests: 7 new tests for the EXL3 download in tools/test_maya_models.py.

  • The setup with --model EXL3-3.05bpw was tested by hand on this machine and works: it writes the config (maya-exl3-3.05bpw.json, the model in <models-dir>/EXL3-3.05bpw), and Maya starts with the EXL3 model on all nine GPUs.

Benchmarks

Setup.

  • Model: turboderp/GLM-5.3-Flash-exl3 at 3.05 bpw, packed with tools/exl3_pack.py.
  • Build: this branch rebased on v1.0.30.
  • Host: Xeon Gold 6152 (2 × 22 cores), 177 GB RAM, CUDA 13.0, every GPU on PCIe 3.0 x8.
  • Flags: --max-context 16384 --greedy, STRATA_GLM_TIMING=1.

Each setup is one engine start that answers three requests in order:

  1. a 47-token chat prompt, with 256 tokens out (the decode measurement; as the first request, its prompt time is cold);
  2. a 6,389-token prompt (README.md), with 64 tokens out;
  3. a 12,140-token prompt (README.md plus a second document), with 64 tokens out. It reuses no cached prefix: the DONE line's reuse count is 0.

One RTX 3090 (24 GB)

1,848 of the 12,096 experts are in VRAM; the rest are in a 99 GB pinned RAM tier. The CPU lane has 40 threads.

request prompt decode VRAM hit
47 tokens, 256 out first request 16.1 tok/s 44.7%
6,389 tokens, 64 out 309 tok/s (20.7 s) 15.2 tok/s 39.4%
12,140 tokens, 64 out 530 tok/s (22.9 s) 16.9 tok/s 47.1%
  • Decode is bound by the CPU lane. Each token sends 166-187 experts to the CPU, which takes about 40 of its 62 ms.
  • Prompt time barely grows with length. A one-GPU prompt mostly copies the RAM-tier experts to the card, once per chunk (chunks of up to 32K tokens here), so the 12K prompt takes only 2.2 s longer than the 6.4K one.

9 GPUs (8 × RTX 5060 Ti 16 GB + the RTX 3090)

The split is the engine's own: layers [0,7) [7,12) [12,16) [16,23) on the 3090, then [23,27) [27,32) [32,36) [36,41) [41,45). Its 12,384 VRAM slots hold every expert at start, and one 40-thread CPU pool is shared by all nine GPUs.

With MTP (the default with two GPUs or more):

request prompt decode drafts accepted
47 tokens, 256 out first request 40.1 tok/s 81.9%
6,389 tokens, 64 out 391 tok/s (16.3 s) 35.8 tok/s 79.0%
12,140 tokens, 64 out 780 tok/s (15.6 s) 40.5 tok/s 93.5%

Without speculation (STRATA_GLM_NO_SPEC=1):

request prompt decode
47 tokens, 256 out first request 27.1 tok/s
6,389 tokens, 64 out 391 tok/s (16.3 s) 25.0 tok/s
12,140 tokens, 64 out 777 tok/s (15.6 s) 25.5 tok/s

Rebased on v1.0.34, MTP on, the same three prompts (token for token):

request prompt decode drafts accepted
47 tokens, 256 out first request 40.5 tok/s 82.7%
6,389 tokens, 64 out 397 tok/s (16.1 s) 36.7 tok/s 79.0%
12,140 tokens, 64 out 786 tok/s (15.4 s) 37.6 tok/s 82.3%

Decode and prompt speeds are within about 2% of the v1.0.30 build. The decode after the 12K prompt is lower because fewer of its drafts were accepted (82% against 94%): speculation is not exact (see Output), so the answer, and with it the acceptance, varies between runs. The first request's prompt took 7.8 s, against 2.4 s on v1.0.30. That is a one-time cost before decoding starts; its cause was not looked into.

The first long prompt after start seems to carry a one-time cost on 9 GPUs. In every run the 12,140-token prompt took less time than the 6,389-token one, and its second 6K-token chunk finished 2.2-2.3 s after the first. During that first long prompt, each card lends about 2 GB of its expert pool to the prompt's buffers, and 1,443 experts move to the RAM tier. Whether that movement is what costs the time has not been checked yet.

Output

GGUF packs take the same code paths as before. The only shared changes are the Workers::run fix and the native_fmt range check. Maya-L ran on this branch before the rebase onto v1.0.30 (for the speculation check below), but not on the rebased build.

Speculation is not exact, on main as well. With speculation off, two EXL3 runs give the same 80 greedy tokens. With it on, the EXL3 output diverges from speculation-off at token 36, and Maya-L's GGUF diverges at token 8. The pipelined speculative decode is therefore not bit-exact for either format. This is not specific to EXL3.

Open items

  • 2 GPUs with MTP decode 18 tok/s. The decode is bound by the CPU lane, because the VRAM hit rate is low on that split.
  • Prompts are slower than Maya-L's. Before the rebase, a 6,389-token first prompt on the same 9 GPUs took 18.0 s with EXL3 and 15.7 s with Maya-L. About 60% of the EXL3 prompt time is the expert GEMMs, which already run at the FP16 tensor-core rate. Int8/FP8 is the remaining lever.
  • Images with the EXL3 model and Windows are untested.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/75 **Author:** [@needmorevram](https://github.com/needmorevram) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `exl3` --- ### 📝 Commits (2) - [`25cbbf3`](https://github.com/mw00/project-maya/commit/25cbbf3406129ff9a085db6eb86c72f4865fc916) EXL3 quants (exllamav3) for GLM-5.3-Flash: packer, device and CPU kernels, prompts, MTP - [`182c49f`](https://github.com/mw00/project-maya/commit/182c49fcabd83c0939342368d3c8aa433a401af5) Setup: turboderp's EXL3 3.05bpw quant as a download (experimental, NVIDIA only) ### 📊 Changes **21 files changed** (+4251 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+8 -1) 📝 `README.md` (+5 -0) 📝 `docs/SETTINGS.md` (+1 -0) 📝 `include/strata/core/glm_model.hpp` (+18 -0) ➕ `include/strata/kernels/cpu/exl3_cpu.hpp` (+35 -0) ➕ `include/strata/kernels/cpu/exl3_ref.hpp` (+20 -0) ➕ `include/strata/kernels/exl3.hpp` (+120 -0) 📝 `maya.py` (+164 -17) 📝 `src/core/glm_fast_path.cu` (+291 -12) 📝 `src/core/glm_fast_state.hpp` (+17 -3) 📝 `src/core/glm_model.cu` (+359 -4) 📝 `src/core/glm_prefill.cu` (+128 -9) ➕ `src/kernels/cpu/exl3_cpu.cpp` (+270 -0) ➕ `src/kernels/cpu/exl3_ref.cpp` (+79 -0) 📝 `src/kernels/cpu/native_expert.cpp` (+4 -0) ➕ `src/kernels/cuda/exl3.cu` (+1053 -0) 📝 `src/kernels/cuda/glm_fast.cu` (+21 -1) ➕ `tests/exl3_test.cu` (+550 -0) ➕ `tools/exl3_pack.py` (+743 -0) ➕ `tools/glm_chat_template.jinja` (+257 -0) _...and 1 more files_ </details> ### 📄 Description Runs EXL3 (exllamav3) quants of GLM-5.3-Flash on Maya's engine. The engine reads the trellis-coded weights in place from the model's safetensors, so nothing is converted or copied. It was tested with [turboderp/GLM-5.3-Flash-exl3](https://huggingface.co/turboderp/GLM-5.3-Flash-exl3) at 3.05 bpw (125 GB). The open items are at the end. ``` ./maya.sh --setup --model EXL3-3.05bpw ``` or by hand: ``` python tools/exl3_pack.py --model ~/models2/GLM-5.3-Flash-exl3-3.05bpw build/strata --serve --glm-pack ~/models2/GLM-5.3-Flash-exl3-3.05bpw/pack ``` ## Summary - **`tools/exl3_pack.py` builds a pack beside the model and copies no weights.** It writes four things: - a companion `maya-exl3.gguf`, holding llama.cpp's glm5-next metadata, the tokenizer, and every unquantized tensor under llama.cpp's name and layout (`kv_b` split into `attn_k_b` / `attn_v_b`, `A_log` -> `ssm_a`, the fused q|k|v conv split in three); - `index.txt` / `dense.bin`, where EXL3 matrices are rows of a new kind `x`; - `exl3.txt`, with each EXL3 matrix's trellis / suh / svh offsets and each routed expert's nine pieces (one model groups its tensors by type, so an expert's parts are not contiguous); - Maya's GLM chat template (`tools/glm_chat_template.jinja`, the same template Maya's GGUFs carry), or the model's own with `--model-template`. The NextN (MTP) block is packed too. `--check <gguf>` compares the result with a GGUF of the same model: against Maya-L, cosine is 0.999 at 5-6 bits and 0.98-0.99 at 3 bits. - **Device kernels (`src/kernels/cuda/exl3.cu`).** - The mul1 / mcg / 3inst codebooks and the trellis decode use exllamav3's arithmetic. - The decode GEMV is batched with split-k: the last block reduces in a fixed order, so the result is deterministic. - The routed-expert step runs gate/up with the clamped SwiGLU, then down summed in plan order. - Full reconstruction to FP16/BF16 serves the prompt path. - Prompts get mma.sync GEMMs (sm_80+) that decode the trellis as they go. - **CPU lane (`src/kernels/cpu/exl3_cpu.cpp`).** RAM-tier EXL3 experts are computed on the CPU, with AVX-512F/BW and a scalar fallback. The mul1 codebook is affine in a byte sum, so the kernel adds the bytes with `vpmaddubsw` / `vpmaddwd` and keeps F32 activations. It uses the device's exact affine constants. - **Engine.** - The safetensors are mapped as extra shards. - The fused KDA q|k|v projection is served as three column views of one matrix. - An expert's blob is assembled from its pieces: reads less than 64 KB apart are coalesced, and the warm-up reads in file order (much faster on a rotational disk). - EXL3 is handled in `mv()`, the MoE step, the CPU lane, the prompt path, `load_mtp`, and the 2-4 GPU split search's costs. - **Prompts take each EXL3 expert by its row count.** An expert routed to at most 64 of a chunk's tokens goes through the tensor-core kernels; a busier one is reconstructed to FP16 once and multiplied by cuBLAS. Dense weights always use reconstruct + cuBLAS. New setting `STRATA_GLM_EXL3_MMA_ROWS` (default 64, `0` = cuBLAS for every expert), with a row in `docs/SETTINGS.md`. - **Fix for main: a race in `glmfast::Workers::run` (the shared CPU pool).** A straggler from the previous batch could claim an index under the next batch's larger job count. It then ran the new job, and `run()` could return while that job was still running. This shows when consecutive batches differ in size; here it was an intermittent segfault at start (kernel log `segfault at 0x2000000010` in a `fast_cpu_experts` lambda). `run()` now closes the ticket before it publishes the new job. A standalone stress test hits the race on the old pool and is clean on the new one. - **`native_fmt` refuses types outside ggml's table.** EXL3's type id is 200, which indexed past the table. - **The setup offers the EXL3 model as a download (`EXL3-3.05bpw`).** It is marked experimental, is never the default, and is not offered with `--backend hip`. - The catalog names all 27 files of the 3.05bpw branch, pinned to its commit `332ab45`, each with its size and sha256 (125.3 GB, `mtp.safetensors` included). - A download counts as whole at its published size, and each file is checked against its hash. - The model step checks `config.json` (glm5_next, exl3) instead of a GGUF header. - The pack step runs `tools/exl3_pack.py`. - The pictures use the Maya repo's vision files. - The README notes it under the models table. ## Tests **Rebased on v1.0.34 (`bdd4167`).** The rebase resolved conflicts in `glm_fast.cu` (the EXL3 jobs are taken before the HIP `mv_rdna` batch, which takes only BF16 and Q6_K jobs), the README (the setting row moved to `docs/SETTINGS.md`), `maya.py` and its tests (Maya-M-Derisked and the ZFS tests kept). On the rebased branch: - `strata` and `exl3_test` build for sm_86 and sm_120; - `tools/check_hip_compat.py` passes; - tools tests: 210, OK; server tests: 145, OK (3 skipped); - `exl3_test` passes on all nine GPUs, the RTX 3090 and the eight RTX 5060 Ti (`0 failures, 0 launch errors`); - the 9-GPU benchmark gives the same speeds as on v1.0.30 (the rebased table under Benchmarks), and its answers are coherent. Read for main's parallel split load (#80): each part loads its own EXL3 tables and shards in `load_pack`, the kernels' shared GPU scratch is created under a mutex, and the EXL3 CPU lane is set up in the deferred `fast_setup_finish`. On the v1.0.30 build: - **`exl3_test` (new ctest).** The device kernels against the scalar reference (`src/kernels/cpu/exl3_ref.cpp`): - every K (1-8) and codebook; - split-k, column views, q8_1 input and batches; - the expert step, reconstruction, `gemm_rows`; - the tensor-core set kernels; - the CPU kernel. It passes on an RTX 3090 (`exl3_test: ok (0 failures, 0 launch errors)`), built for sm_86 and sm_120. - **The model.** - Answers are coherent: a README summary, and factual questions such as "capital of France". - The decoded weights agree with Maya-L's (`--check`, cosines above). - The CPU lane's experts match the device kernels'. - **`tools/check_hip_compat.py`** passes. The tensor-core kernels are CUDA-only (`mma_supported()` is false on HIP), but the HIP build was not compiled here. - **Unit tests:** 7 new tests for the EXL3 download in `tools/test_maya_models.py`. - **The setup** with `--model EXL3-3.05bpw` was tested by hand on this machine and works: it writes the config (`maya-exl3-3.05bpw.json`, the model in `<models-dir>/EXL3-3.05bpw`), and Maya starts with the EXL3 model on all nine GPUs. ## Benchmarks **Setup.** - Model: turboderp/GLM-5.3-Flash-exl3 at 3.05 bpw, packed with `tools/exl3_pack.py`. - Build: this branch rebased on v1.0.30. - Host: Xeon Gold 6152 (2 × 22 cores), 177 GB RAM, CUDA 13.0, every GPU on PCIe 3.0 x8. - Flags: `--max-context 16384 --greedy`, `STRATA_GLM_TIMING=1`. Each setup is one engine start that answers three requests in order: 1. a 47-token chat prompt, with 256 tokens out (the decode measurement; as the first request, its prompt time is cold); 2. a 6,389-token prompt (README.md), with 64 tokens out; 3. a 12,140-token prompt (README.md plus a second document), with 64 tokens out. It reuses no cached prefix: the DONE line's reuse count is 0. ### One RTX 3090 (24 GB) 1,848 of the 12,096 experts are in VRAM; the rest are in a 99 GB pinned RAM tier. The CPU lane has 40 threads. | request | prompt | decode | VRAM hit | |---|---|---|---| | 47 tokens, 256 out | first request | **16.1 tok/s** | 44.7% | | 6,389 tokens, 64 out | **309 tok/s** (20.7 s) | 15.2 tok/s | 39.4% | | 12,140 tokens, 64 out | **530 tok/s** (22.9 s) | 16.9 tok/s | 47.1% | - **Decode is bound by the CPU lane.** Each token sends 166-187 experts to the CPU, which takes about 40 of its 62 ms. - **Prompt time barely grows with length.** A one-GPU prompt mostly copies the RAM-tier experts to the card, once per chunk (chunks of up to 32K tokens here), so the 12K prompt takes only 2.2 s longer than the 6.4K one. ### 9 GPUs (8 × RTX 5060 Ti 16 GB + the RTX 3090) The split is the engine's own: layers [0,7) [7,12) [12,16) [16,23) on the 3090, then [23,27) [27,32) [32,36) [36,41) [41,45). Its 12,384 VRAM slots hold every expert at start, and one 40-thread CPU pool is shared by all nine GPUs. With MTP (the default with two GPUs or more): | request | prompt | decode | drafts accepted | |---|---|---|---| | 47 tokens, 256 out | first request | **40.1 tok/s** | 81.9% | | 6,389 tokens, 64 out | **391 tok/s** (16.3 s) | 35.8 tok/s | 79.0% | | 12,140 tokens, 64 out | **780 tok/s** (15.6 s) | 40.5 tok/s | 93.5% | Without speculation (`STRATA_GLM_NO_SPEC=1`): | request | prompt | decode | |---|---|---| | 47 tokens, 256 out | first request | **27.1 tok/s** | | 6,389 tokens, 64 out | **391 tok/s** (16.3 s) | 25.0 tok/s | | 12,140 tokens, 64 out | **777 tok/s** (15.6 s) | 25.5 tok/s | **Rebased on v1.0.34**, MTP on, the same three prompts (token for token): | request | prompt | decode | drafts accepted | |---|---|---|---| | 47 tokens, 256 out | first request | **40.5 tok/s** | 82.7% | | 6,389 tokens, 64 out | **397 tok/s** (16.1 s) | 36.7 tok/s | 79.0% | | 12,140 tokens, 64 out | **786 tok/s** (15.4 s) | 37.6 tok/s | 82.3% | Decode and prompt speeds are within about 2% of the v1.0.30 build. The decode after the 12K prompt is lower because fewer of its drafts were accepted (82% against 94%): speculation is not exact (see Output), so the answer, and with it the acceptance, varies between runs. The first request's prompt took 7.8 s, against 2.4 s on v1.0.30. That is a one-time cost before decoding starts; its cause was not looked into. **The first long prompt after start seems to carry a one-time cost on 9 GPUs.** In every run the 12,140-token prompt took less time than the 6,389-token one, and its second 6K-token chunk finished 2.2-2.3 s after the first. During that first long prompt, each card lends about 2 GB of its expert pool to the prompt's buffers, and 1,443 experts move to the RAM tier. Whether that movement is what costs the time has not been checked yet. ## Output GGUF packs take the same code paths as before. The only shared changes are the `Workers::run` fix and the `native_fmt` range check. Maya-L ran on this branch before the rebase onto v1.0.30 (for the speculation check below), but not on the rebased build. **Speculation is not exact, on main as well.** With speculation off, two EXL3 runs give the same 80 greedy tokens. With it on, the EXL3 output diverges from speculation-off at token 36, and Maya-L's GGUF diverges at token 8. The pipelined speculative decode is therefore not bit-exact for either format. This is not specific to EXL3. ## Open items - **2 GPUs with MTP decode 18 tok/s.** The decode is bound by the CPU lane, because the VRAM hit rate is low on that split. - **Prompts are slower than Maya-L's.** Before the rebase, a 6,389-token first prompt on the same 9 GPUs took 18.0 s with EXL3 and 15.7 s with Maya-L. About 60% of the EXL3 prompt time is the expert GEMMs, which already run at the FP16 tensor-core rate. Int8/FP8 is the remaining lever. - **Images with the EXL3 model and Windows are untested.** --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:10 +07:00
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#320
No description provided.