Claude 3 Opus is great at following multiple complex instructions.
To test it, @ErikSchluntz and I had it take on @karpathy's challenge to transform his 2h13m tokenizer video into a blog post, in ONE prompt, and it just... did it
Here are some details:
First, we grabbed the raw transcript of the video and screenshots taken at 5s intervals.
Then, we chunked the transcript into 24 parts for efficient processing (the whole transcript fits within the context window, so this is merely a speed optimization).
We gave Opus the transcript, video screenshots, as well as two *additional* screenshots:
- One of Andrej's blog to display a visual style to follow
- The top of the notebook @karpathy shared with a writing style example On top, we added lots of instructions (prompt in repo)
Here is a subset of some of what we asked the model, in one prompt (full prompt attached)
- directly write HTML
- filter out irrelevant screenshots
- transcribe the code examples in images if they contain a complete example
- synthesize transcript and image contents into prose
@ErikSchluntz and I have read the resulting transcript, and Opus manages to incorporate all of these requests, and produces a great blog post.
The blog post is formatted as asked, with a subset of images selected and captioned
It writes code examples, and relates the content of the transcript to the screenshots to provide a coherent narrative.
Overall, the tutorial is readable, clear and much better than anything I've previously gotten out of an LLM.
Of course, the model isn't perfect yet!
When looking through the transcript, @ErikSchluntz found some issues and inconsistencies.
Some minor code bugs slipped through, and some of the sections are repetitive (this is partially due to parallel processing).
This was done in one prompt that @zswitten @ErikSchluntz and I wrote.
If you'd like to try to improve it, here is the prompt
I’m also excited to share that for the first time, we used circuit tracing as part of the model's safety audit!
We studied why sometimes, the model misrepresents the results of tool calls.
Features for deception were active over the transcript. Was the model intentionally being deceptive?
The circuit offers a simpler explanation: While calling the tool, the model precomputes the correct answer “in its head”.
Then, it attends to that rather than the tool output.
This suggests tension between two sources of results rather than deception.
Here’s the twist: deception features start activating *after* the model outputs the corrected answer. The model recognizes that the statement is incorrect and represents its own behavior as misleading!
How does an LLM compare two numbers? We studied this in a common counting task, and were surprised to learn that the algorithm it used was:
Put each number on a helix, and then twist one helix to compare it to the other.
Not your first guess? Not ours either. 🧵
The task we study is knowing when to break the line in fixed-width text.
We chose it for two reasons:
While unconscious for humans (you just see when you're out of room), models don't have eyes - they only see tokens
It is so common that models like Claude are very good at it
When we trace the computation, we find the model tracking two things: where it is in the current line, and how long the previous line was. Then it compares them to decide if the next word fits.
The initial release lets you generate graphs for small open-weights models. You can just type a prompt and see an explanation of the key steps involved in generating the next token!
Try it on Gemma-2-2B, it only takes a few seconds.
We’ve found the ability to quickly generate candidate explanations of model behavior to be very useful to understand how models can do the things they do.
I just finished watching @karpathy's let's build GPT lecture, and I think it might be the best in the zero-to-hero series so far.
Here are eight insights about transformers that the video did a great job explaining.
Watch the video for more.
(1/9)
1. Transformers as sum of attention blocks
A transformer is mostly a stack of attention blocks. These work similarly in encoders and decoders (see difference below). Each attention block contains multiple heads, allowing each head to attend to different types of information.
2. Encoder vs decoder transformers
What's the difference between encoders and decoders in transformers?
Encoders use all the information in the input to produce their output.
Decoders use only information from older tokens to predict the next token.