Live data from Hacker News

Attention Is Off By One

evanmiller.org

341–347 of 347 posts

Re: Attention Is Off By One

#341

Earlier quoted context omitted.

This is a technique that's been known for years and is in PyTorch. It's not widely used because people tried it and, in practice, it doesn't work as well. OP calling it a "bug that's been overlooked for 8+ years" is click bait.

> ...is in PyTorch Could anyone kindly point me to this as I can't find it.

The add_zero_attn parameter in PyTorch is used for this, but by default their softmax is the regular kind. It has been in flaxformer for a couple years now though, however it claims to be a compatibility variant for older models [2] and I haven't seen any mention of it in their recent papers (though I've not checked exhaustively).

[1]: https://pytorch.org/docs/stable/generated/torch.nn.Multihead... [2]: https://github.com/google/flaxformer/blob/main/flaxformer/co...

Re: Attention Is Off By One

#343

While not about AI or the algorithm mentioned, on the subject of little errors that you can't convince anyone are errors.... In 2011, I wanted to copy the reddit ranking algorithm in a project of my own, so I went to source code to look at it... the algorithm in the source code I found wasn't doing anything at all sensible with negative-sum voted posts. I thought I discovered the error, some terms swapped in the simp…

I work at a FAANG and it was absolutely astonishing to find out how often this happens. You can make a long, impactful career by just being "the guy who adds log statements throughout the codebase and reasons through it", doing this at even a simplistic level has always shown me an astonishing fix to some long-standing issue. n.b. It also attracts a ton of political fun. People's first order reaction is denial, and i…

I used to work on a large-ish open source project. When I was bored I used to go bug-picking (not hunting, picking). I'd go and browse the source wherever my intuition told me there was likely a bug and I indeed found a few using with such a "method".

Re: Attention Is Off By One

#344

Earlier quoted context omitted.

> (donna was woke before woke was a thing) Donna Haraway was born 6 years after “stay woke” in its sense as an admonition to maintain alertness to the racist context was coined. Leaving aside a debate over whether her work is a good match for “woke”, she very much cannot have been woke before woke was a thing. (Before its recent replacement of “politically correct” as the American Right’s preferred, meaning-stripped,…

> Leaving aside a debate over whether her work is a good match for “woke”, she very much cannot have been woke before woke was a thing A game of being pedantic is always welcome: She very well could have been "woke before woke was a thing", because "woke" as the parent means it in her case, refers to the modern usage (of like, 2 decades), not the original term of the 40s that might have preceeded her birth. So take t…

Thanks; that's exactly what I meant. I leave these things out because I assume not everybody is pedantically waiting to call me out on a slight variation on their personal belief system.

Re: Attention Is Off By One

#345
post #288
post #52

“the seemingly innocent exponentiator that no one thought capable of such kurtotic barbarities.” This writing brought a happy tear to my eye.

It's a funny turn of phrase and also either extremely sarcastic or extremely wrong. Everyone knows about exponentials blowing up. exp(40) or so blows up a float32.

He’s being cheeky

Re: Attention Is Off By One

#346
post #270

Earlier quoted context omitted.

> The Qualcomm AI researchers found that 97%+ of outlier activations in LLMs occur in whitespace and punctuation positions. This is striking. If true, why not try to ignore whitespace and puctuation? In old Latin, scripto continua [1] was a way to write continuously, for the exact same reason : to save space. Other modern languages still do that, and are no less parseable. Granted, it's unlikely a commercial LLM woul…

> This is striking. If true, why not try to ignore whitespace and puctuation? It is initially, but thinking about it some more, there's a lot of information packed in whitespace and punctuation choice. Scripto continua may have worked because the few readers who lived back then expected it to encode some form of legal or religious prose, but even then they could learn things from the overall shape of the document. LL…

...there's only 1 space there though

Re: Attention Is Off By One

#347
Some very interesting discussion of outlier features and quantization: https://timdettmers.com/2022/08/17/llm-int8-and-emergent-fea...

* Outlier values are used to prune values. * Transformers seem to undergo a "phase shift" in how outlier features are treated around 6.7B parameters. This could complicate research on removing them.

Maybe you and Tim Dettmers would have a lot to talk about :)

Post reply on HN