Skip to content

Commit

Permalink
[CI][Spec Decode] fix: broken test for EAGLE model (vllm-project#11972)
Browse files Browse the repository at this point in the history
Signed-off-by: Sungjae Lee <[email protected]>
Signed-off-by: hzh <[email protected]>
  • Loading branch information
llsj14 authored and HwwwwwwwH committed Jan 22, 2025
1 parent 93a78ba commit dd2f627
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .buildkite/test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,15 @@ steps:
- pytest -v -s test_logits_processor.py
- pytest -v -s model_executor/test_guided_processors.py

- label: Speculative decoding tests # 30min
- label: Speculative decoding tests # 40min
source_file_dependencies:
- vllm/spec_decode
- tests/spec_decode
- vllm/model_executor/models/eagle.py
commands:
- pytest -v -s spec_decode/e2e/test_multistep_correctness.py
- VLLM_ATTENTION_BACKEND=FLASH_ATTN pytest -v -s spec_decode --ignore=spec_decode/e2e/test_multistep_correctness.py
- pytest -v -s spec_decode/e2e/test_eagle_correctness.py

- label: LoRA Test %N # 15min each
mirror_hardwares: [amd]
Expand Down
11 changes: 10 additions & 1 deletion vllm/model_executor/models/eagle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

class DummyInputLayerNorm(nn.Module):

def __init__(self, weight=None, bias=None):
super().__init__()
self.weight = nn.Parameter(weight) if weight is not None else None
self.bias = nn.Parameter(bias) if bias is not None else None

def forward(self, x):
return x

Expand Down Expand Up @@ -69,7 +74,11 @@ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):

# Modify layer normalization and residual connections as suggested
# in the EAGLE framework: https://github.com/SafeAILab/EAGLE
self.model.model.layers[0].input_layernorm = DummyInputLayerNorm()
# While weights and biases are generally not needed,
# they are retained here to support certain unit tests
# (e.g., spec_decode/e2e/test_eagle_correctness.py).
self.model.model.layers[0].input_layernorm = DummyInputLayerNorm(
weight=self.model.model.layers[0].input_layernorm.weight)
self.model.model.norm = DummyOutputNorm()

self.orig_vocab_size = config.vocab_size
Expand Down

0 comments on commit dd2f627

Please sign in to comment.