Skip to main content

MMM - Pytorch

Project description

Multi-Modality

Multi Modal Mamba - [MMM]

A novel implementation of fusing ViT with Mamba into a fast, agile, and high performance Multi-Modal Model. Powered by Zeta, the simplest AI framework ever.

Install

``

Usage

# Import the necessary libraries
import torch 
from torch import nn
from mm_mamba import MultiModalMamba

# Create some random input tensors
x = torch.randn(1, 16, 64)  # Tensor with shape (batch_size, sequence_length, feature_dim)
y = torch.randn(1, 3, 64, 64)  # Tensor with shape (batch_size, num_channels, image_height, image_width)

# Create an instance of the MultiModalMamba model
model = MultiModalMamba(
    dim = 64,  # Dimension of the token embeddings
    depth = 5,  # Number of transformer layers
    dropout = 0.1,  # Dropout probability
    heads = 4,  # Number of attention heads
    d_state = 16,  # Dimension of the state embeddings
    image_size = 64,  # Size of the input image
    patch_size = 16,  # Size of each image patch
    encoder_dim = 64,  # Dimension of the encoder token embeddings
    encoder_depth = 5,  # Number of encoder transformer layers
    encoder_heads = 4  # Number of encoder attention heads
)

# Pass the input tensors through the model
out = model(x, y)

# Print the shape of the output tensor
print(out.shape)

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

mmm_zeta-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

mmm_zeta-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file mmm_zeta-0.0.2.tar.gz.

File metadata

  • Download URL: mmm_zeta-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 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 mmm_zeta-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7f07ac83e2eefe95010a8d5a69beae42de71f91d4e52435565235f6aaf977d6e
MD5 7521e0c6c99bf8e71b383b380104204c
BLAKE2b-256 cb45d4f4ff283f57ad2facfddb426476877e0a58bdc6d4331e60aa1c716c0ad4

See more details on using hashes here.

File details

Details for the file mmm_zeta-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mmm_zeta-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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 mmm_zeta-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f22ce1bbc652395aa414e608f58309257582ea26ab2c36efd408b0f67c7368
MD5 5325fb85073ad2aba84a56c0dccaa320
BLAKE2b-256 6f5f317dac3045cbab3e260a65a5029fbb09197dd9eba7ecdc001f9fe26ace26

See more details on using hashes here.

Supported by

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