Skip to main content

Paper - Pytorch

Project description

Multi-Modality

MoE Mamba

Implementation of MoE Mamba from the paper: "MoE-Mamba: Efficient Selective State Space Models with Mixture of Experts" in Pytorch and Zeta.

PAPER LINK

Install

pip install moe-mamba

Usage

MoEMambaBlock

import torch 
from moe_mamba import MoEMambaBlock

x = torch.randn(1, 10, 512)
model = MoEMambaBlock(
    dim=512,
    depth=6,
    d_state=128,
    expand=4,
    num_experts=4,
)
out = model(x)
print(out)

Code Quality 🧹

  • make style to format the code
  • make check_code_quality to check code quality (PEP8 basically)
  • black .
  • ruff . --fix

Citation

@misc{pióro2024moemamba,
    title={MoE-Mamba: Efficient Selective State Space Models with Mixture of Experts}, 
    author={Maciej Pióro and Kamil Ciebiera and Krystian Król and Jan Ludziejewski and Sebastian Jaszczur},
    year={2024},
    eprint={2401.04081},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moe_mamba-0.0.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moe_mamba-0.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file moe_mamba-0.0.3.tar.gz.

File metadata

  • Download URL: moe_mamba-0.0.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for moe_mamba-0.0.3.tar.gz
Algorithm Hash digest
SHA256 abf077f44d29ef046973d47d5559525d8ddff5962a79b0590ffcb80d7438fc36
MD5 17110afd0e72c72d732894d033f474be
BLAKE2b-256 c46224bd10853d3843c06556a28116bd4db38f01089dcc9c4db7bd5b1152cbd9

See more details on using hashes here.

File details

Details for the file moe_mamba-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: moe_mamba-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for moe_mamba-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 937d8d3cf2c65058f74761228b5879a4eb7c985b15e47a572a4048ddbbc7e913
MD5 c347b19ec36cfe08a7aae63caac28804
BLAKE2b-256 550fc5c5ba01552ebfb72618a7d612f69602a51de4333b2f9b3b76927f61383d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page