frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Tutorial: Algebraic Foundations Powering FlashAttention

https://riftstack.ai/research/learning-flashattention-the-hard-way-part-1
2•gkapur•1h ago

Comments

gkapur•1h ago
I'm writing a short series of tutorials on FlashAttention: from theory to efficient CUDA kernels.

Part 1 is the theoretical foundation. It walks through a modern algebraic formalism showing that FlashAttention is an associative operation, which lets you treat it as a regular reduction on the GPU and apply all the same scheduling optimizations. Some recent MLSys and CVPR (ELSA) papers lean on this framing, and I find it much more powerful than the original.

This framework is particularly useful in ML compilers, where you should implement general optimizations applicable to many operations rather than writing specialized kernels. This article shows that attention actually belongs to a large family of "secretly-associative" operations, walks through a handful of examples, and links a few concepts from abstract algebra that let you identify whether an operation is secretly associative.

Overview:

- Safe softmax, Welford's variance, and FlashAttention are the same secretly-associative operation

- The twisted monoid (transport of structure), why the max-rescale coupling doesn't break associativity

- The qk_scale = log2(e)/√D like in FA-2 derived from scratch

- Numerical analysis: overflow bounds, error limits, and why tiling never amplifies error

- Bird's 3rd Homomorphism Theorem as a test for whether any loop is secretly associativ

Sorry, your account isn't able t

1•TheNorthKairo•30s ago•0 comments

Florida student's historic 11.99 GPA triggers district policy overhaul

https://nypost.com/2026/07/14/us-news/florida-students-historic-11-99-gpa-triggers-district-polic...
1•nradov•46s ago•0 comments

The American E.V. Has Been Crushed. Will It Take the U.S. Auto Industry with It?

https://www.nytimes.com/2026/07/15/magazine/electric-cars-american-evs.html
1•ilamont•4m ago•0 comments

Federal Court Suspends Trump Immigration Policy Targeting Technology Researchers

https://knightcolumbia.org/content/federal-court-suspends-trump-immigration-policy-targeting-tech...
2•hn_acker•4m ago•0 comments

Show HN: Specsanity.dev – an OAS linter that works

https://specsanity.dev
1•buildwithdennis•5m ago•0 comments

Code-Manager

https://github.com/maguowei/code-manager
1•maguowei•7m ago•0 comments

Show HN: XViral – Post virality predictor based on X's For You Ranking pipeline

https://github.com/ninjahawk/XViral
1•ninjahawk1•8m ago•0 comments

Coffee May Protect the Liver in More Ways Than Scientists Realized

https://scitechdaily.com/coffee-may-protect-the-liver-in-more-ways-than-scientists-realized/
2•mritzmann•9m ago•0 comments

The Clockwork Moss Tee: Cutting Through Greenwashing with GOTS-Verified Truth

https://ddsboston.com/blogs/news/the-clockwork-moss-tee-cutting-through-greenwashing-with-gots-ve...
1•robert_dds•9m ago•0 comments

Locality Social Cloud

https://localitysocial.cloud/
2•MrMalte•9m ago•0 comments

GeoSQL: Showing AI a map increased its accuracy by 4× (Korean)

https://ideas.paasup.io/geosql/
1•delfrrr•10m ago•0 comments

Linux creator Linus Torvalds puts foot down on anti-AI comments

https://www.gamingonlinux.com/2026/07/linux-creator-linus-torvalds-puts-foot-down-on-anti-ai-comm...
4•ndr42•11m ago•0 comments

Show HN: DripLit – Your Inbox is for books, too

https://www.dripl.it/
2•mankins•12m ago•1 comments

Most Americans now say the public should own half of the big AI companies

https://thenextweb.com/news/most-americans-now-say-the-public-should-own-half-of-the-big-ai-compa...
1•robtherobber•12m ago•0 comments

Phoenix LiveView 1.2 Released

https://www.phoenixframework.org/blog/phoenix-liveview-1-2-released
2•andrewstetsenko•12m ago•0 comments

Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents

https://arxiv.org/abs/2607.12624
1•zhinit•13m ago•0 comments

People don't buy calm: revisiting Weiser's "The Computer for the 21st Century"

https://adaptivesoftware.substack.com/p/the-computer-for-the-21st-century
2•beerdappel•13m ago•1 comments

What I've updated in Anchor.nvim after a month of developmen

https://github.com/zachyarbrough/anchor.nvim
1•zachyarbro•14m ago•1 comments

Wall Street Titans Posted Huge Trading Numbers. Be Worried

https://www.bloomberg.com/opinion/articles/2026-07-14/goldman-s-stock-trading-numbers-are-so-wild...
1•petethomas•14m ago•0 comments

RFC: Maven Central and Care

https://www.sonatype.com/blog/request-for-comments-care-and-maven-central
1•ke4qqq•15m ago•0 comments

lobste.rs is now running on SQLite

https://simonwillison.net/2026/Jul/14/lobsters-sqlite/
4•Brajeshwar•16m ago•1 comments

Do we still need build tools?

https://olliewilliams.xyz/blog/no-build/
2•ksec•16m ago•0 comments

Fitbit Is Down

https://status.healthapp.google.com/
1•dweekly•18m ago•0 comments

The OpenAI Mystery Device Will Reportedly Be Basically Just a Smart Speaker

https://gizmodo.com/the-openai-mystery-device-will-reportedly-be-basically-just-a-smart-speaker-2...
1•HiroProtagonist•18m ago•1 comments

The discourse on software craftsmanship conveniently ignores last-mile delivery

https://kerkour.com/software-craftsmanship-last-mile-delivery
4•cold_pizz4•19m ago•0 comments

Practice Negotiations with an AI Phone Agent Real-Time Roleplay with Telnyx

https://lowlatencyclub.ai/blog/posts/ai-negotiation-practice-phone-python
2•harpreetseehra•19m ago•0 comments

I'd Rule the World

1•spottedmarley•20m ago•0 comments

Remember When It Matters: Proactive Memory Agent for Long-Horizon Agents

https://arxiv.org/abs/2607.08716
1•gmays•20m ago•0 comments

Police break up €100M-a-month investment fraud ring

https://www.dutchnews.nl/2026/07/police-break-up-e100m-a-month-investment-fraud-ring/
1•jacquesm•23m ago•0 comments

Show HN: I made Rung, a daily clue word game where you guess as soon as you dare

https://dailyrung.com/
1•amaanster•23m ago•0 comments