1/4 LLMs solve research grade math problems but struggle with basic calculations.
@ChristosTzamos24K followers
1,833,206 views
54 Comments
Comments from the original post on X (Twitter)

@karpathy
Wait this is so awesome!! Both 1) the C compiler to LLM weights and 2) the logarithmic complexity hard-max attention and its potential generalizations. Inspiring!
1,404 likes

@ChristosTzamos
2/4 The key limitation of LLMs is that standard attention is too slow for any practical computation. We bypass this limitation with a new decoding path that allows for exponentially faster attention enabling almost constant work per token generation.
741 likes

@ChristosTzamos
3/4 Instead of using an external tool, the model executes the program directly via its transformer weights, producing an execution trace token by token and streaming results at more than 30k tokens/sec on a CPU. All computation is done autoregressively inside the transformer!
800 likes

@ChristosTzamos
4/4 Read more at our blog post:
1,123 likes

@gonzaleshvili
33,000 tokens per second. Brother what kind of rocket powered spaceship is that? My macbook m2-pro barely spits 27tokens/s
136 likes

@ChristosTzamos
That's what our fast-attention decoding mechanism gets you! This was also run on my macbook which is possibly older than yours. With regular decoding I would also get similar 27toks/s and decreasing as time goes by.
228 likes

@gonzaleshvili
this is where the money's at. fast-attention decoding mechanism 💎
20 likes

@caviterginsoy
I’m so sorry to say but I really dislike seeing these sorts of totally unnecessary implementations of a transformer. You can literally do same or better for a fraction of the compute deterministically. and any frontier LLM can give you script for it pretty much 1 shot.
69 likes

@ChristosTzamos
Solving a Sudoku this way seems unnecessary but the deeper question is what this can unlock if LLMs can own their own computation internally+have the capacity to understand it. Can we optimize the whole problem solving process end-to-end without being restricted to a code syntax?
412 likes

@caviterginsoy
I see what you’re saying but I’m trying to imagine a fully scaled frontier variant of what you did and still can’t see why tool use isn’t inevitably always better on both compute efficiency and on quality of response. There is an anthropomorphic view that calculators are much better at maths than humans but we still learn arithmetic, but just don’t see how that logic applies to a transformer. Though I agree if you only train on tool-use data, the model never learns to maintain a consistent search tree inside its own weights. It keeps needing the ‘crutch’’. You do show you can fix that and once fixed, the model can decide when to call a tool more intelligently instead of reflexively. But frontier size models do not ONLY train on tool use anyway..
27 likes

@phyrooo
@ChristosTzamos Imagine an intelligent system always having to offload computation to an external (permissioned?) tool call vs being able to execute it inside its own mind. It might be a way to get to a permissionless reasoning + computation. Whether that's good or bad is a different question.
36 likes

@caviterginsoy
@ChristosTzamos It’s all about when to use tool call. You as an intelligent system constantly offload computation externally don’t you?
19 likes

@willowdesk
@phyrooo @ChristosTzamos This is a great point but I think this research seems pretty interesting.
2 likes

@caviterginsoy
@phyrooo @ChristosTzamos It does, I was too hasty to call it out in the harsh way I did
16 likes

@yungrichbobby
I was working on doing exactly this can we please dm?
53 likes

@Tau_Net
Nice! Here is Tau's Sudoku Solver doing the same Sudoku. Our approach is to express the Sudoku as logical constraints, and our SMT solver does the rest.
43 likes

@cript0shaman
When the program understands the rules, brute force isn't necessary...
22 likes

@doyc_1
I like the idea of turning transformers into actual computers. But how do you convince people this works 100%? They operate on probability.
18 likes

@ChristosTzamos
@yechan_ai This uses a handcrafted construction for the weights of the transformer that comes with a proof of correctness. It is specifically constructed to match the spec of webassembly.
116 likes

@ChristosTzamos
@yechan_ai In particular, there is nothing random in the construction or the decoding process.
47 likes




























