File tree Expand file tree Collapse file tree
examples/speculative_decoding Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,9 +179,7 @@ def create_optimizer(self):
179179 super ().create_optimizer ()
180180 if self .lora_lr_multiplier != 1.0 :
181181 lora_ids = {
182- id (p )
183- for n , p in self .model .named_parameters ()
184- if "lora_" in n and p .requires_grad
182+ id (p ) for n , p in self .model .named_parameters () if "lora_" in n and p .requires_grad
185183 }
186184 if lora_ids :
187185 new_groups = []
@@ -194,9 +192,7 @@ def create_optimizer(self):
194192 {** group , "params" : lora , "lr" : group ["lr" ] * self .lora_lr_multiplier }
195193 )
196194 elif lora :
197- new_groups .append (
198- {** group , "lr" : group ["lr" ] * self .lora_lr_multiplier }
199- )
195+ new_groups .append ({** group , "lr" : group ["lr" ] * self .lora_lr_multiplier })
200196 else :
201197 new_groups .append (group )
202198 self .optimizer .param_groups = new_groups
You can’t perform that action at this time.
0 commit comments