Skip to content

Commit

Permalink
Update SpecTree.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dreaming-panda authored Mar 22, 2024
1 parent 61bd16e commit 12844ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tree/SpecTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def accept_step(self, parent_id :int):
q = softmax(draft_logits / self.temperature, dim=-1)
r = self.r[pos + (self.ground_truth_len - 1)]

if p[token] > r * q[token]:
if p[token] >= r * q[token]:
return (pos + (self.ground_truth_len - 1), None)
else:
p = self.residual_graph(p, q)
Expand Down Expand Up @@ -486,4 +486,4 @@ def verbose(self):





0 comments on commit 12844ff

Please sign in to comment.