Skip to main content

atc-torch - Pytorch

Project description

Multi-Modality

Attention + Convolution transformer

This is an experimental architecture leveraging convolution blocks with attention blocks to model both the short and long range dynamics of the input tokens. The flow is the following: x -> convolution block -> attn -> FFN

Install

``

Usage

import torch
from attnconv.main import ATCTransformer

model = ATCTransformer(
    dim=512,
    depth=6,
    num_tokens=20000,
    dim_head=64,
    heads=8,
    ff_mult=4,
)

x = torch.randint(0, 20000, (1, 512))
logits = model(x)  # (1, 1024, 20000)
print(logits)

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

atc_torch-0.0.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

atc_torch-0.0.1-py3-none-any.whl (4.9 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