Skip to content

Commit 4d56c89

Browse files
ShangmingCaishreyankg
authored andcommitted
[Misc] Fix speculative config repr string (vllm-project#15860)
Signed-off-by: Shangming Cai <caishangming@linux.alibaba.com>
1 parent 9919b4f commit 4d56c89

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
@@ -2361,12 +2361,10 @@ def num_lookahead_slots(self) -> int:
23612361
return self.num_speculative_tokens
23622362

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

23712369

23722370
@dataclass

0 commit comments

Comments
 (0)