Unverified Commit 4449f3da authored by Alec's avatar Alec Committed by GitHub
Browse files

fix: never sleep on the eos (#2039)

parent 76fd4716
...@@ -122,14 +122,12 @@ class DecodeWorkerHandler(BaseWorkerHandler): ...@@ -122,14 +122,12 @@ class DecodeWorkerHandler(BaseWorkerHandler):
sampling_params = SamplingParams(**self.default_sampling_params) sampling_params = SamplingParams(**self.default_sampling_params)
for key, value in request["sampling_options"].items(): for key, value in request["sampling_options"].items():
if not value: if value is not None and hasattr(sampling_params, key):
continue
if hasattr(sampling_params, key):
setattr(sampling_params, key, value) setattr(sampling_params, key, value)
max_tokens = request["stop_conditions"]["max_tokens"] for key, value in request["stop_conditions"].items():
if max_tokens: if value is not None and hasattr(sampling_params, key):
sampling_params.max_tokens = max_tokens setattr(sampling_params, key, value)
if self.can_prefill: if self.can_prefill:
# Create a copy for prefill with specific modifications # Create a copy for prefill with specific modifications
......
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