vllm - 💡(How to fix) Fix [Bug]: "The page size of the layer is not divisible by the maximum page size" When serving Qwen3.5 MoE with custom "VLLM_PP_LAYER_PARTITION"

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] EngineCore failed to start. (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] Traceback (most recent call last): (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 1133, in run_engine_core (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] engine_core = EngineCoreProc(*args, engine_index=dp_rank, **kwargs) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] return func(*args, **kwargs) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 899, in init (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] super().init( (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 128, in init (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] kv_cache_config = self._initialize_kv_caches(vllm_config) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] return func(*args, **kwargs) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 261, in _initialize_kv_caches (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] kv_cache_configs = get_kv_cache_configs( (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1997, in get_kv_cache_configs (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] global_kv_cache_groups = get_kv_cache_groups(vllm_config, merged_kv_cache_specs) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1672, in get_kv_cache_groups (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] filtered_spec = unify_kv_cache_spec_page_size(filtered_spec) (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1040, in unify_kv_cache_spec_page_size (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] raise NotImplementedError( (EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] NotImplementedError: The page size of the layer is not divisible by the maximum page size. Cannot unify by adjusting block_size.

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 128 On-line CPU(s) list: 0-127 Vendor ID: AuthenticAMD BIOS Vendor ID: Advanced Micro Devices, Inc. Model name: AMD Ryzen Threadripper PRO 5995WX 64-Cores BIOS Model name: AMD Ryzen Threadripper PRO 5995WX 64-Cores None CPU @ 2.7GHz BIOS CPU family: 107 CPU family: 25 Model: 8 Thread(s) per core: 2 Core(s) per socket: 64 Socket(s): 1 Stepping: 2 BogoMIPS: 5389.87 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat umip vaes vpclmulqdq rdpid fsrm Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 2 MiB (64 instances) L1i cache: 2 MiB (64 instances) L2 cache: 32 MiB (64 instances) L3 cache: 256 MiB (8 instances) NUMA node(s): 1 NUMA node0 CPU(s): 0-127 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Code Example

==============================
        System Info
==============================
OS                           : Ubuntu 24.04 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version                : Could not collect
CMake version                : version 3.28.3
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.11.0+cu130
Is debug build               : False
CUDA used to build PyTorch   : 13.0
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.11.9 (main, Apr 27 2024, 21:16:11) [GCC 13.2.0] (64-bit runtime)
Python platform              : Linux-6.8.0-49-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 13.0.88
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : 
GPU 0: NVIDIA GeForce RTX 5090
GPU 1: NVIDIA GeForce RTX 5090
GPU 2: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 3: NVIDIA GeForce RTX 5090
GPU 4: NVIDIA GeForce RTX 5090
GPU 5: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 6: NVIDIA GeForce RTX 5090
GPU 7: NVIDIA GeForce RTX 5090
GPU 8: NVIDIA GeForce RTX 5090
GPU 9: NVIDIA GeForce RTX 5090
GPU 10: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 11: NVIDIA GeForce RTX 5090

Nvidia driver version        : 580.82.09
cuDNN version                : Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.10.2
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        48 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               128
On-line CPU(s) list:                  0-127
Vendor ID:                            AuthenticAMD
BIOS Vendor ID:                       Advanced Micro Devices, Inc.
Model name:                           AMD Ryzen Threadripper PRO 5995WX 64-Cores
BIOS Model name:                      AMD Ryzen Threadripper PRO 5995WX 64-Cores      None CPU @ 2.7GHz
BIOS CPU family:                      107
CPU family:                           25
Model:                                8
Thread(s) per core:                   2
Core(s) per socket:                   64
Socket(s):                            1
Stepping:                             2
BogoMIPS:                             5389.87
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat umip vaes vpclmulqdq rdpid fsrm
Hypervisor vendor:                    Microsoft
Virtualization type:                  full
L1d cache:                            2 MiB (64 instances)
L1i cache:                            2 MiB (64 instances)
L2 cache:                             32 MiB (64 instances)
L3 cache:                             256 MiB (8 instances)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-127
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flash_attn==2.6.3+cu130torch2.10
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-cu13==9.19.0.56
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.5.0
[pip3] nvidia-cutlass-dsl-libs-base==4.5.0
[pip3] nvidia-cutlass-dsl-libs-cu13==4.5.0
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] onnx==1.19.0
[pip3] onnx-ir==0.1.9
[pip3] onnxscript==0.3.1
[pip3] pynvml==12.0.0
[pip3] pytorch-triton==3.4.0+git11ec6354
[pip3] pyzmq==27.1.0
[pip3] sentence-transformers==5.0.0
[pip3] tokenspeed-triton==3.7.10.post20260505
[pip3] torch==2.11.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchao==0.13.0
[pip3] torchaudio==2.11.0+cu130
[pip3] torchvision==0.26.0+cu130
[pip3] transformer_engine_torch==2.5.0
[pip3] transformers==5.8.1
[pip3] transformers-stream-generator==0.0.5
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.21.1rc1.dev41+g599e75f43 (git sha: 599e75f43)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
  	GPU0	GPU1	GPU2	GPU3	GPU4	GPU5	GPU6	GPU7	GPU8	GPU9	GPU10	GPU11	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU1	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU2	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU3	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU4	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU5	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU6	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU7	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU8	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	0-127	0		N/A
GPU9	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	0-127	0		N/A
GPU10	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	0-127	0		N/A
GPU11	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	0-127	0		N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

==============================
     Environment Variables
==============================
LD_LIBRARY_PATH=:/usr/local/cuda/lib64
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root

---

(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] EngineCore failed to start.
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] Traceback (most recent call last):
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 1133, in run_engine_core
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     engine_core = EngineCoreProc(*args, engine_index=dp_rank, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     return func(*args, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 899, in __init__
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     super().__init__(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 128, in __init__
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     kv_cache_config = self._initialize_kv_caches(vllm_config)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     return func(*args, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 261, in _initialize_kv_caches
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     kv_cache_configs = get_kv_cache_configs(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                        ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1997, in get_kv_cache_configs
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     global_kv_cache_groups = get_kv_cache_groups(vllm_config, merged_kv_cache_specs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1672, in get_kv_cache_groups
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     filtered_spec = unify_kv_cache_spec_page_size(filtered_spec)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1040, in unify_kv_cache_spec_page_size
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     raise NotImplementedError(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] NotImplementedError: The page size of the layer is not divisible by the maximum page size. Cannot unify by adjusting block_size.
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
==============================
        System Info
==============================
OS                           : Ubuntu 24.04 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version                : Could not collect
CMake version                : version 3.28.3
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.11.0+cu130
Is debug build               : False
CUDA used to build PyTorch   : 13.0
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.11.9 (main, Apr 27 2024, 21:16:11) [GCC 13.2.0] (64-bit runtime)
Python platform              : Linux-6.8.0-49-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 13.0.88
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : 
GPU 0: NVIDIA GeForce RTX 5090
GPU 1: NVIDIA GeForce RTX 5090
GPU 2: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 3: NVIDIA GeForce RTX 5090
GPU 4: NVIDIA GeForce RTX 5090
GPU 5: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 6: NVIDIA GeForce RTX 5090
GPU 7: NVIDIA GeForce RTX 5090
GPU 8: NVIDIA GeForce RTX 5090
GPU 9: NVIDIA GeForce RTX 5090
GPU 10: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
GPU 11: NVIDIA GeForce RTX 5090

Nvidia driver version        : 580.82.09
cuDNN version                : Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.10.2
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.10.2
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        48 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               128
On-line CPU(s) list:                  0-127
Vendor ID:                            AuthenticAMD
BIOS Vendor ID:                       Advanced Micro Devices, Inc.
Model name:                           AMD Ryzen Threadripper PRO 5995WX 64-Cores
BIOS Model name:                      AMD Ryzen Threadripper PRO 5995WX 64-Cores      None CPU @ 2.7GHz
BIOS CPU family:                      107
CPU family:                           25
Model:                                8
Thread(s) per core:                   2
Core(s) per socket:                   64
Socket(s):                            1
Stepping:                             2
BogoMIPS:                             5389.87
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat umip vaes vpclmulqdq rdpid fsrm
Hypervisor vendor:                    Microsoft
Virtualization type:                  full
L1d cache:                            2 MiB (64 instances)
L1i cache:                            2 MiB (64 instances)
L2 cache:                             32 MiB (64 instances)
L3 cache:                             256 MiB (8 instances)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-127
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flash_attn==2.6.3+cu130torch2.10
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-cu13==9.19.0.56
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.5.0
[pip3] nvidia-cutlass-dsl-libs-base==4.5.0
[pip3] nvidia-cutlass-dsl-libs-cu13==4.5.0
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] onnx==1.19.0
[pip3] onnx-ir==0.1.9
[pip3] onnxscript==0.3.1
[pip3] pynvml==12.0.0
[pip3] pytorch-triton==3.4.0+git11ec6354
[pip3] pyzmq==27.1.0
[pip3] sentence-transformers==5.0.0
[pip3] tokenspeed-triton==3.7.10.post20260505
[pip3] torch==2.11.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchao==0.13.0
[pip3] torchaudio==2.11.0+cu130
[pip3] torchvision==0.26.0+cu130
[pip3] transformer_engine_torch==2.5.0
[pip3] transformers==5.8.1
[pip3] transformers-stream-generator==0.0.5
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.21.1rc1.dev41+g599e75f43 (git sha: 599e75f43)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
  	GPU0	GPU1	GPU2	GPU3	GPU4	GPU5	GPU6	GPU7	GPU8	GPU9	GPU10	GPU11	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU1	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU2	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU3	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU4	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU5	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU6	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU7	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	NODE	0-127	0		N/A
GPU8	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	NODE	0-127	0		N/A
GPU9	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	NODE	0-127	0		N/A
GPU10	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	NODE	0-127	0		N/A
GPU11	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	NODE	 X 	0-127	0		N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

==============================
     Environment Variables
==============================
LD_LIBRARY_PATH=:/usr/local/cuda/lib64
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root
</details>

🐛 Describe the bug

When serving Qwen3.5-122B-A10B, whenever I add VLLM_PP_LAYER_PARTITION=7,7,7,3,3,3,3,3,3,3,3,3 or values alike, the following exception would raise:

(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] EngineCore failed to start.
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] Traceback (most recent call last):
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 1133, in run_engine_core
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     engine_core = EngineCoreProc(*args, engine_index=dp_rank, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     return func(*args, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 899, in __init__
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     super().__init__(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 128, in __init__
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     kv_cache_config = self._initialize_kv_caches(vllm_config)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/tracing/otel.py", line 178, in sync_wrapper
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     return func(*args, **kwargs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/engine/core.py", line 261, in _initialize_kv_caches
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     kv_cache_configs = get_kv_cache_configs(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                        ^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1997, in get_kv_cache_configs
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     global_kv_cache_groups = get_kv_cache_groups(vllm_config, merged_kv_cache_specs)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1672, in get_kv_cache_groups
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     filtered_spec = unify_kv_cache_spec_page_size(filtered_spec)
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]   File "/root/swift/erepo/vllm/vllm/v1/core/kv_cache_utils.py", line 1040, in unify_kv_cache_spec_page_size
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159]     raise NotImplementedError(
(EngineCore pid=14704) ERROR 05-18 12:49:15 [core.py:1159] NotImplementedError: The page size of the layer is not divisible by the maximum page size. Cannot unify by adjusting block_size.

I have searched for related issues and most seems to be fixed already, but in my case using an uneven pipeline parallel config will still reproduce it. I had no problem serving Qwen3-MoE so it might be specifically with Qwen3.5-MoE.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: "The page size of the layer is not divisible by the maximum page size" When serving Qwen3.5 MoE with custom "VLLM_PP_LAYER_PARTITION"