Skip to content

[Engine] Prompt reading ~17% slower on Turing (sm_75) since Strata's own prompt kernels became default; MMQ build restores it #340

Backlog

Description

@nwbdan

After updating from main at e4ea22a (v0.1.45-poly.9 + 1 commit, engine 0.1.45) to v0.2.20-poly.4-hotfix (engine 0.1.66), prompt reading with Gemma 4 26B-A4B on an RTX 2060 Super is about 17% slower, and generation about 5-7% slower. The config is unchanged apart from the paths moved into terminal/ (which I gather is 0.2 convention).

Setup

  • GPU: RTX 2060 Super 8 GB (Turing, sm_75), driver 580.196.07, Linux Mint, X11
  • CPU RAM: 32 GB
  • Engine built from source by setup.sh; engine-poly/BUILD.json: version 0.1.66, archs [75], CUDA 12.8
  • Model: gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf with mtp-gemma-4-26B-A4B-it-Q8_0.gguf as --draft-model, vision on CPU
  • Engine args: --vram-reserve-mib 640, --conversation-cache-mib 8192, --kv int8, --expert-profile
  • Single user, served through serve/server.py --engine strata

Cause confirmed with an MMQ build

At e4ea22a the CUDA build always compiled strata_poly_mmq (llama.cpp's MMQ kernels for prompt products). Since 09654c0 the default build uses Strata's own prompt kernels, and engine/cmake/strata_poly.cmake says Turing takes their dequantized-matrix + BLAS path.

Rebuilding v0.2.20-poly.4-hotfix with -DSTRATA_POLY_MMQ=ON -DSTRATA_GGML_DIR=engine/third_party/strata-llama (pin 3cf03257f, the same commit the 0.1.45 build used), same config, 73,728 context:

0.1.45 (e4ea22a) 0.2.20-poly.4-hotfix, default 0.2.20-poly.4-hotfix, STRATA_POLY_MMQ=ON
Prompt, 5,446 tokens 1,246 t/s 1,040 t/s 1,347 t/s
Generation, temp 0 75.7 t/s 72.3 t/s 70.9 t/s
Generation, temp 1.0 75.2 t/s 70.1 t/s 69.6 t/s

So the prefill loss is the Turing fallback in the own kernels; MMQ is 30% faster there. Generation is 5-7% lower than 0.1.45 with either build, so that part has another cause.

This is the CUDA/Turing counterpart of #289 (same cause on HIP; #330 is HIP-only). sm_75 has int8 tensor cores (mma m8n8k16 s8): could the int8 tile path cover Turing, or could MMQ stay available beyond the two-release window until it does?

Questions

  1. Can Turing get the int8 prompt path (or keep STRATA_POLY_MMQ) so the default build matches MMQ?
  2. Is there a known decode change between engine 0.1.45 and 0.1.66 that would explain the 5-7% generation drop on sm_75?

NOTE: Same pattern with Inkling 2 Mini UD-Q3_K_XL (6,145-token prompt): ~612 t/s with the default build, ~759 t/s with MMQ, generation unchanged (~47 t/s).

NOTE2: I am a beginner hobbyist and Claude Opus helped me test this.

Activity

  1. added
    needs-format
    on Nov 25, 2026
  2. github-actions commented on Nov 25, 2026

    @github-actions

    Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

    • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

    Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

    Details: CONTRIBUTING.md

  3. changed the title [-]Prompt reading ~17% slower on Turing (sm_75) since Strata's own prompt kernels became default; MMQ build restores it[/-] [+][Engine] Prompt reading ~17% slower on Turing (sm_75) since Strata's own prompt kernels became default; MMQ build restores it[/+] on Nov 25, 2026
  4. removed
    needs-format
    on Nov 25, 2026
  5. github-actions commented on Nov 25, 2026

    @github-actions

    Thanks, this follows the format now.

  6. VecSzn commented on Nov 25, 2026

    @VecSzn
    Collaborator

    Good catch on Turing \sm_75\ with Gemma 4. Could you also share the exact command, prompt length, and whether --kv q8_0\ or any \STRATA_\ env vars were set so we can compare both paths cleanly?

  7. nwbdan commented on Nov 25, 2026

    @nwbdan
    Author

    Thanks for looking at this. I use Gemma as my daily driver, so its speed is important for me. Details below (paths shortened).

    Engine command. This is the Gemma config as serve/server.py --engine strata --config strata-gemma4-qat-ud-q4_k_xl.json launches it, and it was identical for all three columns. Only the engine-poly/strata-poly binary was swapped.

    terminal/engine-poly/strata-poly --serve \
      --model <models>/gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf \
      --max-context 73728 \
      --vram-reserve-mib 640 \
      --expert-profile <packs>/gemma4-qat-ud-q4_k_xl/expert-profile.txt \
      --draft-model <models>/mtp-gemma-4-26B-A4B-it-Q8_0.gguf \
      --conversation-cache-mib 8192 \
      --kv int8

    Vision runs through strata-vision with mmproj-F16.gguf, "gpu": false, 6 threads, "gpu": 0, and CUDA 12.8 in lib_dirs.

    KV cache: --kv int8, not q8_0, in all three columns, including the 0.1.45 baseline.

    Environment: the only STRATA_* variable in the engine's environment is STRATA_API_KEY. STRATA_FATTN and the other variables are not set.

    Builds (from CMakeCache.txt):

      | default (setup.sh, build-poly) | MMQ (build-poly-mmq) -- | -- | -- CMAKE_CUDA_ARCHITECTURES | 75 | 75 STRATA_POLY_MMQ | OFF | ON STRATA_GGML_DIR | (empty) | engine/third_party/strata-llama

    Every other option was copied from the default build's cache: Release, Ninja, STRATA_ENABLE_CUDA=ON, STRATA_PORTABLE=OFF, nvcc 12.8.

    Prompt length and method: a small script against /v1/chat/completions that reads the llama.cpp-style timings. Each configuration got a warm-up request, then 3 runs, with the first temp-0 run discarded.

    • Prompt test: 5,446 tokens at temp 0, max_tokens 8, with a timestamp prefix so the conversation cache can't reuse it.
    • Generation: 256 tokens at temp 0, and at temp 1.0 / top-p 0.95 / top-k 64.
    • Thinking off.
    • Noise: under 1% on prompt, about ±3 t/s on generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions