Skip to content

Commit 4b357af

Browse files
committed
fixes for triton pathway
1 parent 1145e37 commit 4b357af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

native_sparse_attention_pytorch/native_sparse_attention.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def forward(
533533
assert inp.shape[1] == 1, 'input must be single tokens if inferencing with cache key values'
534534
return self.forward_inference(inp, cache, return_cache = return_cache)
535535

536-
assert not (self.causal and return_cache)
536+
assert not (not self.causal and return_cache)
537537

538538
batch, seq_len, scale, heads, device = *inp.shape[:2], self.scale, self.heads, inp.device
539539

@@ -683,7 +683,7 @@ def forward(
683683
selected_block_indices,
684684
fmask,
685685
sel_scale = gates,
686-
include_block_diagonal = self.causal
686+
include_block_causal = self.causal
687687
)
688688

689689
elif exists(fine_selection_flex_mask):

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.0.76"
3+
version = "0.0.77"
44
description = "Native Sparse Attention"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

0 commit comments

Comments
 (0)