I got my code 4x faster with the Claude Fable 5 (before the US government took it down) — Transcript
Full transcript
- 0:00In the past few weeks, we have all heard
- 0:02about Claude 3
- 0:03finding security vulnerabilities in
- 0:05source code, which is the main reason
- 0:07why Anthropic was hesitating for
- 0:09releasing this model. So, as an aside,
- 0:11before I move on, I got to say that
- 0:13right before I started editing this
- 0:14video, I found out that Anthropic has
- 0:17suspended the Claude 3 model. And the
- 0:20reason apparently is the US government
- 0:22claiming that this model has some
- 0:24national security problems. Now, if you
- 0:26ask me, this is more hype than truth
- 0:28because we all know that Intel couple of
- 0:30weeks, all other companies, including
- 0:32Chinese AI companies, are going to
- 0:35release a similar model that can do
- 0:37this. So, I'm not sure if suspending
- 0:39Fable 5 could have some real impact. But
- 0:42anyways, back to the video. So, now that
- 0:44we have Fable 5 model, it got me
- 0:46thinking, what if I set it loose on my
- 0:49own code base? But not to find security
- 0:51vulnerabilities because, you know, my
- 0:52code is always perfect, but for
- 0:54optimizing my code base to improve its
- 0:56speed. Now, in case this is your first
- 0:58time on this channel, my code base is
- 1:01about an algorithmic trading framework
- 1:03called Jesse. So, that's exactly what I
- 1:05did. I let it loose overnight, so it
- 1:07kept working for like 8 hours straight
- 1:10and burned a lot of tokens, but at the
- 1:12end, it was able to improve the results
- 1:14of backtest from two to four and
- 1:16sometimes five times faster. And
- 1:19improved backtesting speed can lead to
- 1:21improved optimization speed and Monte
- 1:23Carlo simulations. It can even improve
- 1:25the speed of our workflow for machine
- 1:27learning stuff and maybe even for
- 1:29reinforcement learning. So, anyways, let
- 1:31me show you the comments of Fable 5
- 1:33model and to show you examples of how
- 1:35much faster things got.
- 1:38Now, I cannot show you the exact prompt
- 1:40that I used because there's a special
- 1:42kind of setup and there are things that
- 1:44I need to keep private. But I will tell
- 1:46you that when I was giving it the
- 1:48prompt, I asked it to work in a loop and
- 1:51that is to keep trying to improve the
- 1:52performance, run tests, and ensure that
- 1:55the results of the tests are exactly the
- 1:57same as before because I did not want to
- 1:59break anything in the API of the app. I
- 2:02did not want to bother my users to do
- 2:04some sort of migration just because of
- 2:06performance boosts. I also asked it to
- 2:08generate a report file for me once it
- 2:10was done and that's exactly what it did.
- 2:12So you see it generated a table for me
- 2:14and here I can see the test that it took
- 2:16and then we have the baseline which is
- 2:18the time it took for each test to finish
- 2:21before the new implementation and then
- 2:23after the round one, round two and round
- 2:26three. And here we can see how many
- 2:28times it got faster. So in this case for
- 2:30example, by the end it was 2.46 times
- 2:33faster. In this one it was 4.51%
- 2:36faster and the rest of the results are
- 2:38pretty similar and in total everything
- 2:41got 2.88 times faster. And then it
- 2:44explained how it ensured the correctness
- 2:46was guaranteed and things like that.
- 2:48Needless to say also the project has 500
- 2:51tests. So the fact that we are now
- 2:53getting a green pass on all of those
- 2:55tests is reassuring and if it wasn't
- 2:58because of those things, I probably
- 2:59would not have done such a huge
- 3:01refactor. So in front of me I have this
- 3:03typical uh strategy of Jesse. I have
- 3:06chosen Binance Perpetual Futures as the
- 3:08exchange. The route is USDT. The time
- 3:11frame is 30 minutes and this is the
- 3:14strategy. And for the duration I have
- 3:15chosen approximately 4 and 1/2 years.
- 3:18And to keep everything fair, I have kept
- 3:21everything the same. The only thing that
- 3:23is different is that the first two have
- 3:26the fast mode disabled and the second
- 3:28two have the fast mode enabled. So
- 3:31before I show you the new implementation
- 3:33or the comments of fable five, let's run
- 3:36this strategy and also let's run it
- 3:39using the fast mode being enabled so
- 3:41that I can show you guys how fast things
- 3:43are. So you see this is already too
- 3:45fast. Like for most of you guys, you
- 3:47probably don't even care about this and
- 3:50while that was going the fast mode was
- 3:52already done. So, the fast mode took
- 3:543.19 seconds
- 3:56and the one without the fast mode took
- 3:5812.51 seconds. And the result of them
- 4:01you see is exactly the same thing. So,
- 4:04they are identical. Now, let's switch
- 4:06from the master branch into the
- 4:08performance back test branch. And as you
- 4:10can see, we have the comments of the
- 4:12Cloud Fable 5 model here. So, if I
- 4:15scroll down, it's made approximately 17
- 4:18or 22 commits, I didn't really count.
- 4:20And all of them are a small things, so
- 4:23they're not really big, but they kept
- 4:25accumulating together. And the one thing
- 4:27that is really outstanding out is the
- 4:30usage of the Jesse Rust library. Now, in
- 4:33case you're not familiar, Jesse Rust is
- 4:35our very own built-in library and we use
- 4:38it in order to move some of Jesse's
- 4:40built-in codes into Rust, which we all
- 4:43know is like the fastest option out
- 4:45there. And then we just import it as a
- 4:46simple function inside the code base.
- 4:48And one of the main things that Fable 5
- 4:50did is that it took more advantage of
- 4:53Rust and it integrated those code inside
- 4:56the code base. Now, the framework is
- 4:57open source, so if you want to check out
- 4:58the comments in more details, feel free
- 5:00to do so on our GitHub. All right,
- 5:02moving back, now let's run the same
- 5:04simulations, but this time using this
- 5:07new optimized code. So, let's run this
- 5:09one and this one which also has the fast
- 5:11mode on.
- 5:12Now, I'm not even going to fast forward
- 5:14the video just so you guys can see how
- 5:16fast it is. And if I scroll down, you
- 5:18see it took 1.98 seconds instead of 3.19
- 5:23seconds. So, this is almost the double.
- 5:25And for the one without the fast mode,
- 5:27so it used to take 12.51 seconds, but
- 5:31now it only took 4.24 seconds. So, this
- 5:34is almost three times faster. Now, in my
- 5:37other tests, it was sometimes up to four
- 5:39times faster. So, this isn't even the
- 5:41maximum gain that I saw.
- 5:43And by the way, I have not made an
- 5:44official release about this yet. So, if
- 5:46you want to use the code that I just
- 5:48showed you guys, you need to install
- 5:50just it from the source code, and you
- 5:52need to check out to this branch. Or,
- 5:54you could just wait for me to make an
- 5:55official release about it soon. Now,
- 5:57this was a short and different kind of
- 5:59video. I just wanted to share my
- 6:01progress with you guys because I was
- 6:02really excited about this performance
- 6:04boost that we just got. Now, if you
- 6:05enjoyed the video, or if you want to
- 6:07watch my strategy tutorials, which I
- 6:09keep releasing on this channel, make
- 6:11sure that you're subscribed and hit the
- 6:13bell button so you can be notified as
- 6:15soon as possible. Thank you so much for
- 6:16watching. I'll see you in the next one.
About this transcript
This page contains the full transcript of I got my code 4x faster with the Claude Fable 5 (before the US government took it down) by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 1,250 words across 172 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 translate the transcript into 100+ languages.
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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.