File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1077,6 +1077,27 @@ def add_cli_args(parser: argparse.ArgumentParser):
1077
1077
"openai-compatible backends. If not specified, default to greedy "
1078
1078
"decoding (i.e. temperature==0.0)." ,
1079
1079
)
1080
+ sampling_group .add_argument (
1081
+ "--frequency-penalty" ,
1082
+ type = float ,
1083
+ default = None ,
1084
+ help = "Frequency penalty sampling parameter. Only has effect on "
1085
+ "openai-compatible backends." ,
1086
+ )
1087
+ sampling_group .add_argument (
1088
+ "--presence-penalty" ,
1089
+ type = float ,
1090
+ default = None ,
1091
+ help = "Presence penalty sampling parameter. Only has effect on "
1092
+ "openai-compatible backends." ,
1093
+ )
1094
+ sampling_group .add_argument (
1095
+ "--repetition-penalty" ,
1096
+ type = float ,
1097
+ default = None ,
1098
+ help = "Repetition penalty sampling parameter. Only has effect on "
1099
+ "openai-compatible backends." ,
1100
+ )
1080
1101
1081
1102
parser .add_argument (
1082
1103
'--tokenizer-mode' ,
@@ -1211,6 +1232,9 @@ async def main_async(args: argparse.Namespace) -> dict[str, Any]:
1211
1232
"top_k" : args .top_k ,
1212
1233
"min_p" : args .min_p ,
1213
1234
"temperature" : args .temperature ,
1235
+ "frequency_penalty" : args .frequency_penalty ,
1236
+ "presence_penalty" : args .presence_penalty ,
1237
+ "repetition_penalty" : args .repetition_penalty ,
1214
1238
}.items () if v is not None
1215
1239
}
1216
1240
You can’t perform that action at this time.
0 commit comments