Skip to content

Commit

Permalink
dev: make sure qwen puts out at least one token
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Nov 14, 2024
1 parent 098f12b commit 5a9dd48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_engine(model_class: str, model_id: str, context_size: int = None):
# "enforce_eager": True,
"enable_prefix_caching": True,
},
sampling_params=SamplingParams(temperature=0, max_tokens=2048),
sampling_params=SamplingParams(temperature=0, max_tokens=2048, min_tokens=1),
)
return QwenFunctionCallingAdapter(model)
if model_id == "Qwen/Qwen2.5-7B-Instruct":
Expand All @@ -115,7 +115,7 @@ def get_engine(model_class: str, model_id: str, context_size: int = None):
# for more stability
"enable_prefix_caching": True,
},
sampling_params=SamplingParams(temperature=0, max_tokens=2048),
sampling_params=SamplingParams(temperature=0, max_tokens=2048, min_tokens=1),
)
return QwenFunctionCallingAdapter(model)
# todo: cohere
Expand Down

0 comments on commit 5a9dd48

Please sign in to comment.