Repository navigation
Polynomial kernel attention of odd degree #868
sunnysfwong
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi. I recently trying to replace exponential with polynomial in softmax attention and achieve validation performance (
val_bpb) on par with, or slightly better than, softmax attention across model scales (d=6,8,10,12,14). The formulation looks like the following:Experiments were conducted on an A100 GPU (Colab Runtime Version 2026.07) with a vocabulary size of
32768. Below is the final validation bits-per-byte (val_bpb, lower is better) across depths:d)val_bpb)val_bpb)*Results for depths 10, 12, and 14 were obtained using an earlier revision of the kernel and a different runtime version.
The code can be found in https://github.com/sunnysfwong/nanochat_poly/tree/poly_attn
I current don't have enough compute units in Colab so I will rerun depth=10,12,14 later.
I hope you find this attention mechanism interesting.
All reactions