Skip to content

Commit

Permalink
Optimizer backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdouglas committed Dec 17, 2024
1 parent 032beb9 commit 5f74ce9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bitsandbytes/optim/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ def get_config(self, gindex, pindex, group):
config["eps"] = group["eps"]
config["weight_decay"] = group["weight_decay"]
config["lr"] = group["lr"]
config["alpha"] = group.get("alpha")
config["t_alpha"] = group.get("t_alpha")
config["t_beta3"] = group.get("t_beta3")
config["alpha"] = group.get("alpha", 0.0)
config["t_alpha"] = group.get("t_alpha", 0)
config["t_beta3"] = group.get("t_beta3", 0)
config["optim_bits"] = self.args.optim_bits
config["min_8bit_size"] = self.args.min_8bit_size
config["percentile_clipping"] = self.args.percentile_clipping
Expand Down Expand Up @@ -530,7 +530,7 @@ def update_step(self, group, p, gindex, pindex):
state["state2"],
config["betas"][1],
config["betas"][2] if len(config["betas"]) >= 3 else 0.0,
config["alpha"],
config.get("alpha", 0.0),
config["weight_decay"],
gnorm_scale,
state["unorm_vec"] if config["max_unorm"] > 0.0 else None,
Expand Down Expand Up @@ -575,7 +575,7 @@ def update_step(self, group, p, gindex, pindex):
config["betas"][0],
config["betas"][1],
config["betas"][2] if len(config["betas"]) >= 3 else 0.0,
config["alpha"],
config.get("alpha", 0.0),
config["eps"],
step,
config["lr"],
Expand Down

0 comments on commit 5f74ce9

Please sign in to comment.