From 1ca0e04004f4218d72fc189520aabe30c446f88e Mon Sep 17 00:00:00 2001 From: Luciferian Ink Date: Sat, 18 Jan 2025 02:02:56 -0600 Subject: [PATCH] fix grad flow --- bytelatent/data/patcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytelatent/data/patcher.py b/bytelatent/data/patcher.py index b495d9b..7e0396a 100644 --- a/bytelatent/data/patcher.py +++ b/bytelatent/data/patcher.py @@ -540,7 +540,7 @@ class Patcher: if self.log_time: s = time.time() if entropies is not None: - scores = entropies.clone().detach().to(dtype=torch.float32) + scores = entropies.to(dtype=torch.float32) elif preds is not None: scores = entropy(preds) else: