Skip to content

Commit

Permalink
fix: add supported params for default models
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjz committed Nov 8, 2023
1 parent e833a86 commit 5c6e969
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/qianfan/resources/llm/chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"top_p",
"penalty_score",
"user_id",
"system",
},
),
"ERNIE-Bot": QfLLMInfo(
Expand Down Expand Up @@ -108,6 +109,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-7b-chat": QfLLMInfo(
Expand All @@ -116,6 +121,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-13b-chat": QfLLMInfo(
Expand All @@ -124,6 +133,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-70b-chat": QfLLMInfo(
Expand All @@ -132,6 +145,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Qianfan-BLOOMZ-7B-compressed": QfLLMInfo(
Expand All @@ -140,6 +157,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Qianfan-Chinese-Llama-2-7B": QfLLMInfo(
Expand All @@ -148,6 +169,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"ChatGLM2-6B-32K": QfLLMInfo(
Expand All @@ -156,6 +181,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"AquilaChat-7B": QfLLMInfo(
Expand All @@ -164,6 +193,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
UNSPECIFIED_MODEL: QfLLMInfo(
Expand Down
33 changes: 33 additions & 0 deletions src/qianfan/resources/llm/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"top_p",
"penalty_score",
"user_id",
"system",
},
),
"ERNIE-Bot": QfLLMInfo(
Expand Down Expand Up @@ -104,6 +105,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-7b-chat": QfLLMInfo(
Expand All @@ -112,6 +117,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-13b-chat": QfLLMInfo(
Expand All @@ -120,6 +129,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Llama-2-70b-chat": QfLLMInfo(
Expand All @@ -128,6 +141,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Qianfan-BLOOMZ-7B-compressed": QfLLMInfo(
Expand All @@ -136,6 +153,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"Qianfan-Chinese-Llama-2-7B": QfLLMInfo(
Expand All @@ -144,6 +165,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"ChatGLM2-6B-32K": QfLLMInfo(
Expand All @@ -152,6 +177,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
"AquilaChat-7B": QfLLMInfo(
Expand All @@ -160,6 +189,10 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
optional_keys={
"stream",
"user_id",
"temperaturetop_k",
"top_p",
"penalty_score",
"stop",
},
),
UNSPECIFIED_MODEL: QfLLMInfo(
Expand Down

0 comments on commit 5c6e969

Please sign in to comment.