Skip to content

Commit e0a7c80

Browse files
committed
update missing rotery export
1 parent dd68d28 commit e0a7c80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fast_llm/models/gpt/conversion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def export_params(self, fast_llm_values: tuple[typing.Any, ...]) -> tuple[typing
402402
elif type(rotary_config) is YarnRotaryConfig:
403403
rotary_scaling = {
404404
"rope_type": "yarn",
405+
"factor": rotary_config.scale_factor,
405406
"attention_factor": rotary_config.attention_factor,
406407
"beta_fast": rotary_config.beta_fast,
407408
"beta_slow": rotary_config.beta_slow,
@@ -433,6 +434,7 @@ def import_params(self, export_values: tuple[typing.Any, ...]) -> tuple[typing.A
433434
elif rotary_type == "yarn":
434435
rotary_config.update(
435436
{
437+
"scale_factor": rope_scaling.get("factor", DEFAULT),
436438
"attention_factor": rope_scaling.get("attention_factor", DEFAULT),
437439
"beta_fast": rope_scaling.get("beta_fast", DEFAULT),
438440
"beta_slow": rope_scaling.get("beta_slow", DEFAULT),

0 commit comments

Comments
 (0)