@@ -53,6 +53,7 @@ class EngineArgs:
5353 revision : Optional [str ] = None
5454 code_revision : Optional [str ] = None
5555 rope_scaling : Optional [dict ] = None
56+ rope_theta : Optional [float ] = None
5657 tokenizer_revision : Optional [str ] = None
5758 quantization : Optional [str ] = None
5859 enforce_eager : bool = False
@@ -400,6 +401,12 @@ def add_cli_args(
400401 type = json .loads ,
401402 help = 'RoPE scaling configuration in JSON format. '
402403 '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.' )
403410 parser .add_argument ('--enforce-eager' ,
404411 action = 'store_true' ,
405412 help = 'Always use eager-mode PyTorch. If False, '
@@ -630,6 +637,7 @@ def create_engine_config(self, ) -> EngineConfig:
630637 revision = self .revision ,
631638 code_revision = self .code_revision ,
632639 rope_scaling = self .rope_scaling ,
640+ rope_theta = self .rope_theta ,
633641 tokenizer_revision = self .tokenizer_revision ,
634642 max_model_len = self .max_model_len ,
635643 quantization = self .quantization ,
0 commit comments