Skip to main content

MMCA - Pytorch

Project description

Multi-Modality

Multi-Modal Causal Attention

The open source community's implementation of the all-new Multi-Modal Causal Attention from "DeepSpeed-VisualChat: Multi-Round Multi-Image Interleave Chat via Multi-Modal Causal Attention"

Paper Link

Appreciation

  • Lucidrains
  • Agorians

Install

pip install mmca

Usage

import torch 
from mmca.main import MultiModalCausalAttention


attn = MultiModalCausalAttention(dim=512, heads=8)

x = torch.randn(1, 10, 512)
y = torch.randn(1, 20, 512)

#create a mask for the text
# mask = torch.ones(1, 20).bool()

x, y = attn(x, y)

print(x)
# print(y)

Architecture

Todo

License

MIT

Citations

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

mmca-0.0.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

mmca-0.0.2-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

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