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):
10771077 "openai-compatible backends. If not specified, default to greedy "
10781078 "decoding (i.e. temperature==0.0)." ,
10791079 )
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+ )
10801101
10811102 parser .add_argument (
10821103 '--tokenizer-mode' ,
@@ -1211,6 +1232,9 @@ async def main_async(args: argparse.Namespace) -> dict[str, Any]:
12111232 "top_k" : args .top_k ,
12121233 "min_p" : args .min_p ,
12131234 "temperature" : args .temperature ,
1235+ "frequency_penalty" : args .frequency_penalty ,
1236+ "presence_penalty" : args .presence_penalty ,
1237+ "repetition_penalty" : args .repetition_penalty ,
12141238 }.items () if v is not None
12151239 }
12161240
You can’t perform that action at this time.
0 commit comments