Skip to content
View as Markdown

tinker_cookbook.hyperparam_utils.get_lora_lr_multiplier

Generated from tinker-cookbook at commit 8bf7dd6. Source links point at that snapshot.

tinker_cookbook.hyperparam_utils.get_lora_lr_multiplier(model_name)

Return the model's AdamW LoRA LR multiplier, relative to the reference model.

Given two models A and B, and a learning rate LR_A that's known to be good for A, a good learning rate for B is LR_B = LR_A * get_lora_lr_multiplier(B) / get_lora_lr_multiplier(A); transfer_lr computes this.

Parameters:

  • model_name (str) – Tinker model id; :peft:<context> suffixes share the base model's entry.

Returns: float – Multiplier; the reference model has 1.0.

Raises:

  • ConfigurationError: If the model has no calibrated LR, or is a non-LoRA variant
  • (such as :full:...).