-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for model instantiation sparse
- Loading branch information
Samuel Weinbach
committed
May 2, 2021
1 parent
df57cf7
commit 5683f7a
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Add this to your config for sparse attention every other layer | ||
{ | ||
"attention_config": [[["local"], "all"]], | ||
|
||
# sparsity config: | ||
# (these are the defaults for local sliding window sparsity, training will work without this here, but it's left in for | ||
# illustrative purposes) | ||
# see https://www.deepspeed.ai/tutorials/sparse-attention/#how-to-config-sparsity-structures for | ||
# more detailed config instructions and available parameters | ||
|
||
"sparsity_config": { | ||
"block": 16, # block size | ||
"num_local_blocks": 32, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters