File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
native_sparse_attention_pytorch Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -214,12 +214,15 @@ def sample(
214
214
215
215
cache = None
216
216
217
- for _ in tqdm (range (sample_num_times )):
217
+ for ind in tqdm (range (sample_num_times )):
218
+ is_first = ind == 0
218
219
219
220
logits , next_cache = self .forward (
220
221
out ,
221
222
cache = cache ,
222
- return_cache = True
223
+ return_cache = True ,
224
+ disable_flex = not is_first ,
225
+ disable_triton_kernel = not is_first
223
226
)
224
227
225
228
if use_cache_kv :
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " native-sparse-attention-pytorch"
3
- version = " 0.0.61 "
3
+ version = " 0.0.62 "
4
4
description = " Native Sparse Attention"
5
5
authors = [
6
6
{ name = " Phil Wang" , email = " lucidrains@gmail.com" }
You can’t perform that action at this time.
0 commit comments