From 9960917b6a03ae8c0136bfe9019e972d5d82573a Mon Sep 17 00:00:00 2001 From: 51616 Date: Tue, 24 Dec 2024 13:33:42 +0000 Subject: [PATCH] misc --- hyperlora/intx_sft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperlora/intx_sft.py b/hyperlora/intx_sft.py index fbf3312..a91e751 100644 --- a/hyperlora/intx_sft.py +++ b/hyperlora/intx_sft.py @@ -79,7 +79,7 @@ def compute_prefix_matching(shift_logits, shift_labels, valid_masks): def compute_entropy(shift_logits, shift_labels, valid_masks): indices = torch.where(valid_masks) logits = shift_logits[indices] - probs = torch.softmax(torch.tensor(logits), dim=-1) + probs = torch.softmax(logits, dim=-1) entropy = -torch.sum(probs * torch.log(probs), dim=-1) return {"entropy": entropy.mean().item()}