소스 검색

better variable naming

50h100a 1 년 전
부모
커밋
25acebe33d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      aphrodite/modeling/layers/sampler.py

+ 2 - 2
aphrodite/modeling/layers/sampler.py

@@ -258,8 +258,8 @@ def _apply_alphabet_soup(
     logits_sort[mask] = -float("inf")
     logits_sort[mask] = -float("inf")
 
 
     # Apply top-k.
     # Apply top-k.
-    for i,k in enumerate(k):
-        logits_sort[i, k:] = -float("inf")
+    for i,topk in enumerate(k):
+        logits_sort[i, topk:] = -float("inf")
 
 
     # Re-sort the probabilities.
     # Re-sort the probabilities.
     src = torch.arange(logits_idx.shape[-1],
     src = torch.arange(logits_idx.shape[-1],