mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
fix bug in vllm engine
Former-commit-id: 38f02a2c5b52cba6908c2d3c2a455677f8574faf
This commit is contained in:
parent
a8c7531250
commit
2c011060b1
@ -100,8 +100,9 @@ class VllmEngine(BaseEngine):
|
|||||||
max_new_tokens = input_kwargs.pop("max_new_tokens", None)
|
max_new_tokens = input_kwargs.pop("max_new_tokens", None)
|
||||||
stop = input_kwargs.pop("stop", None)
|
stop = input_kwargs.pop("stop", None)
|
||||||
|
|
||||||
|
max_tokens = self.generating_args["max_new_tokens"] or self.generating_args["max_length"]
|
||||||
if max_length:
|
if max_length:
|
||||||
max_tokens = max_length - prompt_length
|
max_tokens = max_length - prompt_length if max_length > prompt_length else 1
|
||||||
|
|
||||||
if max_new_tokens:
|
if max_new_tokens:
|
||||||
max_tokens = max_new_tokens
|
max_tokens = max_new_tokens
|
||||||
|
Loading…
x
Reference in New Issue
Block a user