Skip to content

Commit 1b3dd06

Browse files
committed
quick fix for tests
1 parent 39678de commit 1b3dd06

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

native_sparse_attention_pytorch/native_sparse_attention.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ def forward(
676676
fv = v
677677

678678
num_selected = min(num_selected, importance_scores.shape[-1] - 1)
679-
679+
has_selected_kv_for_fine_attn = num_selected > 0
680+
680681
if has_selected_kv_for_fine_attn:
681682

682683
# get the top-n kv segments for fine attention

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "native-sparse-attention-pytorch"
3-
version = "0.1.11"
3+
version = "0.1.12"
44
description = "Native Sparse Attention"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

0 commit comments

Comments
 (0)