Skip to content

Commit

Permalink
Remove entmax dep
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbjb committed May 3, 2022
1 parent 14617f8 commit 29b2f36
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ inflect
progressbar
einops
unidecode
entmax
scipy
librosa
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'progressbar',
'einops',
'unidecode',
'entmax',
'scipy',
'librosa',
'transformers',
Expand Down
3 changes: 1 addition & 2 deletions tortoise/models/xtransformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from einops import rearrange, repeat, reduce
from einops.layers.torch import Rearrange

from entmax import entmax15
from torch.utils.checkpoint import checkpoint

DEFAULT_DIM_HEAD = 64
Expand Down Expand Up @@ -556,7 +555,7 @@ def __init__(
self.sparse_topk = sparse_topk

# entmax
self.attn_fn = entmax15 if use_entmax15 else F.softmax
self.attn_fn = F.softmax

# add memory key / values
self.num_mem_kv = num_mem_kv
Expand Down

0 comments on commit 29b2f36

Please sign in to comment.