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
- @dillfrescott for submitting a stability fix
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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(7.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poly_attention-0.1.0.tar.gz.
File metadata
- Download URL: poly_attention-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
270d2872f4cd9e36d2015a966a46048a4a97586b1d5e5d6ffd3ee33f3eb7a07d
|
|
| MD5 |
4946ce0ac141f5e37eba1b45e817ab9d
|
|
| BLAKE2b-256 |
5109a672465bec72d6b3771cdd84f72b69a406ecefa3bc80e65e677c51f4b25c
|
File details
Details for the file poly_attention-0.1.0-py3-none-any.whl.
File metadata
- Download URL: poly_attention-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac7945eb9bc0dc6b5b4824442572b247cbca28615f3a4a1184a108140c61f1d3
|
|
| MD5 |
8543ffd13a0f10661cadb89650f445f0
|
|
| BLAKE2b-256 |
48a70943dcd09aff07fc29f8605a2c6a08d51c4d5ec44cd2619df8459ee83fbf
|