Skip to content

Commit 7d4e0f2

Browse files
rahul-tuliclaude
andcommitted
refactor: Focus speculators Eagle support on V1 engine only
- Remove V0 engine changes from eagle.py - Keep V1 engine support in llama_eagle.py with layernorm support - Maintain config detection and translation for speculators format - Ensure V1 engine compatibility for all Eagle models This simplifies the implementation by focusing only on the modern V1 engine which provides better performance and features. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Rahul Tuli <rtuli@redhat.com>
1 parent e4e87fb commit 7d4e0f2

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

vllm/model_executor/models/eagle.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,24 +204,8 @@ def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]):
204204
# https://huggingface.co/abhigoyal/EAGLE-LLaMA3-Instruct-8B-vllm
205205
# Also, here's an example script for converting trained EAGLE
206206
# checkpoint to vLLM compatible version: https://gist.github.com/abhigoyal1997/1e7a4109ccb7704fbc67f625e86b2d6d
207-
208-
# Support for speculators format weights
209-
speculators_name_map = {
210-
"fusion_fc.weight": "fc.weight",
211-
"fusion_fc.bias": "fc.bias",
212-
"embedding_layernorm.weight": "enorm.weight",
213-
"pre_lm_head_layernorm.weight": "hnorm.weight",
214-
}
215-
216207
model_weights = {}
217208
for name, loaded_weight in weights:
218-
# Handle speculators format weight names
219-
if name in speculators_name_map:
220-
name = speculators_name_map[name]
221-
elif name.startswith("transformer."):
222-
# transformer.* -> model.model.layers.0.*
223-
suffix = name[len("transformer."):]
224-
name = f"model.model.layers.0.{suffix}"
225209
if name == "token_map":
226210
if self.config.truncated_vocab_size < self.config.vocab_size:
227211
self.token_map = nn.Parameter(loaded_weight,

0 commit comments

Comments
 (0)