Unverified Commit 656fd729 authored by shangmingc's avatar shangmingc Committed by GitHub
Browse files

[Misc] Fix speculative config repr string (#15860)


Signed-off-by: default avatarShangming Cai <caishangming@linux.alibaba.com>
parent 79455cf4
......@@ -2359,12 +2359,10 @@ class SpeculativeConfig:
return self.num_speculative_tokens
def __repr__(self) -> str:
if self.prompt_lookup_max is not None and self.prompt_lookup_max > 0:
draft_model = "ngram"
else:
draft_model = self.draft_model_config.model
method = self.method
model = None if method == "ngram" else self.draft_model_config.model
num_spec_tokens = self.num_speculative_tokens
return f"SpeculativeConfig({draft_model=}, {num_spec_tokens=})"
return f"SpeculativeConfig({method=}, {model=}, {num_spec_tokens=})"
@dataclass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment