mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
support n param for hf
This commit is contained in:
parent
cd2c1dff2d
commit
512769e841
5 changed files with 5 additions and 5 deletions
|
@ -1039,7 +1039,7 @@ def get_optional_params( # use the openai defaults
|
|||
optional_params["stop_sequences"] = stop
|
||||
elif custom_llm_provider == "huggingface":
|
||||
## check if unsupported param passed in
|
||||
supported_params = ["stream", "temperature", "max_tokens", "top_p", "stop",]
|
||||
supported_params = ["stream", "temperature", "max_tokens", "top_p", "stop", "n"]
|
||||
_check_valid_arg(supported_params=supported_params)
|
||||
|
||||
if temperature:
|
||||
|
@ -1055,6 +1055,8 @@ def get_optional_params( # use the openai defaults
|
|||
optional_params["stop"] = stop
|
||||
if max_tokens:
|
||||
optional_params["max_new_tokens"] = max_tokens
|
||||
if n:
|
||||
optional_params["best_of"] = n
|
||||
if presence_penalty:
|
||||
optional_params["repetition_penalty"] = presence_penalty
|
||||
elif custom_llm_provider == "together_ai":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue