@@ -53,6 +53,7 @@ class EngineArgs:
53
53
revision : Optional [str ] = None
54
54
code_revision : Optional [str ] = None
55
55
rope_scaling : Optional [dict ] = None
56
+ rope_theta : Optional [float ] = None
56
57
tokenizer_revision : Optional [str ] = None
57
58
quantization : Optional [str ] = None
58
59
enforce_eager : bool = False
@@ -400,6 +401,12 @@ def add_cli_args(
400
401
type = json .loads ,
401
402
help = 'RoPE scaling configuration in JSON format. '
402
403
'For example, {"type":"dynamic","factor":2.0}' )
404
+ parser .add_argument ('--rope-theta' ,
405
+ default = None ,
406
+ type = float ,
407
+ help = 'RoPE theta. Use with `rope_scaling`. In '
408
+ 'some cases, changing the RoPE theta improves the '
409
+ 'performance of the scaled model.' )
403
410
parser .add_argument ('--enforce-eager' ,
404
411
action = 'store_true' ,
405
412
help = 'Always use eager-mode PyTorch. If False, '
@@ -630,6 +637,7 @@ def create_engine_config(self, ) -> EngineConfig:
630
637
revision = self .revision ,
631
638
code_revision = self .code_revision ,
632
639
rope_scaling = self .rope_scaling ,
640
+ rope_theta = self .rope_theta ,
633
641
tokenizer_revision = self .tokenizer_revision ,
634
642
max_model_len = self .max_model_len ,
635
643
quantization = self .quantization ,
0 commit comments