[GH-ISSUE #261] two H20 nodes to run DeepSeek671b 1P1D occur RuntimeError: shape '[-1, 16, 56]' is invalid for input of size 36864 #106

Closed
opened 2026-10-29 21:09:23 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @RockGo on GitHub (Apr 16, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/261

(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] output = self.model_runner.execute_model(
(VllmWorkerProcess pid=2491010) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] RuntimeError: shape '[-1, 16, 56]' is invalid for input of size 36864
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] return func(*args, **kwargs)
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1787, in execute_model
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] get_kv_transfer_group().send_kv_caches_and_hidden_states(
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_transfer_agent.py", line 61, in send_kv_caches_and_hidden_states
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] self.connector.send_kv_caches_and_hidden_states(
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_connector/mooncake_store_connector.py", line 101, in send_kv_caches_and_hidden_states
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] key_cache = kv_cache[0].reshape(-1, num_heads, head_size)
(VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] RuntimeError: shape '[-1, 16, 56]' is invalid for input of size 36864

Originally created by @RockGo on GitHub (Apr 16, 2025). Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/261 (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] output = self.model_runner.execute_model( (VllmWorkerProcess pid=2491010) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] RuntimeError: shape '[-1, 16, 56]' is invalid for input of size 36864 (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] return func(*args, **kwargs) (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1787, in execute_model (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] get_kv_transfer_group().send_kv_caches_and_hidden_states( (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_transfer_agent.py", line 61, in send_kv_caches_and_hidden_states (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] self.connector.send_kv_caches_and_hidden_states( (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] File "/root/miniconda3/envs/vllm/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_connector/mooncake_store_connector.py", line 101, in send_kv_caches_and_hidden_states (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] key_cache = kv_cache[0].reshape(-1, num_heads, head_size) (VllmWorkerProcess pid=2491016) ERROR 04-16 20:47:15 [multiproc_worker_utils.py:238] RuntimeError: shape '[-1, 16, 56]' is invalid for input of size 36864
Author
Owner

@ShangmingCai commented on GitHub (Apr 17, 2025):

Can you try the vllm main branch? There is a fix to support MLA with mooncake.

<!-- gh-comment-id:2812208487 --> @ShangmingCai commented on GitHub (Apr 17, 2025): Can you try the vllm main branch? There is a fix to support MLA with mooncake.
Author
Owner

@ShangmingCai commented on GitHub (Apr 17, 2025):

Maybe try this https://github.com/vllm-project/vllm/pull/16020 ?

<!-- gh-comment-id:2812214987 --> @ShangmingCai commented on GitHub (Apr 17, 2025): Maybe try this https://github.com/vllm-project/vllm/pull/16020 ?
Author
Owner

@RockGo commented on GitHub (Apr 17, 2025):

it's works ok

<!-- gh-comment-id:2812732907 --> @RockGo commented on GitHub (Apr 17, 2025): it's works ok
Sign in to join this conversation.
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
kvcache-ai/Mooncake#106
No description provided.