generated from kyegomez/Python-Package-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kye
committed
Apr 4, 2024
1 parent
75e9345
commit f2a7946
Showing
5 changed files
with
65 additions
and
29 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
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,23 @@ | ||
import torch | ||
from mamba_former.main import MambaFormer | ||
|
||
# Forward pass example | ||
x = torch.randint(1, 1000, (1, 100)) # Token | ||
# Tokens are integrers | ||
|
||
# Model | ||
model = MambaFormer( | ||
dim = 512, | ||
num_tokens = 1000, | ||
depth = 6, | ||
d_state = 512, | ||
d_conv = 128, | ||
heads = 8, | ||
dim_head = 64, | ||
return_tokens = True | ||
) | ||
|
||
# Forward | ||
out = model(x) | ||
print(out) | ||
print(out.shape) |
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,5 @@ | ||
from mamba_former.main import MambaFormer | ||
|
||
__all__ = [ | ||
"MambaFormer" | ||
] |
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
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 |
---|---|---|
|
@@ -3,15 +3,15 @@ requires = ["poetry-core>=1.0.0"] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "paper" | ||
name = "mamba-former" | ||
version = "0.0.1" | ||
description = "Paper - Pytorch" | ||
license = "MIT" | ||
authors = ["Kye Gomez <[email protected]>"] | ||
homepage = "https://github.com/kyegomez/paper" | ||
documentation = "https://github.com/kyegomez/paper" # Add this if you have documentation. | ||
homepage = "https://github.com/kyegomez/MambaFormer" | ||
documentation = "https://github.com/kyegomez/MambaFormer" # Add this if you have documentation. | ||
readme = "README.md" # Assuming you have a README.md | ||
repository = "https://github.com/kyegomez/paper" | ||
repository = "https://github.com/kyegomez/MambaFormer" | ||
keywords = ["artificial intelligence", "deep learning", "optimizers", "Prompt Engineering"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
|
@@ -25,10 +25,8 @@ classifiers = [ | |
python = "^3.6" | ||
swarms = "*" | ||
zetascale = "*" | ||
|
||
[tool.poetry.dev-dependencies] | ||
# Add development dependencies here | ||
|
||
einops = "*" | ||
torch = "*" | ||
|
||
[tool.poetry.group.lint.dependencies] | ||
ruff = "^0.1.6" | ||
|