-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sub-quadratic attention #1
base: main
Are you sure you want to change the base?
Commits on Dec 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c810c32 - Browse repository at this point
Copy the full SHA c810c32View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9b3b9f - Browse repository at this point
Copy the full SHA c9b3b9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 70dc50d - Browse repository at this point
Copy the full SHA 70dc50dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c794f0b - Browse repository at this point
Copy the full SHA c794f0bView commit details -
eliminate all einsums. assume 3D tensor [batch * num_heads, tokens, c…
…hannels_per_head] in order to make use of batched matmuls. fuse multiply into matmul. breaks bias, mask in exchange for massive speedup.
Configuration menu - View commit details
-
Copy full SHA for 04a5cbe - Browse repository at this point
Copy the full SHA 04a5cbeView commit details -
remove the bits that I broke in the pursuit of speed (mask, bias, wei…
…ghts_calc_fn, calc_fn_data) and unused vars
Configuration menu - View commit details
-
Copy full SHA for b44fa12 - Browse repository at this point
Copy the full SHA b44fa12View commit details -
clarify comment; verified that upcast_attention is indeed still helpf…
…ul for SD 2.1. but remove value float32, having established that it works without.
Configuration menu - View commit details
-
Copy full SHA for 8694703 - Browse repository at this point
Copy the full SHA 8694703View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bfe96d - Browse repository at this point
Copy the full SHA 5bfe96dView commit details -
Configuration menu - View commit details
-
Copy full SHA for da8901b - Browse repository at this point
Copy the full SHA da8901bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c4d82f - Browse repository at this point
Copy the full SHA 0c4d82fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5e8e31 - Browse repository at this point
Copy the full SHA c5e8e31View commit details -
Configuration menu - View commit details
-
Copy full SHA for b16edc9 - Browse repository at this point
Copy the full SHA b16edc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7fc3a8 - Browse repository at this point
Copy the full SHA b7fc3a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f003c2 - Browse repository at this point
Copy the full SHA 8f003c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1334670 - Browse repository at this point
Copy the full SHA 1334670View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0676c13 - Browse repository at this point
Copy the full SHA 0676c13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 264dfb7 - Browse repository at this point
Copy the full SHA 264dfb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 205f55b - Browse repository at this point
Copy the full SHA 205f55bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1880c0e - Browse repository at this point
Copy the full SHA 1880c0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8603c30 - Browse repository at this point
Copy the full SHA 8603c30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96e0d8c - Browse repository at this point
Copy the full SHA 96e0d8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63ca66d - Browse repository at this point
Copy the full SHA 63ca66dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4c0bf4 - Browse repository at this point
Copy the full SHA f4c0bf4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 624123f - Browse repository at this point
Copy the full SHA 624123fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b92dab - Browse repository at this point
Copy the full SHA 5b92dabView commit details -
add chunk_threshold_bytes to let you specify your safe memory limit, …
…to prefer fast-path whenever unchunked attention would fit into memory. add kv_chunk_size_min to control the kv_chunk_size=None behaviour, so that sqrt(key_tokens) does not pick too small of a chunk size
Configuration menu - View commit details
-
Copy full SHA for 60f0a5e - Browse repository at this point
Copy the full SHA 60f0a5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 48db711 - Browse repository at this point
Copy the full SHA 48db711View commit details -
default kv_chunk_size was meant to be sqrt() of global key size, not …
…of chunk key size. improve separation of concerns.
Configuration menu - View commit details
-
Copy full SHA for ef20fb9 - Browse repository at this point
Copy the full SHA ef20fb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69a8d2e - Browse repository at this point
Copy the full SHA 69a8d2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for db25934 - Browse repository at this point
Copy the full SHA db25934View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aa8bac - Browse repository at this point
Copy the full SHA 7aa8bacView commit details -
move kv_chunk_size_min concern to callsite, since if caller knows fin…
…al kv_chunk_size: they can notice when no chunking would happen at all, and use fast-path. note: there's a question of whether that concern belongs *inside* the algorithm. but it'd feel weird for chunked attention to have a no-chunking-at-all branch.
Configuration menu - View commit details
-
Copy full SHA for 59002c3 - Browse repository at this point
Copy the full SHA 59002c3View commit details -
Revert "move kv_chunk_size_min concern to callsite (1c4f107)" because…
… equivalent fast-path for 1 query chunk, 1 kv chunk is already supported inside
Configuration menu - View commit details
-
Copy full SHA for a3152d8 - Browse repository at this point
Copy the full SHA a3152d8View commit details -
de-duplicate fast-path for "matmul < quota". we can just ask for ever…
…ything in one chunk, to re-use an existing fast-path.
Configuration menu - View commit details
-
Copy full SHA for 0eafb95 - Browse repository at this point
Copy the full SHA 0eafb95View commit details -
pre-transpose key, rather than transposing it then undoing the transp…
…ose during the matmul
Configuration menu - View commit details
-
Copy full SHA for 9dc6822 - Browse repository at this point
Copy the full SHA 9dc6822View commit details