[ROCm] [CI] Keep original layer count for Eagle3DeepseekV2 init test - #48260
stefankoncarevic wants to merge 5 commits into
Conversation
Eagle3 draft `AQ-MedAI/Kimi-K25-eagle3` requests auxiliary hidden states from target layers (2, 30, 58). The initialization test's default `dummy_hf_overrides` collapses the target `Kimi-K2.5` to a single hidden layer, so those layers don't exist and `DeepseekV2Model.forward` returns a bare `hidden_states` tensor instead of `(hidden_states, aux_hidden_states)`. With Eagle3's `use_aux_hidden_state_outputs=True`, `_dummy_run` unpacks two values and iterating the bare tensor fails: ValueError: too many values to unpack (expected 2) Set `use_original_num_layers=True` so the target keeps all layers, the configured aux layers exist, and the tuple is returned (same pattern as the other Eagle3 entries). Also set `max_model_len=8192`: with the full layer count Kimi-K2.5 is large, and the default max len sizes a KV cache too big to fit alongside the weights (OOM); reducing it keeps the test within CI VRAM. Test-only change; no vLLM runtime code is modified. Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com>
|
Putting this on hold pending #47077.
#47077 fixes that for |
|
Resolved by #48527. Verified locally on MI300 that test_can_initialize_large_subset[Eagle3DeepseekV2ForCausalLM] passes on current main with the default config. Closing. |
Purpose
test_can_initialize_large_subset[Eagle3DeepseekV2ForCausalLM]fails in the AMDROCm CI (basic models init tests) with:
The Eagle3 draft (
AQ-MedAI/Kimi-K25-eagle3) requests auxiliary hidden statesfrom target layers
(2, 30, 58)(log:Using auxiliary layers from speculative config: (2, 30, 58)). The initialization test's defaultdummy_hf_overridescollapses the target model (
moonshotai/Kimi-K2.5) to a single hidden layer, solayers 2/30/58 don't exist. In
DeepseekV2Model.forwardno layer index thenmatches,
aux_hidden_statesstays empty, and the model returns a barehidden_statestensor instead of the(hidden_states, aux_hidden_states)tuple:Because Eagle3 sets
use_aux_hidden_state_outputs=True,_dummy_rununconditionally unpacks two values (
hidden_states, _ = outputs). Unpacking abare tensor iterates its first dim (num tokens > 2), raising
too many values to unpack (expected 2).This is the same class of issue as
Eagle3Qwen3vlForCausalLM: with reducedlayers the configured aux layers are absent.
Changes
use_original_num_layers=TrueforEagle3DeepseekV2ForCausalLMintests/models/registry.py, so the target keeps its full layer count duringinitialization. Layers 2/30/58 then exist, aux hidden states are collected,
the model returns the
(hidden_states, aux_hidden_states)tuple, and theunpack succeeds. This matches the existing pattern used by the other Eagle3 /
speculative entries.
max_model_len=8192. With the full layer count the target(
Kimi-K2.5) is large (~169 GiB of dummy weights), and the defaultmax_model_len(262144) sizes a KV cache too big to fit alongside the weights,causing a
torch.OutOfMemoryErrorduring KV cache allocation. Reducingmax_model_lenshrinks the KV cache so the test fits in CI VRAM (same approachalready used by other heavy entries in this registry).
Test Plan
Environment: AMD MI300 (gfx942), ROCm,
VLLM_ROCM_USE_AITERunset (defaultFalse→ROCM_ATTNbackend), matching the AMD CI configuration.pytest -x -s "tests/models/test_initialization.py::test_can_initialize_large_subset[Eagle3DeepseekV2ForCausalLM]"Test Result
test_can_initialize_large_subset[Eagle3DeepseekV2ForCausalLM]: 1 passed(~288 s), previously failed with
ValueError: too many values to unpack (expected 2).Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.