Skip to main content

mmca-mgqa - Pytorch

Project description

Multi-Modality

Multi-Modal Casual Multi-Grouped Query Attention

Experiments around using Multi-Modal Casual Attention with Multi-Grouped Query Attention

Appreciation

  • Lucidrains
  • Agorians

Install

pip install mmmgqa

Usage

import torch 
from mmca_mgqa.attention import SimpleMMCA

# Define the dimensions
dim = 512
head = 8
seq_len = 10
batch_size = 32

#attn
attn = SimpleMMCA(dim=dim, heads=head)

#random tokens
v = torch.randn(batch_size, seq_len, dim)
t = torch.randn(batch_size, seq_len, dim)

#pass the tokens throught attn
tokens = attn(v, t)

print(tokens)

Architecture

Todo

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

mmmgqa-0.0.2.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

mmmgqa-0.0.2-py3-none-any.whl (3.0 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