Skip to content

Commit 61429d0

Browse files
Update train_gpt.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ebc0392 commit 61429d0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

train_gpt.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,6 @@ def dequantize_state_dict_int8(obj: dict[str, object]) -> dict[str, Tensor]:
470470
return out
471471

472472

473-
def dequantize_state_dict_ternary(obj: dict[str, object]) -> dict[str, Tensor]:
474-
out: dict[str, Tensor] = {}
475-
for name, q in obj.get("ternary", {}).items():
476-
s = float(obj["scales"][name].item()) if name in obj.get("scales", {}) else 1.0
477-
out[name] = (q.float() * s).to(dtype=torch.float32).contiguous()
478-
for name, t in obj.get("passthrough", {}).items():
479-
out[name] = t.detach().to("cpu").contiguous()
480-
return out
481-
482-
483473
# -----------------------------
484474
# DATA LOADING
485475
# -----------------------------

0 commit comments

Comments
 (0)