Skip to content

Commit 656fd72

Browse files
authored
[Misc] Fix speculative config repr string (#15860)
Signed-off-by: Shangming Cai <caishangming@linux.alibaba.com>
1 parent 79455cf commit 656fd72

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

vllm/config.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,12 +2359,10 @@ def num_lookahead_slots(self) -> int:
23592359
return self.num_speculative_tokens
23602360

23612361
def __repr__(self) -> str:
2362-
if self.prompt_lookup_max is not None and self.prompt_lookup_max > 0:
2363-
draft_model = "ngram"
2364-
else:
2365-
draft_model = self.draft_model_config.model
2362+
method = self.method
2363+
model = None if method == "ngram" else self.draft_model_config.model
23662364
num_spec_tokens = self.num_speculative_tokens
2367-
return f"SpeculativeConfig({draft_model=}, {num_spec_tokens=})"
2365+
return f"SpeculativeConfig({method=}, {model=}, {num_spec_tokens=})"
23682366

23692367

23702368
@dataclass

0 commit comments

Comments
 (0)