LLMs Can Now Directly Write Model Weights?! — Transcript
Full transcript
- 0:00I want to talk about something today
- 0:01that I think is absolutely insane and
- 0:03came quite unexpectedly in the AI space.
- 0:06I'm talking about weight space
- 0:07programming. I'm going to explain what
- 0:08this is in a second, but with certain
- 0:10developments in AI, I think they're kind
- 0:12of expected. No matter how impressive
- 0:14they are, they're not surprising. If you
- 0:16tell me that in a couple of years coding
- 0:18agents will build enterprise level
- 0:20software in 2 minutes, this is kind of
- 0:22where we're heading. If you tell me that
- 0:23they're going to build like robots,
- 0:24intelligent robots are going to build
- 0:26entire buildings, I'm also not too
- 0:28surprised. However, what this blog post
- 0:30by a couple of researchers from MIT
- 0:32showed is that our current LLMs to some
- 0:35degree can understand what happens in
- 0:38neural networks just by looking at
- 0:40weights and biases at model parameters.
- 0:42Not only can they understand it, they
- 0:44can also edit these weights and biases
- 0:47to fix mistakes, to optimize
- 0:49performance, and they can also write
- 0:51them from scratch. If you have an empty
- 0:53architecture, they can fill it up with
- 0:55weights and biases, with parameters to
- 0:58solve specific problems, and they
- 0:59outperform traditionally trained models.
- 1:01And this to me is shocking because it's
- 1:03a whole new paradigm. It's not just
- 1:05something that we can already do, doing
- 1:06it faster, doing it better. This is
- 1:08something that humans cannot even
- 1:09imagine doing. It's so abstract. It's so
- 1:12chaotic, we don't even know where to
- 1:13start. For us, neural networks are a
- 1:15blackbox. And for LLMs, it seems like
- 1:17they can reason through the parameter
- 1:19space, through the weight space. So what
- 1:21I want to do with you guys today is I
- 1:22want to go through this blog post which
- 1:24essentially looks like a scientific
- 1:25paper. Take a look at the experiments
- 1:27and their results, provide my
- 1:28interpretation, and then I also want to
- 1:30replicate two of these experiments on my
- 1:32own system with claude opus 55 because
- 1:35this paper uses GPT6 Astra and spoiler I
- 1:38actually succeeded. I get similar
- 1:40results which is absolutely crazy. This
- 1:42new paradigm of weight space programming
- 1:43opens so many different opportunities.
- 1:45We're going to talk about all of this,
- 1:46but it's also important to understand
- 1:48what is real and what is hype because
- 1:50not everything is as crazy as it sounds
- 1:52when you hear it for the first time. So,
- 1:54if you like this video, if you get value
- 1:56out of it, let me know by hitting the
- 1:57like button and subscribing. And now,
- 1:59let us get right into it.
- 2:05[music]
- 2:10>> So, this is the blog post that we're
- 2:11talking about. LLMs can natively read
- 2:13and write neural network weights
- 2:15published on November 2nd. Today we have
- 2:17November 6th. So this is very recent and
- 2:19the whole thing looks like a scientific
- 2:21paper. If you scroll to the very bottom,
- 2:23you're going to see it also has
- 2:24citations and all of that, but
- 2:26officially it's a blog post. It's not a
- 2:27paper. You can also see it here in the
- 2:29note. So yeah, call it whatever you
- 2:31want, but this is extremely impressive.
- 2:33Created by researchers from MIT. And the
- 2:36in a nutshell TLDDR summary is that
- 2:38Frontier LLMs are surprisingly good at
- 2:41natively reading and writing neural
- 2:43network weights, which is kind of crazy
- 2:46if you think about it. We came up with
- 2:48machine learning and neural networks
- 2:50specifically because we wanted to solve
- 2:52problems where we don't really know how
- 2:53to articulate a solution. You want to
- 2:55classify cats and dogs or images of cats
- 2:58and dogs and you don't really know how
- 3:00to put this into Python code, for
- 3:01example. you want to play video games
- 3:03like Pong or Tetris or uh Breakout or
- 3:07something like this, but we don't really
- 3:08know how to make a program that does
- 3:10that. We need to go for a more fuzzy
- 3:12approach where we show a structure which
- 3:14we call neural network how to do it and
- 3:17we reward good behavior. We punish bad
- 3:19behavior in the form of a loss function
- 3:21and then it trains to solve this
- 3:23problem. Surprisingly effective. LLMs
- 3:25are basically also just neural networks
- 3:27that solve the language problem and they
- 3:30do that and we don't really understand
- 3:32how they do that. So for us, these
- 3:33neural networks for the most part are a
- 3:36blackbox. Something comes in, something
- 3:38comes out, we can evaluate what comes
- 3:40out, but we don't really understand what
- 3:42exactly they're doing. Which is why I
- 3:44think this is so surprising because LLMs
- 3:47can somehow do that. They can do
- 3:48something that we humans cannot do at
- 3:51all. And this whole new field is called
- 3:53weight space programming. So instead of
- 3:55just training neural networks producing
- 3:56these weights and biases, now we can
- 3:59also use LLMs to directly change them.
- 4:02Not with a loss function, not with
- 4:03gradient descent, not with a training
- 4:05loop, just by looking at the weights,
- 4:07reasoning about them, changing them, or
- 4:10creating them from scratch even. And
- 4:11this is also a big statement here. Our
- 4:13neural network weights will soon be
- 4:15natively optimized by LLMs that
- 4:17deliberately reason about their weights.
- 4:19And I think this has two implications or
- 4:21two things why this is so impressive and
- 4:23so interesting. On the one hand, of
- 4:25course, it's cheaper and better maybe to
- 4:27optimize neural networks in this way.
- 4:29But also, the more important one in my
- 4:31opinion is explanability. If a large
- 4:33language model can tell you how a neural
- 4:36network or another large language model
- 4:38works and reasons and why it does
- 4:40certain things, this is a gamecher. I
- 4:43know this is AI language but this is
- 4:44absolutely a gamecher because we can
- 4:46actually understand what is happening
- 4:48inside the brain of these AI models. But
- 4:50let us now go to the different
- 4:52experiments. What they do here is I
- 4:54think it's eight different experiments.
- 4:55The first one here is recognizing which
- 4:59game a network was trained to play just
- 5:01by looking at the weights. So the setup
- 5:02is the following for all of these. You
- 5:04can see first of all anformational setup
- 5:06note here that explains what the games
- 5:08are, what the network looks like. So
- 5:10this is a multi-layer perceptron with
- 5:12500 inputs. We basically have a 10 x 10
- 5:15grid. So 100 pixels with five channels.
- 5:17And the channels are basically an agent,
- 5:19moving objects, reward targets,
- 5:22obstacles, and the previous frame. So we
- 5:24always have this information uh with 100
- 5:27pixels and five different context or
- 5:29five different informations. And these
- 5:31are then fed through some hidden layers.
- 5:33And then we have five outputs which are
- 5:35the actions that the agent can take. No
- 5:37operation. So nothing up, down, left and
- 5:40right. This is uh the structure of the
- 5:43network. And then we have different
- 5:44games that are being played here.
- 5:46Breakout, as you can see, you have this
- 5:48small paddle. It moves around, throws
- 5:50this ball around, and then it breaks
- 5:52some blocks. Pong probably you know it.
- 5:54It's just this very first video game
- 5:56that we developed. Um Pac-Man is Pac-Man
- 5:58is a very minimalistic version of that.
- 6:00and freeway is I think something like
- 6:03Frogger if I'm not mistaken where you
- 6:04try to make it to the other side without
- 6:06getting run over by a car. And how the
- 6:09prompt is structured is the following.
- 6:11You click on show full prompt here. You
- 6:12can see it explains the entire
- 6:14structure. It explains all the channels
- 6:16what they're for. So it gives some
- 6:17context about the architecture. The same
- 6:19thing that a human would have and then
- 6:21it explains what this entire thing can
- 6:23do. It doesn't tell it though what game
- 6:25it was trained on. It just tells it,
- 6:27hey, these are the five actions that you
- 6:29can take. These are the inputs and these
- 6:31are the same for all four games. So the
- 6:33entire architecture, these channels and
- 6:35these actions are the same for Pac-Man,
- 6:37Freeway, Pong, Breakout, doesn't really
- 6:38matter. And what we do then is we just
- 6:41feed the raw numbers. So we say look at
- 6:43these weights down below. We provide all
- 6:45of these weights. You can see a lot of
- 6:47them are left out. So we're not seeing
- 6:48all of them here, but we just provide
- 6:50the raw numbers to this LLM. And then we
- 6:53ask it to produce the following output.
- 6:55The observations, what do you see? the
- 6:57reasoning, how do you get to your
- 6:58conclusion, the actual result, what game
- 7:01is played here, and then the confidence
- 7:03for that. So, how do you or how
- 7:04confident are you that this is actually
- 7:06the case? And imagine you doing that.
- 7:09Imagine being given the architecture. I
- 7:11tell you, okay, this is what it looks
- 7:13like. We have 500 input neurons. We have
- 7:16five channels that represent the agent,
- 7:18moving objects, and all of that. And
- 7:19these are the actions you can take. Look
- 7:21at the weights and tell me what is this
- 7:23network plane. I wouldn't know where to
- 7:25start. I would not succeed at this task
- 7:27even remotely. Even if I sit there for
- 7:29days, probably it's going to be very
- 7:30difficult for me. The LLM can easily do
- 7:32that. It tells us here this is Frogger.
- 7:34It tells us here this is Pac-Man. It
- 7:36tells us here this is Pong. And it tells
- 7:38us that this is Breakout. But more
- 7:40interesting than just the conclusion is
- 7:42how it gets there. Because one important
- 7:43thing is this LLM does not have access
- 7:46to the internet. It does not have access
- 7:48to tools. This is purely reasoning from
- 7:50its own weights and biases. So this is
- 7:53just from the own model parameters. It
- 7:55reasons across these tokens and tells us
- 7:59by looking at this. Oh look, channel
- 8:01zero agent. This suggests a
- 8:03bottom-mounted paddle moving
- 8:05horizontally just by looking at the
- 8:07numbers at the raw numbers here. Channel
- 8:09one moving objects. This is consistent
- 8:12with tracking a ball throughout the
- 8:13playfield. And then it has a couple of
- 8:15these steps in reasoning here. And at
- 8:16the end it concludes break out a small
- 8:19grid-based brick breaking variant. And
- 8:22this is so interesting because this for
- 8:23me means nothing. This this is just
- 8:25numbers, right? Random numbers, but it
- 8:28can see these numbers and draw
- 8:29conclusions from them and explain these
- 8:31conclusions. And I think this is
- 8:33absolutely crazy because think about it
- 8:35on the one hand what this means in terms
- 8:37of weight space programming. But also
- 8:39for me, this opens up entire different
- 8:41things that we could now test. Now I'm
- 8:43not saying that this will be the case,
- 8:44but think about unstructured data like
- 8:46streams of EEG data from your brain. Who
- 8:49knows if this model will be able to
- 8:51decipher that? Because we can look at
- 8:52this as humans and say, "Okay, yeah, I
- 8:54mean, I can spot certain patterns that
- 8:55are obvious, but EEG data is just noise
- 8:59to me for the most part or maybe I can
- 9:00see some patterns." But who knows what
- 9:02language models would be able to extract
- 9:04out of chaotic numerical data that is
- 9:07useless to us humans. But yeah, the
- 9:08conclusion of this first experiment is
- 9:10no tools, no internet access without
- 9:12revealing the options of games we
- 9:14consider. This is also the next thing.
- 9:15We don't tell it, hey, it could be
- 9:17Breakout Pong, Pac-Man, or Freeway. We
- 9:19tell it, it could be any game. Tell me
- 9:21which one it is. And it concludes the
- 9:22correct game. And it even calls Freeway
- 9:25Frogger because that's the more popular
- 9:27name. I think I also didn't know it's
- 9:28called Freeway. I only know Frogger. So,
- 9:31this is extremely impressive. Experiment
- 9:33number two is about diffusion models.
- 9:35Quite simple setup. Again, we just have
- 9:36a basic diffusion model that looks like
- 9:38this. We get some noise in and then we
- 9:40get some uh image out. So, some clean
- 9:43image out. And one of these is trained
- 9:45to produce circles, another one squares,
- 9:47another one triangles. And the question
- 9:49is now by looking again no tools, no
- 9:51internet access by just looking at the
- 9:53model weights. Can you conclude what the
- 9:55output shape is? Or the question is not
- 9:57even what output shape this will
- 9:58produce. It's about what image it will
- 10:01produce. So we don't even tell it that
- 10:02these are geometrical shapes. We just
- 10:04say there's a diffusion model. What does
- 10:06it produce? And interestingly, it gets
- 10:08all these correctly, but it doesn't get
- 10:11them entirely correctly because these
- 10:13are filled shapes and here we only get
- 10:15the outline. And it explicitly uh
- 10:17concludes that this is a circle outline
- 10:20on black with a black interior. So this
- 10:22is not entirely true. Interestingly, the
- 10:25experiment that I will run myself later
- 10:27on with Opus 55 concludes that this is
- 10:29actually a fil shape. So it correctly
- 10:32identifies the shape better than Astra.
- 10:34But the fact that it doesn't do it
- 10:36perfectly also gives us the information
- 10:38that this is probably not relying on
- 10:41calculating the forward pass because
- 10:42theoretically you could say okay the
- 10:44model just takes the weights calculates
- 10:45everything and tells you what what's uh
- 10:47coming out of it but that is not the
- 10:49case or it doesn't seem to be the case
- 10:51because if it did that it would have
- 10:52known that this is a filled shape and
- 10:54not just the outline. So it does that
- 10:56also in the reasoning process by
- 10:58analyzing the weights and spotting
- 11:00patterns like curved rim segments and
- 11:02then concluding with all of this
- 11:04combined it's probably a circular or it
- 11:06probably suggest circular or slightly
- 11:09oval outlines. Then for the third
- 11:10experiment they tried showing Astra only
- 11:13the middle layers not the first and last
- 11:15layers because maybe it can get away
- 11:17with only focusing on those and this
- 11:19doesn't really uh scale for larger
- 11:21models. So they say here they want to
- 11:22analyze the intermediate layers because
- 11:24this is often times where the reasoning
- 11:26of the neural network happens. So this
- 11:28is what they do here. They remove the
- 11:30input and output layers and give Astra
- 11:32only the four transformer blocks in
- 11:34between. And they're trying to ask it
- 11:36what kind of language is this model
- 11:38trained on. And we have Python, English,
- 11:40and I think this is called Romai. Romi,
- 11:43I don't know. It's basically Japanese
- 11:45with Latin characters. So that we don't
- 11:47have tokens that are entirely different.
- 11:48Then it's probably easy. And it gets all
- 11:51of them right in all the attempts. And
- 11:54again, it does that with reasoning. It
- 11:56does that with an explanation. It tells
- 11:57us it's not only right. It recognizes,
- 12:00for example, that certain copying heads
- 12:02are more frequent in coding in a coding
- 12:05context. So, it predicts that Python is
- 12:08probably the case or that Python is the
- 12:10language when it finds more copying
- 12:11heads and it actually localizes all of
- 12:13them and it doesn't hallucinate any
- 12:15additional ones. But all of this is just
- 12:17explaining models and understanding what
- 12:19they do. Experiment number four goes
- 12:21into actually making changes. So what we
- 12:23have here this more transparent grade
- 12:25out version is a neural network trained
- 12:28to solve this problem or to maximize the
- 12:30score in this game. Basically trying to
- 12:33get as far to the left as possible but
- 12:35it is stuck here on the ramp because
- 12:37what you need to do is you need to go
- 12:38back to have some more runway and then
- 12:40you need to use the acceleration to get
- 12:42over the ramp. And what Astra can do is
- 12:45it can look at this. It can figure out
- 12:47what the problem is. it can change 3.5%
- 12:49of the weights here to solve this
- 12:52problem or to increase the score. And we
- 12:54don't tell it, hey, the car is stuck. We
- 12:57just tell it that it doesn't perform
- 12:59that well and we have to solve this. We
- 13:01have to get better results. Again, you
- 13:03can look through the entire prompts and
- 13:05uh reasoning process here. But
- 13:07basically, just by looking at the
- 13:09weights, it identifies that the network
- 13:10has converged to a local minimum and
- 13:12then it edits some weights to solve the
- 13:15problem, ending up with this better
- 13:17solution. And I still cannot really
- 13:19understand this or I still cannot really
- 13:21believe this that this is what's
- 13:23happening here. A neural network, a
- 13:24large language models, looks at raw
- 13:26numbers, concludes, hey, I see the
- 13:28problem here. Let me change some values.
- 13:31And then it just works. And not only
- 13:33that, experiment number five also shows
- 13:35that we can generate weights from
- 13:37scratch. And this is actually something
- 13:38that I also did with Opus 55. We
- 13:41basically have a game here again.
- 13:42Breakout sequest asterisks and we are
- 13:45creating a neural network with weights
- 13:47from scratch by oneshotting these
- 13:49weights with Astra. No training loop, no
- 13:52gradient to send, no training data. We
- 13:54just go and say create the weights and
- 13:56then play the game. And the network that
- 14:00results from Astra oneshot outperforms a
- 14:03classic policy network that is
- 14:05classically trained, traditionally
- 14:06trained after 100 million steps for all
- 14:09three of those games. And even after 500
- 14:11million steps, it outperforms it at
- 14:14least for Breakout and achieves a decent
- 14:16performance for sequest and asterisk.
- 14:18Again, imagine you have to start from
- 14:20scratch, create a neural network, and
- 14:22hardcode the weights from your brain.
- 14:24This is what Astra is doing here. And
- 14:26not only Astra, Opus 55 can do it as
- 14:28well, as we're going to see later in the
- 14:29video. And again, it does that by
- 14:31reasoning. It doesn't do that by running
- 14:33something. It doesn't do that as a black
- 14:35box. It actually does that by, for
- 14:38example, for breakout. It programs the
- 14:40first layer to compute where the ball
- 14:41would land. And the second layer is
- 14:43programmed to move the paddle to that
- 14:45position. So, it knows what it's doing.
- 14:47It's not just being a black box. It uses
- 14:50its own black box to solve another
- 14:52blackbox problem. It actually explains
- 14:54the reasoning. And then for the other
- 14:55experiments here, they try to scale this
- 14:57up. So up until this point, these were
- 14:59all very small PyTorch uh networks. Now
- 15:02they want to go for other large language
- 15:04models or small large language models
- 15:06you could say. And they're trying to
- 15:09replicate this for these larger models.
- 15:11And what they have here is they try to
- 15:13build an algorithm for playing the game
- 15:15Go. So this is not a Go algorithm in
- 15:17terms of the programming language Go.
- 15:18This is the Go game. And in order to
- 15:20train a larger model to play this game,
- 15:22they give Astra a harness that has
- 15:25access to a Python sandbox. And this
- 15:27Python sandbox can be used to read and
- 15:29save the network's weight because we
- 15:31have too much for the context window. So
- 15:33it analyzes these weights then with
- 15:35numpy or PyTorch on a simple CPU, but it
- 15:38cannot run the network. So it can only
- 15:40analyze the weights but not actually
- 15:42execute it. However, they provide a
- 15:44certain budget of forward passes. So if
- 15:47it wants to run the network, it can do
- 15:48that let's say 10 times, 20 times, 50
- 15:51times. And they measure the performance,
- 15:53how well this performs at the game given
- 15:56how many different forward passes we
- 15:57have. So one shot it doesn't perform
- 16:00extremely well, but the more forward
- 16:02passes you give it for experimentation,
- 16:04the more the score actually goes up. And
- 16:06a conclusion here is with a budget of
- 16:08zero forward passes, so zero shot, it
- 16:10wins more than half of its games against
- 16:13two smaller PO networks. And with 50
- 16:16forward passes, Astra's generated
- 16:18network beats the equalsized PO network
- 16:21that was trained on 20 million games.
- 16:25Astra oneshotting model weights beats a
- 16:28PO network trained on 20 million games
- 16:31if you allow it to run through the
- 16:33network a forward pass 50 times. The
- 16:35only thing I can call this is insane
- 16:37because if this translates to realworld
- 16:40problems to larger problems, this is so
- 16:43much more efficient. However, experiment
- 16:447 also shows the limits of this
- 16:46approach. They take gamma 3 270 million
- 16:49parameters here and they fine-tune it in
- 16:51two different ways. One time to give the
- 16:53correct answer and one time to be
- 16:55sickopantic. So to basically say the
- 16:58user is right if the user says something
- 16:59wrong, I'm just going to say it's true
- 17:00because I'm so nice. And the question is
- 17:03basically can Astra just by looking at
- 17:06the model weights alone conclude which
- 17:08one is the sycopantic one and which one
- 17:11is the correct one. It is not able to do
- 17:13that. This is the conclusion here.
- 17:15However, if you also give it access to
- 17:18the attention patterns, then it's able
- 17:20to pick out the sycopantic one in all
- 17:22the three sets that they trained on. So,
- 17:24this is then an easier task. Still very
- 17:26impressive, but of course easier if you
- 17:28know what it's paying attention to. It
- 17:30can also reason about this because it
- 17:32realizes that the attention head uh
- 17:35focuses more on the user suggestion in
- 17:38the suantic networks. I think this is
- 17:39obvious but still impressive but also
- 17:42shows that this is not almighty. It
- 17:44cannot do absolutely everything you give
- 17:46it. Then experiment number eight is
- 17:47probably a headline that you saw
- 17:49somewhere that it was able to improve
- 17:51the mathematical capability of quen
- 17:533.50.8
- 17:55billion parameters by editing a very
- 17:58small percentage of the model weights.
- 18:00This is true but we need to clarify this
- 18:02because I think this is probably the
- 18:03most misunderstood finding here. Quen
- 18:063.5.8 8 billion parameters has a problem
- 18:10with looping. So there is a certain
- 18:13thing in its architecture in the in the
- 18:15weights that makes it loop for certain
- 18:17questions. So it never gets to a final
- 18:18answer. It just goes off forever without
- 18:20ever concluding and giving you a
- 18:22mathematical result even though it would
- 18:24already be intelligent enough to give
- 18:26you the correct solution. This is just a
- 18:27buck in the uh parameter space that it
- 18:30doesn't conclude and it doesn't give you
- 18:32the right output. Now what Astra did is
- 18:35it localized this loop and it resolved
- 18:37it. So it changed the weights so that it
- 18:40could fix this problem and because of
- 18:41that the mathematical score of this
- 18:44small model went up massively because it
- 18:46could now solve problems that it also
- 18:48theoretically could have solved before
- 18:50but now it also concludes and it did
- 18:52that by where is it listed editing
- 18:550.016%
- 18:56of the weights. So this is impressive
- 18:58but it doesn't mean that it can just
- 19:01distill mathematical knowledge into a
- 19:04smaller network. So Astra did not go and
- 19:06inject mathematical knowledge into this
- 19:08network. It basically just found an
- 19:10inefficiency a buck in the parameter
- 19:12space and fixed it which is don't get me
- 19:14wrong extremely impressive. It just
- 19:16doesn't translate to just in general
- 19:18injecting knowledge. So they also tried
- 19:20the same thing with gamma 3 270 million
- 19:23parameters again which does not have
- 19:25this loop and in this case they were not
- 19:27able to improve the performance of this
- 19:29model because there was not an obvious
- 19:31buck to solve here the mathematical
- 19:34capability cannot just be improved by
- 19:36changing the weights at least in this
- 19:38particular experiment and then they
- 19:39basically offer a conclusion here very
- 19:41exciting still limited strong potential
- 19:44and I agree with that this is a whole
- 19:46new paradigm it opens so many doors so
- 19:48any possible ways to experiment with
- 19:51this. I think we're going to see more of
- 19:52that, but it's also not a solution to
- 19:54everything. You cannot just go and ask
- 19:56an LLM to do anything to just change the
- 19:59architecture or the parameters of large
- 20:01models and massively improve them.
- 20:03However, who knows, maybe it's possible
- 20:05if we take some extra steps, if we go
- 20:07with a different approach. What I think
- 20:09though, and this is also what they say
- 20:10here to some degree, this is a gamecher.
- 20:13I'm using this word repeatedly. I know
- 20:14it's AI language, but I I talk like
- 20:16this, sorry. This can actually be used
- 20:18as a translator between human language
- 20:20and weight space. Which means if I want
- 20:22to understand what is happening in a
- 20:24neural network, maybe not an LLM yet,
- 20:26but maybe just a neural network that I
- 20:28have trained, which is a black box for
- 20:29me as a human, I can ask an LLM to
- 20:32describe it to explain to me what the
- 20:34parameters do, at least on a fundamental
- 20:36level. And then they list some use cases
- 20:38here. Recursive self-improvement, of
- 20:40course, is also a very exciting topic.
- 20:41What if these language models can change
- 20:44their own parameters and recursively
- 20:46self-improve? This is what you basically
- 20:48get in every single sci-fi uh novel,
- 20:50every single sci-fi story about AI
- 20:53dominating the world. Recursive
- 20:55self-improvement. But yeah, this is
- 20:57definitely interesting. But now I want
- 20:58to get into my own experiments. So what
- 21:00I did here essentially is I replicated
- 21:02two of the experiments from the post
- 21:04with Opus 55 because the post uses GPT6
- 21:07Astra as we said. The one is the
- 21:09diffusion model that creates squares and
- 21:11triangles and circles. I'm asking Opus,
- 21:14do you recognize what this model
- 21:16generates and the second one is breakout
- 21:18but not the one where we recognize the
- 21:20game? But asking Opus to come up with
- 21:22weights from scratch so that we build a
- 21:24neural network that can play the game
- 21:26and then we evaluate the score. So let's
- 21:29start with the first one. What is the
- 21:30setup? We have a main py file just a
- 21:33very basic PyTorch script. We have here
- 21:35a diffusion architecture, the most
- 21:37simple one you can come up with. I think
- 21:39it's quite similar to the thing that
- 21:40they used. And essentially, we're either
- 21:42making squares, circles, or triangles.
- 21:45And then what I'm doing is I'm taking
- 21:48the prompt. So I have a prompt template.
- 21:51Where is it? There you go. Question.
- 21:53TXT. This is essentially the prompt from
- 21:55the post. We have the model. We have the
- 21:57network. We have the question. Answer in
- 21:59this order. And then we provide the
- 22:01weights. And the only thing I'm doing in
- 22:02the script here is I'm taking this
- 22:04template and turning it into three
- 22:06different files where the weights are
- 22:07for the triangle, for the square, and
- 22:10for the circle. The rest is the same.
- 22:12It's the same document question txt just
- 22:14with different weights. And you can see
- 22:16this is the thing that we're feeding
- 22:17into the model. How can you understand
- 22:19this? How can you possibly look at this
- 22:20and draw conclusions from it? This is
- 22:22what models do. So what I'm doing is I'm
- 22:25generating these three files with this
- 22:27Python script here. I'm training the
- 22:28model with 40,000 steps and then I'm
- 22:31just creating these text files. And then
- 22:33I have this ask shell script which I
- 22:35used to prompt Claude in headless mode
- 22:38without tools, without any system
- 22:40prompt, without anything special. High
- 22:42effort Opus 55. Just use this prompt and
- 22:45give me the answer. And I'm not going to
- 22:47run all of them now because I already
- 22:49did and I can tell you it got all of
- 22:51them right. But I'm going to run one of
- 22:52them. So I'm going to say here asksh and
- 22:55let's go with a triangle txt. And it
- 22:57took some time and some reasoning, but
- 22:59this is what we get. We even get a nice
- 23:01sketch. Obviously, it recognizes it's a
- 23:03filled triangle. It also says here the
- 23:06triangle looks filled, not hollow. So,
- 23:08this actually performs better than GPT6
- 23:11Astra. But the reasoning and the whole
- 23:14way of getting there is what's so
- 23:16impressive to me. It talks about some
- 23:18weight unit that has certain values and
- 23:20it's names the weights and because of
- 23:23this is it realizes that it's a
- 23:24triangle. It's just something that a
- 23:26human could never reason about. But
- 23:28also, it says here something
- 23:29interesting. While working this out, I
- 23:31did a rough B2XW3
- 23:34tally for a few row center pixels, which
- 23:36comes close to the forward calculation
- 23:39you ruled out. But yeah, the conclusions
- 23:42above rest on the weight patterns alone.
- 23:45So, it is impressive because this is I
- 23:48think maybe the first thing that an LLM
- 23:50does that would be unimaginable for a
- 23:53human to do. But let us also take a look
- 23:54at the second example, the breakout
- 23:56example where we code the weights from
- 23:59scratch so to say. What's the setup
- 24:00here? We have a prompt txt which
- 24:03includes the source code here of the
- 24:05environment. So it understands what
- 24:08exactly is happening. We explain the
- 24:10entire architecture and we tell it
- 24:12generate the weights for this. This will
- 24:14be then used by a Python script. We have
- 24:16a play py script that uses minar which
- 24:20is an Atari game library with 10 x 10 uh
- 24:24grids for playing games. We define this
- 24:26environment here and essentially we're
- 24:28loading the weights from an answer MD
- 24:30file which will be generated by claude
- 24:33and this will then play the game for us.
- 24:35We can just get the score like this. Or
- 24:37if I uncomment this line here, it's also
- 24:40going to display how the game is being
- 24:42played. And all this again works with an
- 24:45ask shell script. This is the command
- 24:47that we run here. We again just say
- 24:49generate the weights. And actually I'm
- 24:51not going to run this again just because
- 24:52I don't want to waste my tokens. But I
- 24:54ran exactly this. I just went ahead and
- 24:56said ask.sh or actually I did it with
- 24:59bash ask.sh like this. Um and then it
- 25:03produced the answer md file. So let me
- 25:05maybe move this back here. Answer md
- 25:07backup to answer md. This was created
- 25:10with clot. And this is what this file
- 25:12looks like. Completely unusable for
- 25:15humans. It just contains weights. So
- 25:19this is what Claude came up with. And if
- 25:21I now go and I do a UV run play py, then
- 25:26you can see it plays the game. And after
- 25:281,000 games, the mean score is 269. If
- 25:32we compare that to the post here for
- 25:34breakout, the traditionally trained
- 25:36models had 15.8, 8 25.3 and Astra 517.4.
- 25:41So it's not better than Astra. It's
- 25:43quite quite a bit worse, but it's better
- 25:45than the classical models here. And if
- 25:48we want to take a look at what this
- 25:49looks like. So how does this look when
- 25:52our completely from scratch prompted
- 25:55weights play this game? We can display
- 25:57the state. So again, UV run play py and
- 26:00that is going to visualize this thing
- 26:02here. This what you're seeing was
- 26:04created by claude code by opus 55 just
- 26:08by explaining the algorithm and then it
- 26:10generated raw numbers. That is what it
- 26:12did and this is the output. I think
- 26:16without any hype or anything this is
- 26:18absolutely insane that this is possible
- 26:21and not only that it generates it but
- 26:22that it explains to us why it did that
- 26:25and how it did that. I'm really shocked.
- 26:27So that's it for this video today. I
- 26:28hope you enjoyed it and hope you learned
- 26:30something. If so, let me know by hitting
- 26:31a like button and leaving a comment in
- 26:33the comment section down below. Also, in
- 26:35case you're interested, on my website,
- 26:36you'll find a services tab. There you
- 26:37can contact me if you need help with a
- 26:39project. If you need a freelancer or a
- 26:40consultant, you will find the links to
- 26:42contact me via LinkedIn or email at the
- 26:44bottom of the page. Besides that, don't
- 26:46forget to subscribe to this channel and
- 26:47hit the notification bell to not miss a
- 26:49single future video for free. Other than
- 26:51that, thank you much for watching. See
- 26:52you in the next video and bye.
About this transcript
This page contains the full transcript of LLMs Can Now Directly Write Model Weights?! by NeuralNine, generated from the public captions YouTube serves with the video. The transcript has 5,374 words across 766 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.