8 ms·
Executing programs inside transformers with exponentially faster inference
- mirekrusin 8mo agoThis is brilliant, game changing level. Hey, give it also access to the dump of its weights and way to propose updates so it can see and tinker its brain directly.
- deleted 8mo ago[deleted]
- andy12_ 8mo agoThis seems a really interesting path for interpretability, specially if a big chunk of a model's behavior occurs pseudo-symbolically. This is an idea I had thought about, integrating tools into the main computation path of a model, but I never imagined that it could be done efficiently with just a vanilla transformer. Truly, attention is all you need (I guess).
- galsapir 8mo agoone of the most interesting pieces I've read recently. Not sure I agree with all the statements there (e.g. without execution the system has no comprehension) - but extremely cool
- pennomi 8mo agoIt makes sense that a next token predictor could execute assembly code. This is fascinating work, especially with the memory implementation.
- koolala 8mo agoI'd like to see this combined with reinforcement learning to optimize models to think computationally. Generating ideas with hypothetical results and then running them in the same thought. Their solution sounded like a lot of tokens though.
- behehebd 8mo agoIs this genius? Or just a new binary executable format? Can't tell.
- ThouYS 8mo agowhat!
- bonoboTP 8mo agoThis shows the downside of using AI to write up your project. I see the eloquent sentences, but don't get the message. > This works, but the actual execution happened outside the model. The model specified the computation, then waited for an external system to carry it out. > Our transformer also emits a program, but instead of pausing for an external tool, it executes that program itself, step by step, within the same transformer. What's the benefit? Is it speed? Where are the benchmarks? Is it that you can backprop through this computation? Do you do so? Why is it good that it's "inside" the model? Just making it more elegant and nice? The tool was already "inside" the overall hybrid system. What's the actual problem?
- famouswaffles 8mo ago>This shows the downside of using AI to write up your project. I see the eloquent sentences, but don't get the message. Not really sure what this obsession with calling things you don't like AI generated is but it's poor form. If you have something to say about the text then say it. Otherwise leave baseless accusations out of it. >What's the benefit? Is it speed? Where are the benchmarks? Is it that you can backprop through this computation? Do you do so?.... It's pretty clearly an ideological thing. Some people are firmly on the 'some sort of symbolic logic is necessary' camp. From the article, 'A system that cannot compute cannot truly internalize what computation is.' Some things are just interesting for the sake of it. This is one of those things. I don't agree with the authors on the above and I'm still glad they shared. It's a very interesting read regardless.
- entropi 8mo agoI got the same impression as the parent post. Even if its not AI-generated, the text reads like a politician's speech at a lot of places. Talks a lot, says little. The idea itself was very cool, so I endured it. But it was not a pleasant read.
- bonoboTP 8mo ago> If you have something to say about the text then say it. I could point out the individual phrases and describe the overall impression in detail, or I can just compactly communicate that by using the phrase "AI". If it bothers you, read it as "AI-like", so there is a pretension. I have no problem with using AI for writing. I do it too, especially for documentation. But you need to read it and iterate with it and give it enough raw input context. If you don't give it info about your actual goals, intentions, judgments etc, the AI will substitute some washed-out, averaged-out no-meat-on-the-bone fluff that may sound good at first read and give you a warm wow-effect that makes you hit publish, but you read into it all the context that you have in your head, but readers don't have that. Formatting and language is cheap now. We need a new culture around calling out sloppy work. You would not have had a problem with calling out a badly composed rambling article 5 years ago. But today you can easily slap an AI filter on it that will make it look grammatical and feel narratively engaging, now it's all about deeper content. But if one points that out, replies can always say "oh, you can't prove that, can you?"
- ndxone 8mo agobig question is how efficient is this compare to executing assembly on CPU
- WithinReason 8mo agoMy guess would be in the ballpark of about 10000 times less efficient
- MattPalmer1086 8mo agoInteresting... But why? What is the benefit, other than increasing our understanding of model architectures? Our brains can also simulate turing machines, slowly. We automated that with computers that are faster and more reliable. So why not allow a model to use external much faster and reliable tools, just as we do?
- Rastonbury 8mo agoWhy must models be analogous to humans using tools? Or to take the analogy route further wouldn't it be better if humans had calculators built into their brains, provided they are determisitic and reduce latency
- MattPalmer1086 8mo agoBecause it is directly analogous. Neural nets (whether biological or artificial) are not the best way to execute lots of deterministic computations quickly and reliably. That's why we invented computers. I'm not convinced at all that this is the best way to reduce latency; there are many other ways of doing that. Having a calculator in our brains would be handy of course, but a gigahertz multi core computer is still going to be better at anything that needs to do a lot of computation and or a lot of data.
- graemefawcett 8mo agoExactly. They've implemented a VM inside a transformer, turned an O(1) memory access call into O(n), optimized it down to O(log n) and wrote a post about how smart they are. It's a nice bit of engineering, if you don't subscribe to YAGNI. If you do, you must ask the obvious question of what capability this delivers that wasn't available before. The only answer I've got is that someone must have been a bit chilly and couldn't figure out the thermostat
- mobilejdral 8mo agoI spent the entire time reading it pondering the same thing. 1. The article presents that calling out to a tool like python is "expensive" because of the overhead of forking a process, loading up the python env etc, but why not just eliminate that overhead and embed WebAssembly so this "tool call" is near zero? This feels very similar to the discussion in the 90's around the overhead of threads v.s. processes or kernel space v.s. user space. Could even go further and have a running beam vm so the LLM can write elixir which is ideal for LLM's that stream out code? Elixir programs will be a lot shorter than webassembly. 2. The core argument stated is "A system that cannot compute cannot truly internalize what computation is." The idea being that it could write a program, execute it and by seeing all of the steps maybe even part way through stop and change its mind or when writing new programs write them better, aka be able to debug on the fly? 3. Not mentioned, but there is a 3rd x factor that LLM's will use this new found computation engine to do overall better at "thinking". Computing in very unexpected ways and to unexpected problems. Maybe it would do dramatically better at some benchmark because of this? Unfortunately these are not explored and it is just an execution engine even resulting in the conclusion stating "arbitrary programs can be compiled directly into the transformer weights, bypassing the need to represent them as token sequences at all." which goes to point number 1 of if we are compiling to weights why not just optimize the tool calling?
- deviation 8mo agoI really liked the article, but food for thought: is a transformer that offloads computation to python really that different from Python code being read and then executed by a compiler? Both examples are of a system we created to abstract most of the hard work. I think a more important concept here is that the term "AI" has a lot of built-in assumptions, one of which being that it is (or will be) super intelligent, and so folks like the author here think (correctly) that it's important for the AI to be actually doing the work itself.
- krackers 8mo agoThere's one difference that if a program is run as tool call, the internal states and control flow are not visible to the LLM. You can imagine this being useful for "debugging" in a meta-sense, the same way humans can use debuggers to figure out where something went awry it might be useful for the LLM to "simulate" something and have access to the execution trace. Of course you can also just simulate this by peppering your code with print statements, so maybe it's not that useful in the end after all.
- btown 8mo agoThis seems way cooler than just computation (which is easy to hand off to a tool, and arguably more predictable that way). The broader point here is that you can have your model switch dynamically to/from a kind of attention that scales with the log of the token count, by only exploring the convex hull in a 2D space. A less capable version of attention, to be sure, but one capable of tracing a program’s execution with text representations of registers and stack - which is a meaningful level of flexibility, and one many humans would find difficult to do reliably! What could you do with an LLM that can go into “focus mode” and generate tokens extremely rapidly? How much more powerful would a reasoning-token-generation phase be that can explore and cull large numbers of paths/hypotheses, so long as they are well defined? Does this have implications for multi-modal models and spatial reasoning? As the paper suggests: > These models could be useful in several modes: as a dedicated fast path paired with a slower, more general model; as part of a fast/slow hybrid architecture inside a single system; or as a speculative execution model that proposes tokens quickly while a regular-attention model verifies and accepts them. Regardless of their eventual capability ceiling, they already suggest a powerful systems primitive for speeding up larger models.
- itigges22 8mo ago[flagged]
- alasr 8mo agoJust a small nitpik with the following part of your post. > As the paper suggests: ... This is not a paper; it's just a blog post which is mentioned in this post's URL (i.e. .../blog/can-llms-be-computers). Also it, at the end of the article, has a job advertisement (nothing unusual for a blog post): "We are building these systems now, and we are hiring. If you want to work on problems at ..., join us."
- yalok 8mo agovery cool idea. But, time savings are not true for every tool call, and it's not clear to me yet whether this is batch-able; also, intuitively, for most of the models that run on GPU, you'd still want to offload tool exec part to CPU since it's much cheaper...
- hrmtst93837 8mo ago[flagged]
- rebolek 8mo agoThe original title is "Can LLMs be computers?" But the right question is, should they?
- RagnarD 8mo agoThis is really important work.
- plaidfuji 8mo agoBesides being a very interesting conceptual exercise, the animated figures in this article are absolutely stunning - best I’ve ever seen.
- TedHerman 8mo agoThis looks like a hack. Yes, being able to interpret webassembly is a general oracle. Still falls short of solving the real problem directly.
- akshaysasi 8mo agoooh
- j45 8mo agoVery interesting read. Would love to learn more about incorporating deterministic calculations where it's normally non-deterministic.
- ACCount37 8mo agoThis seems like it has some potential, but is pretty much useless as it is. Shame there are no weights released - let alone the "compiler" tool they used to actually synthesize computational primitives into model weights. It seems like a "small model" system that's amenable to low budget experiments, and I would love to see what this approach can be pushed towards. I disagree with the core premise, it's basically the old neurosymbolic garbage restated, but embedding predefined computational primitives into LLMs could have some uses nonetheless.
- yorwba 8mo agoIf you want to experiment with hardcoding small programs into transformer weights, maybe try ALTA: https://arxiv.org/abs/2410.18077v2 https://arxiv.org/abs/2410.18077v2
- ACCount37 8mo agoI'm less interested in turning programs into transformers and more interested in turning programs into subnetworks within large language models. Which the blog post brings up as a research direction, but never actually elaborates upon. And the interface between the two is a hard problem. I'll check out the link though, thanks.
- YeGoblynQueenne 8mo agoWhat's "the old neurosymbolic garbage"?
- ACCount37 8mo agoBasically, a holdover from the days of symbolic AI, from back when neural network ML wasn't the dominant AI paradigm. Some people in the "symbolic AI" camp didn't take the loss well, so they pivoted towards "ML is not real AI and it needs a symbolic component to be a real AI", which is: the neurosymbolic garbage. This work isn't exactly that, and I do think it can amount to something useful, but the justification for it reeks of something similar.
- moktonar 8mo agoIs it possible to do the inverse, then? (Tranforming weights back to code)
- manas96 8mo agoLLMs are not deterministic per my understanding. A program always produces the same output for the same input and instructions (ignore FP accuracy for now). How is determinism achieved here?
- armchairhacker 8mo agoLLMs may be deterministic for a subset of inputs, if one output (or intermediate layer) neuron-state probability is significantly higher than the rest. My understanding is, when probabilities are close they diverge.
- Hugsun 8mo agoLLMs produce a distribution of token probabilities which is then sampled. This sampling is the only random part of the system. If you just take the most probable token every time, the system becomes fully deterministic. We don't do this as the output becomes more stiff and less creative.
- D-Machine 8mo agoLLMs (or at least transformer-based LLMs) are effectively almost entirely deterministic, the randomness being largely only present due to (unnecessary) optimizations and other tweaks. Temperature is not at all core to LLMs, it is something that rather makes the outputs more varied and desirable for human consumption generally. It is trivial to set to zero for applications like this. On CPUs, the models are essentially fully deterministic, even with FP accuracy, and most common kernels have reproducible (albeit slower) variants even on GPUs. Otherwise, yes, FP non-associativity on GPUs is the only real source of randomness in inference. The other issue arises from batch invariance, but this is a problem that occurs only at scale when serving multiple users / inputs have some randomness too. You can (usually) trivially eliminate this by controlling what goes in the batch or making the batch size be one. There are also other more clever mitigations for this, none of which are secrets. EDIT - Forgot reference: https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/ https://thinkingmachines.ai/blog/defeating-nondeterminism-in...
- ontouchstart 8mo agoIf this works, we might be able to have a special ISA for LLM and forget about high level computer language for humans. I am talking strictly about computing, not garbage in garbage out IO.
- BenoitP 8mo ago> the whole process remains differentiable: we can even propagate gradients through the computation itself. That makes this fundamentally different from an external tool. It becomes a trainable computational substrate that can be integrated directly into a larger model. IMHO the key point at which this technique has an unfair advantage vs a traditional interpreter is here. How disruptive is it to have differentiability? To me it would mean that some tweaking-around can happen in an LLM-program at train-time; like changing a constant, or switching from a function call to another function. Can we gradient-descent effectively inside this huge space? How different is it from tool-calling from a pool of learned programs (think github but for LLM programs written in classic languages)?
- troelsSteegin 8mo agoThe Percepta stuff would seem to demonstrate a mechanism for implementing "thinking". I don't understand how foundation models implement "thinking", but my intuition is that models are specifically trained for matching on and following procedural patterns. A task in a given domain can be performed through an associated and encoded procedure. The model holds all the linkages, as weights, that allows a procedure to be conditionally incrementally generated and performed. Does anyone have any insights about how LLM "thinking" is trained and coded?
- graemefawcett 8mo agoBasically just madlibs - the models generate intermediate tokens that help predict a better answer based on training (RLHF & otherwise). They tend to look like "reasoning" because those tokens correlated with accepted answers during training. Extended thinking passes are just more of the same. The entire methodology exists merely to provide additional context for the autoregression process. There is no traditional computation occurring
- sheepscreek 8mo agoEarly thoughts - this is very interesting and quite possibly revolutionary. If they have legitimately emulated a computer with memory reliably inside a transformer - that will open up an entirely new world for research. I don’t want to say too much too soon, but I am pretty excited about this.
- EGreg 8mo agoI love how this paper describes what actually happens and what the current tradeoffs are. That having been said, many LLMs are being run on SIMD GPUs, in warps, basically they are just doing a lot of vector multiplications, activation functions and kv self attention (the expendive step). The issue is we want the LLMs to be one-way through the layers, whereas turing-complete programming languages support loops and no well-defined stopping time. You can stick a simple computer into an LLM, but it won’t be able to do long loops. However, for these specific workloads, the need to attend only to the latest state is indeed a huge optimization! Gone is the need for n^2 complexity that dominates the cost, now it is (log n)^2 attention which is far smaller.
- dwa3592 8mo agoif you understood the article, please correct my understanding - they created a new training dataset which also has computation solving step by step (multiplying two numbers or playing sudoku) and then trained a transformer on it- as a result, the model performs the computation(multiplying two numbers) "inside" itself instead of calling calculator (or python)? ++ And they also figured out how to make attention faster?
- YeGoblynQueenne 8mo agoI can't see anything about "training a transformer". I'm trying to understand if e.g. the Sudoku solver was learned from examples (in which case, what examples?) or whether it was manually coded and then "compiled" into weights.
- dwa3592 8mo agoI assumed that they had to train, otherwise how else would they get "inside" a transformer. I also feel a bit of bad smell from the article. Sounding revolutionary with no details or clear explanation.
- D-Machine 8mo agoThere is no training in the usual sense of the term, i.e. no gradient descent, no differentiable loss function. They use deceptive language early on to make it sound this way, but near the end make it clear their model as is isn't actually differentiable, and in theory might still work if made differentiable. But they don't actually know. But IMO this is BS because I don't know how one would get or generate training data, or how one would define a continuous loss function that scores partially-correct / plausible outputs (e.g. is a "partially correct" program / algorithm / code even coherent, conceptually).
- YeGoblynQueenne 8mo agoYeah, a "100% correct" Sudoku solver fully trained by gradient descent from examples? That sure would be something entirely new. To answer dwa3592, it's always possible to set the weights of a neural net by hand, albeit extremely fiddly and normally only done "on paper". This is e.g. how the Turing-completeness of RNNs was shown back in the '90s: On the computational power of neural nets https://binds.cs.umass.edu/papers/1992_Siegelmann_COLT.pdf https://binds.cs.umass.edu/papers/1992_Siegelmann_COLT.pdf
- Felixbot 8mo ago[flagged]
- clarionbell 8mo agoThis has a lot of potential. Especially if the compiled "code" can be efficiently shared between models of the same architecture. That would easily overshadow LoRa and finetuning in general.
- YeGoblynQueenne 8mo agoSo, what I'm trying to understand, and I can't find any clear information about that in the article, is how they "compiled" e.g. the Sudoku solver into a Transformer's weights. Did they do it manually? Say, they took the source of a hand-coded Sudoku solver and put it through their code-to-weight compiler, and thus compiled the code to the Transformer weights? Or did they go the Good, Old-Fashioned, Deep Learning way and train their Transformer to learn a ("100% correct"!) Sudoku solver from examples? And, if the latter, where's the details of the training? What did they train with? What did they train on? How did they train? etc etc. Very light on details that article is.
- MadnessASAP 8mo agoMy interpretation is that they built a simple virtual machine directly into the weights, then compiled a WASM runtime for that machine, then compiled the solver to that runtime.
- YeGoblynQueenne 8mo agoThat's more or less what I got, also, but it's hard to tell. What a very annoying article, in its vagueness.
- gavinray 8mo agoThe article states they trained a WASM interpreter and programs are represented as WASM bytecode
- D-Machine 8mo agoNope, they encoded or compiled in a simple VM / WASM interpreter to the transformer weights, there is no training. You'd be forgiven for this misreading, as they deliberately mislead early on that their model is (in principle) trainable, but later admit that their actual model is not actually differentiable, but that a differentiable approximation "should" still work (despite no info about what loss function or training data could allow scoring partially correct / incomplete program outputs).
- bee_rider 8mo agoIs their convex hull attention mechanism new and generally useable? I mean, it substantially restricts the shape of the model, so it isn’t a universal solution of course, but it does seem to overcome a pretty annoying limitation.
- D-Machine 8mo agoIf you read the section "Richer attention mechanisms", you can see, no, the mechanism is not generally useable (it requires significant modification to become differentiable). They later speculate: While we do not yet know whether exact softmax attention can be maintained with the same efficiency, it is easy to approximate it with k-sparse softmax attention: retrieve the top-k keys and perform the softmax only over those but if you have played around with training models that use e.g. topk or other hard thresholding operations in e.g. PyTorch (or just think about how many gradients become zero with such an operation) you know that these tend to work only in extremely limited / specific cases, and make training even more finicky than it already is.
- bee_rider 8mo agoI saw that, but the image included nearby made it look like it might be plausible to replace the 1D line around their points with a pretty narrow 2D area. This could still be a somewhat effective filter, right?
- D-Machine 8mo agoThe problem is they are talking about tricks for compiling VMs into transformer weights, which is basically unrelated to actually training transformers on data via gradient descent. Once you get into this actual messy practical reality, you have non-trivial stuff like sparsemax and the Gumbel-Softmax trick to get some desirable improvements to things like the softmax, without all the gradient destruction of things like top-k approaches, but usually at pretty serious other costs (most approaches using Gumbel-Softmax I have read essentially create a bi-level optimization problem that is claimed to be "solved" by some handwavey annealing, but which is clearly highly unstable and hard to tune. I don't know if things have improved here since I last read on it). So the issue isn't if there aren't ways to effectively approximate their approach, from a strictly numerical approximation standpoint, it is that other factors matter much more in optimization when training on actual data.
- dnautics 8mo agothe paper is burying the lede here (i think?) > The key technical unlock is to restrict lookup heads to head dimension 2, which enables a decoding path where the dominant retrieval/update operations can be computed in log time in the sequence length (for this structured executor regime), rather than by a full prefix-sized attention sweep. edit: i understand how hullkv works now. very clever. I dont understand why this strategy is applicable only to "code tokens" lastly, im not sure why wasm is a good target, iirc wasm seems to be really inefficient (not so much in code but in expressivity). i wonder if that curtails the llms ability to plan higher order stuff (since its always forced to think in the small)
- D-Machine 8mo ago> i have a pretty good understanding of how transformers work but this did not make sense to me. also i dont understand why this strategy is applicable only to "code tokens" Yes, there is a monstrous lack of detail here and you should be skeptical about most of the article claims. The language is also IMO non-standard (serious people don't talk about self-attention as lookup tables anymore, that was never a good analogy in the first place) and no good work would just use language to express this, there would also be a simple equation showing the typical scaled dot-product attention formula, and then e.g. some dimension notation/details indicating which matrix (or inserted projection matrix) got some dimension of two somewhere, otherwise, the claims are inscrutable (EDIT: see edit below). There are also no training details or loss function details, both of which would be necessary (and almost certainly highly novel) to make this kind of thing end-to-end trainable, which is another red flag. EDIT: The key line seems to be around: gate, val = ff_in(x).chunk(2, dim=-1) and related code, plus the lines "Notice: d_model = 36 with n_heads = 18 gives exactly 2D per head" but, again, this is very unclear and non-standard.
- dnautics 8mo ago> lookup tables anymore, that was never a good analogy in the first place good analogy otherwise, wasn't hash tables the motivation for the kv tables?
- 8mo ago
- teiferer 8mo agoWhy would that be desirable? If we take the human brain as an example, it's pretty bad at computation. Multiply two 10-digit numbers takes forever, despite the enormous size of its neural network. It's not the right tool for the job - a few deterministic logic gates could do that much more efficiently. That same circuit can't do much else, but multiplying, oh boy, it's good at that! Why do we think that artificial neural nets would be the right tool for that job? What's wrong with letting the LLM reach out to an ALU to do the calculation, just like a human would do? It's surely going to be quicker and require less energy.
- soerxpso 8mo agoThe embedded programs can be connected to the other weights during training, in whatever way the training process finds useful. It doesn't just have to be arithmetic calculation. You can put any hard-coded algorithm in there, make the weights for that algorithm static, and let the training process figure out how to connect the other trillion weights to it.
- pegasus 8mo ago> Why would that be desirable? If we never try, we'll never know. I wouldn't be surprised if there is something to gain from a form of deterministic computation which is still integrated with the NN architecture. After all, tool calls have their own non-trivial overhead.
- teiferer 8mo agoTrying, sure. That's what hackers do. I'm asking whether it's a desirable end state.
- OneDeuxTriSeiGo 8mo agoOne of the big appeals of this is it gives a mechanism for "teaching" models a geometric intuition and better spacial reasoning. Not necessarily pure number crunching but the boundary between rote algorithms and fuzzy intuition based models that humans in particular excel at.
- 8mo ago
- hashmap 8mo agothis is neat but to me seems like the circuitous path to just skipping autoregression, whereas the direct path is to just not do autoregression. get your answers from the one forward pass, and instead of backprop just do lookups and updates as the same operation.
- skybrian 8mo agoI couldn't tell from the article whether this works as a language model or not. Can it read and write English or is it just a weird program interpreter? If it switches between modes, how do they interact?
- D-Machine 8mo ago> In our construction, each instruction maps to only a handful of tokens (at most 5). I don't see how this could work as an LLM given that, but the article is missing a huge amount of other crucial details too.
- refulgentis 8mo agoThis sounds so cool but I can’t tell if it’s a practical joke, even after sitting on it for 2-3 hours. Key points where I lose understanding/trust are when a WASM interpreter suddenly appears in the model, and when we’re representing code in weights. It is unclear to me how this WASM interpreter is / could be deterministic.
- SPascareli13 8mo agoIf the model is trained to be a interpreter, then that means that the loss should reach 0 for it to be fully trained? Also, if it's execution is purely deterministic, you probably don't need non linearity in the layers, right?
- D-Machine 8mo agoThe model isn't trained, it isn't differentiable (read carefully to the end: they say their model might still work if they made it differentiable, but they don't know), and it isn't clear IMO it could ever be made trainable (what is your loss function that scores a "partially correct" program / compiler, and how are you getting such training data?). You need non-linearity in self-attention because it encodes feature / embedding similarities / correlations (e.g. self-attention is kernel smoothing) and/or multiplicative interactions, it has nothing to do with determinism/indeterminism. Also, LLMs are not really nondeterministic in any serious way, that all just comes from tweaks and optimizations that are not at all core to the architecture.
- derangedHorse 8mo agoI initially agreed with a lot of the sentiment that asks "why," but have reframed my opinion. Instead of seeing this as a way to run programs via inference, I'm now seeing this as a way to bootstrap training. Think about the task of classification. If I have an expert system that classifies correctly 80% of the time, now I can embed it into a model and train the model to try to raise the success rate. The lower we can make the cost of training on various tasks, the better it levels the playing field of who can compete in the AI landscape.
- yorwba 8mo agoThe approach here is very bad for training though, because unlike softmax attention, average-hard attention is not differentiable with respect to the keys and queries, and if you try to fix that e.g. with straight-through estimation, the backward pass cannot be sped up in the same way as the forward pass.
- refulgentis 8mo agoTraining is ruled out (see peer comment), however you may find this fascinating, somewhat rhymes: https://arxiv.org/abs/2603.10055 https://arxiv.org/abs/2603.10055
- aplomb1026 8mo ago[dead]
- casey2 8mo agoYAY! this is exactly what I wanted as the final step of some agent batching prompts to sub agents, but seeing it in action made me realize: Wow being able to talk to any program during runtime, including the OS, because an LLM is your CPU! What a concept! Computing is going to be so weird in a few decades, writing programs faster than I can speak with full semantic introspection into every byte of code.
- que3216 8mo agoFor me this felt key to understanding the value vs tool calls: > Because the execution trace is part of the forward pass, the whole process remains differentiable: we can even propagate gradients through the computation itself. That makes this fundamentally different from an external tool. It becomes a trainable computational substrate that can be integrated directly into a larger model.
- D-Machine 8mo agoExcept their process isn't actually differentiable, as they admit near the end of the post, they just sort hand-wavily suggest that approximately differentiable methods "should" work. Also no mention at all of what the training data would be, where it would come from, or how a loss function could be constructed to continuously score "partially correct" programs (of what that would even mean, or if that idea is even coherent). What was a good point, mentioned by @hedgehog in this thread (https://news.ycombinator.com/item?id=47367986 https://news.ycombinator.com/item?id=47367986), is that tool-calls break batching a lot, so there could be huge efficiency gains at scale if you can just pass through a computation sub-network (even if that sub-net is frozen and can't be updated, and is programmed in manually rather than trained in). Why on Earth you'd want that sub-net to be a clunky transformer rather than just an efficient, GPU-accelerated custom non-trainable layer, though, is unclear to me.
- xpl 8mo agoIs this a joke? If it's not trainable / differentiable when why do it in the first place? It's just as inefficient and inflexible as it gets compared to tool calling — you have to statically bake programs in the weights, model cannot introspect it and modify, it has very limited IO capabilities, bad performance, bad everything. Its like a weird brainfuck-esque VM — cool that you can do it, but for what except some lulz? But maybe it's just too genius and I don't understand it.
- D-Machine 8mo agoI'd tend to agree, the only good points I've seen were made by @hedgehog [1] here in this thread: I'm not sure about the rest but a significant problem with high frequency tool calling (especially in training) is that it breaks batching. and then later by @ACCount37 [2]: I'm less interested in turning programs into transformers and more interested in turning programs into subnetworks within large language models. In theory, if you can create a very efficient sub-net to replicate certain tool calls (even if the weights are frozen during any training steps, and manually compiled), this might help with making inference much more efficient at scale. No idea why in general you would want to do this through the clunky transformer architecture though. Just implement a non-trainable, GPU-accelerated layer to do the compute and avoid the tool-call. [1] https://news.ycombinator.com/item?id=47367986 https://news.ycombinator.com/item?id=47367986 [2] https://news.ycombinator.com/item?id=47363909 https://news.ycombinator.com/item?id=47363909
- chr15m 8mo agoIf LLMs can internally do "step through the program" like a human does, they will become vastly better programmers. Interesting that they had to make it functional and immutable because they can't mutate the past tokens.