Live data from Hacker News

Smallest transformer that can add two 10-digit numbers

github.com

41–50 of 105 posts

Re: Smallest transformer that can add two 10-digit numbers

#41
post #19

I get that this is technically interesting, for certain, but the sheer amount of energy and associated global warming risk needed to do something with >=99% accuracy that we've been able to do easily for decades with a guaranteed 100% accuracy seems to me to be wasteful to the extreme.

> the sheer amount of energy and associated global warming risk

I think that's one very good reason to make them more efficient, and that's part of the point of contests like this one.

Re: Smallest transformer that can add two 10-digit numbers

#42
post #19

I get that this is technically interesting, for certain, but the sheer amount of energy and associated global warming risk needed to do something with >=99% accuracy that we've been able to do easily for decades with a guaranteed 100% accuracy seems to me to be wasteful to the extreme.

Because it's fun. Life is meant to be enjoyed.

Those who worry about an imaginary risk and live their lives in constant fear have turned into nothing more than machines enslaved by propaganda.

Re: Smallest transformer that can add two 10-digit numbers

#44

Earlier quoted context omitted.

I mean, yeah, no need to put a bunch of high powered cars in a circular track to watch them race really close to each other at incredible speeds, causing various hazards, either. Especially since city buses have been around for ages.

I would similarly criticise a race car being used to do a city bus' job of getting a lot of people from point A to B. Although the converse would be interesting, racing city buses.

Nobody has suggested using this for addition tasks in production. It's an academic exercise. What are you on about?

Re: Smallest transformer that can add two 10-digit numbers

#45
post #35

Earlier quoted context omitted.

Ok I don't really care either way but to play devil's advocate, what exactly is this specific challenge of adding numbers with a transformer model demonstrating/advancing? The pushpack from people, albeit a little aggressive, does have a grain of truth. We're demonstrating that a model which uses preexisting addition instructions can add numbers? I mean yeah you can do it with arbitrarily few parameters because you d…

>what exactly is this specific challenge of adding numbers with a transformer model demonstrating/advancing? Well for starters, it puts the lie to the argument that a transformer can only output examples it has seen before. Performing the calculation on examples that haven't been seen demonstrates generalisation of the principles and not regurgitation. While this misconception persists in a large number of people, co…

Are people usually claiming that it strictly cannot produce any output it hasn't seen before? I wouldn't agree, I mean clearly they are generating some form of new content. My argument would be that while they can learn to some extent, the power of their generalisation is still tragically weak, particularly in some domains.

Re: Smallest transformer that can add two 10-digit numbers

#48

I made a blogpost on my submission (currently the top handwritten one at 36 parameters) https://alexlitzenberger.com/blog/building_a_minimal_transfo...

I didn't look at all the details, but wanted to see how you did the initial embedding and see you do have a 14x5 matrix there. I guess when you are setting things by-hand (rather than learning), the definition of counting "parameters" is a bit unclear. One could say all those are parameters! even if setting in a straight-forward way.

Re: Smallest transformer that can add two 10-digit numbers

#50

Very cool, but can I suggest the `add` CPU instruction instead? Supports 64-bit numbers, and it's encoded in hardware, and no need to cross a PCIe interface into a beefy, power-hungry GPU and back again. And chances are it's cross-platform, because basically every ISA since the very first has had `add`.

No. You cannot. It's the wrong tool for the problem.

That little "add" of yours has the overhead of: having an LLM emit it as a tool call, having to pause the LLM inference while waiting for it to resolve, then having to encode the result as a token to feed it back.

At the same time, a "transformer-native" addition circuit? Can be executed within a single forward pass at a trivial cost, generate transformer-native representations, operate both in prefill and in autoregressive generation, and more. It's cheaper.

Post reply on HN