[GH-ISSUE #645] Qwen (CYBER-FROST) on 2 GPUs, Windows: the batched PLE prefill path crashes with "prefill copy_i32: an illegal memory access" on the first long prompt; MAYA_PLE_BATCH=0 avoids it #265

Open
opened 2026-10-29 21:23:30 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @air-terminal on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/645

Summary

On Windows with a 2-GPU layer split, CYBER-FROST-3.8-PS crashes on the first long prompt as soon as the batched PLE block in the prefill is on (the default). With MAYA_PLE_BATCH=0 (the per-token PLE block, src/prefill/prefill.cpp ~L1050) everything works. Decode is not affected.

Reproduction

./start-maya.bat --bench with the config below:

  • With "MAYA_PLE_BATCH": "0" in env: the benchmark completes (decode 33.2 tok/s, prefill 382 tok/s at 2K and 438 tok/s at 8K).
  • With env empty: the three decode prompts complete (32.6 / 33.7 / 34.2 tok/s), then the engine dies on the first 2048-token prompt:
glm prefill mmq: CUDA0 the scratch pool takes a new 4.0 MB buffer (410.1 MB free of 16283.4 MB, 2.0 MB held)
prefill copy_i32: an illegal memory access was encountered
maya serve: prefill copy_i32: an illegal memory access was encountered

The same engine built with CUDA 12.8 also stopped on long prompts in chat before I set MAYA_PLE_BATCH=0. I believe it was the same error, but I did not keep that log. The CUDA 13.0 build fails reproducibly as above.

Setup

  • Project Maya v1.1.36 (Qwen engine 0.1.27), Windows 11 26H2, built with CUDA 13.0
  • GPUs, in config order: CUDA0 = RTX 5060 Ti 16 GB (OCuLink, PCIe Gen4 x4, ~6.5 GB/s H2D), CUDA1 = RTX 5070 Ti 16 GB (PCIe Gen5 x16)
  • Core Ultra 7 265 (AVX2, no AVX-512), 96 GB RAM
  • Model: CYBER-FROST-3.8-PS-GUFF Q5_K_M, the setup's pack and MTP
  • Layer split auto: K=7 (layers 0-6 on CUDA0, 7-47 on CUDA1)
  • Start log: the prompt path allocates its own buffers (too few cache slots to borrow); 450 MiB VRAM free with everything loaded

Args (changed from the setup's: --max-context 131072, --kv k8v4, --experts-from-gguf off):

--pack <pack> --native <gguf> --ple-gguf <gguf> --spec 4 --prefill auto --expert-cache auto
--max-context 131072 --kv k8v4 --expert-profile <pack>/expert-profile.bin --mtp <pack>/mtp --experts-from-gguf off

I have not yet tried the batched path on one GPU or with the setup's original args (--kv int8, 256K). I can run either if that helps narrow it down.

Possibly related: #604 (the Qwen engine is still 0.1.27).

Originally created by @air-terminal on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/645 ## Summary On Windows with a 2-GPU layer split, CYBER-FROST-3.8-PS crashes on the first long prompt as soon as the batched PLE block in the prefill is on (the default). With `MAYA_PLE_BATCH=0` (the per-token PLE block, `src/prefill/prefill.cpp` ~L1050) everything works. Decode is not affected. ## Reproduction `./start-maya.bat --bench` with the config below: - With `"MAYA_PLE_BATCH": "0"` in `env`: the benchmark completes (decode 33.2 tok/s, prefill 382 tok/s at 2K and 438 tok/s at 8K). - With `env` empty: the three decode prompts complete (32.6 / 33.7 / 34.2 tok/s), then the engine dies on the first 2048-token prompt: ``` glm prefill mmq: CUDA0 the scratch pool takes a new 4.0 MB buffer (410.1 MB free of 16283.4 MB, 2.0 MB held) prefill copy_i32: an illegal memory access was encountered maya serve: prefill copy_i32: an illegal memory access was encountered ``` The same engine built with CUDA 12.8 also stopped on long prompts in chat before I set `MAYA_PLE_BATCH=0`. I believe it was the same error, but I did not keep that log. The CUDA 13.0 build fails reproducibly as above. ## Setup - Project Maya v1.1.36 (Qwen engine 0.1.27), Windows 11 26H2, built with CUDA 13.0 - GPUs, in config order: CUDA0 = RTX 5060 Ti 16 GB (OCuLink, PCIe Gen4 x4, ~6.5 GB/s H2D), CUDA1 = RTX 5070 Ti 16 GB (PCIe Gen5 x16) - Core Ultra 7 265 (AVX2, no AVX-512), 96 GB RAM - Model: CYBER-FROST-3.8-PS-GUFF Q5_K_M, the setup's pack and MTP - Layer split auto: K=7 (layers 0-6 on CUDA0, 7-47 on CUDA1) - Start log: `the prompt path allocates its own buffers (too few cache slots to borrow)`; 450 MiB VRAM free with everything loaded Args (changed from the setup's: `--max-context 131072`, `--kv k8v4`, `--experts-from-gguf off`): ``` --pack <pack> --native <gguf> --ple-gguf <gguf> --spec 4 --prefill auto --expert-cache auto --max-context 131072 --kv k8v4 --expert-profile <pack>/expert-profile.bin --mtp <pack>/mtp --experts-from-gguf off ``` I have not yet tried the batched path on one GPU or with the setup's original args (`--kv int8`, 256K). I can run either if that helps narrow it down. Possibly related: #604 (the Qwen engine is still 0.1.27).
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#265
No description provided.