mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-04 05:10:06 +06:00
convert float for yarn related arguments in rope_scaling (#37139)
* convert float for yarn related arguments in rope_scaling * sort keys alphabetically --------- Co-authored-by: ryan.agile <ryan.agile@kakaobrain.com>
This commit is contained in:
parent
2515a5a290
commit
0fc683d1cd
@ -233,6 +233,12 @@ class DeepseekV3Config(PretrainedConfig):
|
|||||||
# BC: if there is a 'type' field, copy it it to 'rope_type'.
|
# BC: if there is a 'type' field, copy it it to 'rope_type'.
|
||||||
if self.rope_scaling is not None and "type" in self.rope_scaling:
|
if self.rope_scaling is not None and "type" in self.rope_scaling:
|
||||||
self.rope_scaling["rope_type"] = self.rope_scaling["type"]
|
self.rope_scaling["rope_type"] = self.rope_scaling["type"]
|
||||||
|
|
||||||
|
if self.rope_scaling is not None:
|
||||||
|
for key in ["beta_fast", "beta_slow", "factor"]:
|
||||||
|
if key in self.rope_scaling:
|
||||||
|
self.rope_scaling[key] = float(self.rope_scaling[key])
|
||||||
|
|
||||||
rope_config_validation(self)
|
rope_config_validation(self)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
Loading…
Reference in New Issue
Block a user