Skip to content

Commit b58c178

Browse files
authored
change get_lora_lr_over_full_finetune_lr to just return 10 (#81)
1 parent 5d08be6 commit b58c178

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tinker_cookbook/hyperparam_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ def _list_param_shapes_from_safetensors_remote(
6565

6666
def get_lora_lr_over_full_finetune_lr(model_name: str, lora_alpha: int = 32) -> float:
6767
"""
68-
Find the factor that you should scale the full fine-tuning learning rate by to get the equivalent LoRA learning rate.
68+
Return the factor that you should scale the full fine-tuning learning rate by to get the equivalent LoRA learning rate.
69+
Previously we had a more complicated formula, but the factor of 10 was more accurate empirically.
70+
See Lora Without Regret (https://thinkingmachines.ai/blog/lora/) for more details.
6971
"""
70-
71-
return _get_hidden_size(model_name) / (2 * lora_alpha)
72+
return 10.0
7273

7374

7475
def _get_hidden_size(model_name: str) -> int:

0 commit comments

Comments
 (0)