Skip to main content

PolyAttention

Project description

Poly Attention (wip)

Implementation of Poly-Attention, a general scheme for higher-order self-attention

Install

$ pip install poly-attention

Usage

import torch
from poly_attention import PolyAttention

attn = PolyAttention(
    dim = 512,
    heads = 8,
    dim_head = 64,
    causal = False
)

tokens = torch.randn(1, 1024, 512)

out = attn(tokens) # (1, 1024, 512)

Appreciation

Citations

@inproceedings{chakrabarti2026poly,
    title   = {Poly-attention: a general scheme for higher-order self-attention},
    author  = {Chakrabarti, Sayak and Pitassi, Toniann and Alman, Josh},
    booktitle = {International Conference on Learning Representations (ICLR)},
    year    = {2026}
}
@misc{kayyam2026transformersneedprojectionssystematic,
    title   = {Do Transformers Need Three Projections? Systematic Study of QKV Variants},
    author  = {Ali Kayyam and Anusha Madan Gopal and M Anthony Lewis},
    year    = {2026},
    eprint  = {2606.04032},
    archivePrefix = {arXiv},
    primaryClass = {cs.LG},
    url     = {https://arxiv.org/abs/2606.04032},
}

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

poly_attention-0.0.7.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

poly_attention-0.0.7-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file poly_attention-0.0.7.tar.gz.

File metadata

  • Download URL: poly_attention-0.0.7.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for poly_attention-0.0.7.tar.gz
Algorithm Hash digest
SHA256 49f1ed288f9d6552f68370041165f654b462f7bf8d8671c6503e1c1422e734dc
MD5 051755c95766fe52f0951afbe279451a
BLAKE2b-256 af8b40f14ab81da4e44df5493c669284fc6ccf40383ad4dff4fa236df344830b

See more details on using hashes here.

File details

Details for the file poly_attention-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for poly_attention-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 510bb35314a506cd4679f766f591af05d980d55b66e2f9ffa6ef41d1d29b2242
MD5 26d9d1bf6a4b9b89c8641822683478bc
BLAKE2b-256 b663dea0081ad22f5f715d34db639f4cfcef4ebea2bcec284e626f857ac35e2d

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