mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-09 22:05:30 +00:00
fix top_p = 0 bug
This commit is contained in:
parent
aeabd783b0
commit
5c7ed7b579
2 changed files with 4 additions and 0 deletions
|
@ -368,6 +368,8 @@ class BalanceServeInterface(BackendInterfaceBase):
|
|||
stop_criteria = [self.tokenizer.encode(self.tokenizer.eos_token, add_special_tokens=False),self.tokenizer.encode("<|im_end|>")]
|
||||
query_add.stop_criteria = stop_criteria
|
||||
query_add.sample_options.temperature = temperature
|
||||
if top_p == 0:
|
||||
top_p = 0.0001
|
||||
query_add.sample_options.top_p = top_p
|
||||
query_add.estimated_length = min(self.args.cache_lens, query_length+self.args.max_new_tokens)
|
||||
query_id = self.sched_client.add_query(query_add)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue