Skip to main content

Gated Slot Attention - Pytorch

Project description

Gated Slot Attention

Join our Discord Subscribe on YouTube Connect on LinkedIn Follow on X.com

Usage

import torch
from gated_slot_attention.model import GSATransformer

model = GSATransformer(
    dim=512,
    heads=8,
    m=64,
    tau=0.1,
    depth=1,
    vocab_size=10000,
    max_seq_len=1024,
)

x = torch.randint(0, 10000, (1, 1024))
out = model(x)
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

gated_slot_attention-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

gated_slot_attention-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file gated_slot_attention-0.0.1.tar.gz.

File metadata

  • Download URL: gated_slot_attention-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.3.0

File hashes

Hashes for gated_slot_attention-0.0.1.tar.gz
Algorithm Hash digest
SHA256 be2758fd001a81b1ff1f3ababc62e09231d826fea387d43bbd3a7eecc9f206b6
MD5 99688abe7d5abd92d8962ab075e9675f
BLAKE2b-256 6d2204728f8c974bf56e6c56dc7cf58368a6a7613f2e25e3d2605e1b57ca816e

See more details on using hashes here.

File details

Details for the file gated_slot_attention-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gated_slot_attention-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5afce2322c21ceba30ccf73ee08c144fb7e3336f475881f098378a3bd37324c8
MD5 c190723dc8021a233feeea9378e04f9a
BLAKE2b-256 b8c257db15f9525977620c41875673aeb7a302638f5b3844ac39185f39023e30

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