00:00 Fast Anything 的工作方式与适用目标
Fast Anything 是安装在电脑上的免费工具,可扫描应用并定位最慢的部分,再让 AI 仅将该部分改写为 Rust,之后检查新旧代码是否给出相同答案,并保留旧代码作为备份。它适用于 Python、JavaScript、Go、Java 等语言,重点是优化计算量大、重复执行且结果稳定的任务。视频比较 Claude Code、Nebius 云端模型和本地模型,提出的问题是免费模型能否达到付费工具的效果。
Mervin Praison · 10:17
run an ai model for free.
免费运行 AI 模型。
fast anything makes your app faster.
Fast Anything 能让你的应用运行得更快。
over 5,000 stars on github in 9 days.
9 天内在 GitHub 上获得了超过 5,000 颗星。
i tested 3 ai models with it.
我用它测试了 3 个 AI 模型。
claude code, a paid tool, made my app 128 times faster.
付费工具 Claude Code 让我的应用快了 128 倍。
a big model on nebius for half a cent made my app 64 times faster.
在 Nebius 上用一分钱的一半运行的大模型,让我的应用快了 64 倍。
and a free model on my laptop made my app 21 times faster.
而在我的笔记本电脑上运行的免费模型,让我的应用快了 21 倍。
so is free good enough?
那么,免费的够用吗?
Today you'll make your own app faster step by step.
今天,你将一步步让自己的应用运行得更快。
Here's what you'll see.
接下来你会看到这些内容。
First, what fast anything is.
首先,介绍 Fast Anything 是什么。
Step one, run the slow app.
第一步,运行这个缓慢的应用。
Step two, find the slow part.
第二步,找出运行缓慢的部分。
Step three, make it faster with Claude code.
第三步,用 Claude Code 提升速度。
Step four, make it faster with a big low cost model on Nebius.
第四步,用 Nebius 上低成本的大模型提升速度。
Step five, make it faster with a free model on your laptop.
第五步,用笔记本电脑上的免费模型提升速度。
Step six, compare all three side by side.
第六步,把这三种方式并排比较。
Then the settings you can change.
然后介绍可以更改的设置。
and where it helps.
以及它在哪些地方能派上用场。
that's exactly what we'll see today.
这正是我们今天要看的内容。
before that, i regularly create videos about artificial intelligence on my youtube channel.
在此之前,我经常在我的 YouTube 频道上制作关于人工智能的视频。
so do subscribe and click the bell icon to stay tuned.
记得订阅并点击铃铛图标,及时获取更新。
and make sure you click the like button so this video can be helpful for many others like you.
也别忘了点击点赞按钮,让这段视频能帮助更多像你一样的人。
nebius sponsored this video.
本视频由 Nebius 赞助。
in this video, we build a small ai agent.
在这段视频中,我们会构建一个小型 AI 智能体。
nebius has a certification that proves you can build agents.
Nebius 提供一项认证,证明你具备构建智能体的能力。
it's called agentic ai builder.
它叫作 Agentic AI Builder。
the regular price is $100.
原价是 100 美元。
with code mervin 2026, it's free.
使用代码 mervin 2026,即可免费获得。
you learn to build agents, run and train ai models, and use them in real apps.
你将学习如何构建智能体、运行和训练 AI 模型,并在实际应用中使用它们。
i'll show you more later in this video.
我会在这段视频后面详细介绍。
the link is in the description.
链接在简介中。
so what is fast anything?
那么,Fast Anything 是什么?
it's a free tool you install on your computer.
它是一款可以安装在电脑上的免费工具。
one developer made it.
它由一名开发者制作。
it finds the slowest part of your app, then an ai rewrites only that part in rust.
它会找出应用中最慢的部分,然后让 AI 只用 Rust 重写那部分。
rust is a much faster coding language.
Rust 是一种速度快得多的编程语言。
then it checks that you still get the same answers as before.
接着,它会检查你得到的结果是否仍与之前相同。
why do you need it?
为什么需要它?
python is easy to write, but it's slow at big, repeated jobs.
Python 编写起来很简单,但处理大型、重复性的任务时速度很慢。
it works with python, javascript, go, java, and more.
它支持 Python、JavaScript、Go、Java 等更多语言。
what makes it different from asking ChatGPT to rewrite your code?
它与让 ChatGPT 重写代码有什么不同?
it checks every answer, and it keeps your old code as a backup.
它会检查每个答案,并保留你的旧代码作为备份。
and you choose which ai writes the new code.
而且你可以选择由哪个 AI 来编写新代码。
that's what we test today.
这就是我们今天要测试的内容。
which one wins?
谁会胜出?
now step one, run the slow app.
现在,第一步,运行这个缓慢的应用。
first, the example we use in this whole video.
首先,介绍一下我们在整段视频中使用的示例。
think of a shop with 700 customers.
想象一下,有一家店有 700 名顾客。
some names were typed twice with a small mistake, like matteo esposito and matteo esposito, or noah miller and noah messler.
有些姓名被重复输入了,而且带有小错误,比如 Matteo Esposito 和 Matteo Esposito,或者 Noah Miller 和 Noah Messler。
these are the same person.
这些其实是同一个人。
my app finds these duplicates.
我的应用会找出这些重复项。
how?
怎么做到的?
it compares every name with every other name.
它会将每个姓名与其他所有姓名进行比较。
Letter by letter.
逐字母比较。
seven hundred names means about two hundred and forty five thousand comparisons.
700 个姓名意味着大约要进行 245,000 次比较。
That's why it's slow.
所以它运行得很慢。
Here's the code.
这是代码。
Clean each name.
清理每个姓名。
Compare every pair of names.
比较每一对姓名。
if two names differ by two letters or less, mark them as a duplicate.
如果两个名字相差不超过两个字母,就将它们标记为重复项。
now run it.
现在运行它。
open the terminal.
打开终端。
that's the window where you type commands.
就是那个可以输入命令的窗口。
type python, then the file name, and press enter.
输入 python,然后输入文件名,再按回车。
it found 822 possible duplicate pairs.
它找到了 822 对可能重复的项目。
it took almost 5 seconds.
它花了将近 5 秒。
so now we know how slow it is.
所以现在我们知道它有多慢了。
but which part is slow?
但到底是哪部分慢?
now step two, find the slow part.
现在进行第二步,找出慢的部分。
first, install fast anything with one command.
首先,用一条命令安装 fast anything。
then type fast anything scan, and then the same command that starts your app.
然后输入 fast anything scan,再输入启动应用的同一条命令。
the scan runs your app and times every part of it.
扫描会运行你的应用,并测量每个部分耗时。
look at the top row.
看最上面那一行。
one part takes almost all the time, comparing two names.
有一部分几乎占用了全部时间:比较两个名字。
so we only need to make that one part faster.
所以我们只需要加快这一部分。
but who writes the fast code?
但谁来写快速代码?
now step three, make it faster with claude code.
现在进行第三步,用 Claude Code 加快它。
claude code is anthropic's paid coding tool.
Claude Code 是 Anthropic 推出的付费编程工具。
type fast anything go, then agent claude, then your app command.
输入 fast anything go,然后输入 agent claude,最后输入你的应用命令。
fast.
很快。
anything gives claude code one job.
给 Claude Code 一个任务。
rewrite the slow part in rust.
用 Rust 重写运行缓慢的部分。
then it runs the old code and the new code on the same inputs.
然后,它会使用相同的输入运行旧代码和新代码。
33 out of 33 answers matched.
33 个答案全部匹配。
my app went from four and a half seconds to less than a tenth of a second.
我的应用从四秒半缩短到不到十分之一秒。
that's 128 times faster.
这快了 128 倍。
so the paid tool is very fast.
所以,付费工具非常快。
but can a cheaper model do it?
但更便宜的模型能做到吗?
Now step four, make it faster with a big, low-cost model on Nebius.
现在进入第四步:使用 Nebius 上的大型低成本模型让它运行得更快。
The agent setting can be any small program, so I wrote a small helper in Python.
代理设置可以是任何小程序,所以我用 Python 写了一个小助手。
Open the file, import OpenAI.
打开文件,导入 OpenAI。
OpenAI's works with most AI models.
OpenAI 的接口适用于大多数 AI 模型。
Point it to the model.
指定模型。
You give two things: a web address and a model name.
你需要提供两样东西:一个网址和一个模型名称。
Here the address is Nebius, an AI cloud.
这里的网址是 Nebius,一个 AI 云平台。
The model is GLM 5.3, a big open model.
模型是 GLM 5.3,一个大型开源模型。
Open means anyone can download it.
开源意味着任何人都可以下载它。
Read the job, ask the model for the code, save it, then run the Rust checker.
读取任务,让模型生成代码,保存代码,然后运行 Rust 检查器。
If there's a mistake, send it back to the model to fix.
如果有错误,就把它发回模型让模型修复。
you'd expect a big model to just write the code.
你会以为,大模型只要直接写代码就行了。
one problem.
有个问题。
at first, the model sent back nothing.
一开始,模型什么也没返回。
it spent all its time thinking.
它把时间全花在思考上了。
the fix is one setting.
解决办法只需改一个设置。
reasoning effort, low.
推理力度:低。
then type fast anything go, agent, and your helper.
然后输入“fast anything go”,智能体和你的助手就启动了。
33 out of 33 answers matched on the first try.
33 个答案中,33 个都一次就匹配成功。
my app went from almost 5 seconds to 74 milliseconds.
我的应用耗时从将近 5 秒降到了 74 毫秒。
that's 64 times faster.
快了 64 倍。
i ran it 4 times.
我运行了 4 次。
every run was between 29 and 73 times faster.
每次运行都快了 29 到 73 倍。
one rewrite cost me about half a cent.
重写一次代码花了我大约半美分。
Nebius sponsored this part of the video.
本视频这一部分由 Nebius 赞助。
Nebius runs open models in the cloud.
Nebius 在云端运行开放模型。
Its service is called Token Factory.
它的服务叫 Token Factory。
GLM 5.3 is too big for most laptops.
GLM 5.3 对大多数笔记本电脑来说都太大了。
So I ran it on Token Factory.
所以我在 Token Factory 上运行它。
I only changed the web address.
我只改了网址。
My helper sends mistakes back to the model to fix, so it's already a small agent.
我的助手会把错误发回给模型修复,所以它本身已经算是一个小型智能体了。
In the Nebius course, you build a full one.
在 Nebius 的课程中,你会构建一个完整的模型。
The course is free and takes about four hours.
课程免费,大约需要四个小时。
Inference means running a model.
推理就是运行模型。
Fine-tuning means training a model more on your own examples.
微调就是用你自己的示例进一步训练模型。
The exam covers agents, inference, fine-tuning, and production operations.
考试涵盖智能体、推理、微调和生产运维。
it's online and proctored.
考试在线进行,并有监考。
that means it's watched, so nobody can cheat.
也就是说考试会受到监控,所以没人能作弊。
it takes 60 minutes.
考试时长为 60 分钟。
pause it, and you get a digital badge on credly, a site for badges, and $50 of token factory credits.
暂停一下,你就能在 Credly(一个徽章网站)获得数字徽章,以及价值 50 美元的 Token Factory 额度。
here's the code again, mervin2026.
代码再说一遍:mervin2026。
it works until december 31st.
这个代码有效期至 12 月 31 日。
that's m-e-r-v-i-n-2026.
拼写是 m-e-r-v-i-n-2026。
the link is in the description.
链接在描述里。
so a big model runs well without a big computer.
这样,大模型就能在没有高性能电脑的情况下顺畅运行。
but what about a model on your own laptop?
但如果要在你自己的笔记本电脑上运行模型呢?
Now step five, make it faster with a free model on your laptop.
现在进入第五步:在笔记本电脑上用免费模型,让它运行得更快。
Go to ollama.
访问 Ollama。
com and download Ollama.
com 并下载 Ollama。
It's a free app that runs AI models on your computer.
这是一款免费应用,可以在你的电脑上运行 AI 模型。
Then type ollama pull, then the model name.
然后输入 ollama pull,再输入模型名称。
Here, ollama pull Qwen 3.5 9B.
这里,运行 ollama pull Qwen 3.5 9B。
In the helper, change only two settings.
在辅助工具里,只改两个设置。
The web address becomes localhost, port 11434.
网址改为 localhost,端口 11434。
That's Ollama on your own laptop.
这就是运行在你自己笔记本上的 Ollama。
The model name becomes the same Qwen model.
模型名称改为同一个 Qwen 模型。
Qwen is a free model from Alibaba.
Qwen 是阿里巴巴推出的免费模型。
then run the same go command with your helper.
然后用你的辅助工具运行同一条 go 命令。
this time the rust checker found mistakes twice, my helper sent them back, and the model fixed them.
这次,Rust 检查器两次发现错误,我的辅助工具把错误反馈回去,模型修复了它们。
the third try passed, 33 out of 33 answers matched.
第三次尝试通过了,33 个答案中有 33 个匹配。
my app was 21 times faster, and it cost nothing.
我的应用快了 21 倍,而且完全免费。
so even a small free model gets there, so which one should you use?
所以,即使是小型免费模型也能做到。那么你该用哪一个呢?
Now step six, compare all three.
现在来到第六步:比较这三种方案。
I made a small app to show the results.
我做了一个小应用来展示结果。
The code is in the description.
代码在简介里。
Claude code, 128 times faster.
Claude Code,速度快了 128 倍。
The big model on Nebius, 64 times faster on its first run.
Nebius 上的大模型,首次运行速度快了 64 倍。
The free model on my laptop, 21 times faster.
我笔记本上的免费模型,速度快了 21 倍。
All three passed every check.
三种方案都通过了所有检查。
Click run and you see the old code and the new code side by side.
点击运行,就能看到旧代码和新代码并排显示。
Before it takes eight seconds, after less than a tenth of a second, same answer both times.
之前要花 8 秒,之后不到 0.1 秒,两次得到的答案相同。
So can free get close?
所以 Free 能接近吗?
Not quite, but it's free and every answer is still right.
还不完全行,但它是免费的,而且每个答案都仍然正确。
So use Claude code if you have it.
所以如果你有 Claude Code,就用它。
If not, a free model still gives you a big speed up.
如果没有,免费的模型也能大幅提速。
Now the settings you can change.
现在来看看可以更改的设置。
Agent.
代理。
Choose who writes the code.
选择由谁来编写代码。
Claude, Codex, OpenAI's coding tool, or your own helper.
Claude、Codex(OpenAI 的编程工具),或者你自己的助手。
Bench.
基准测试。
Time the whole app old versus new.
比较整个应用新旧版本的运行时间。
Report.
报告。
Make a short summary with a picture.
生成一份带图片的简短摘要。
Disable.
禁用。
Turn the fast code off with one command.
用一条命令关闭快速代码。
Doctor, check that everything is installed.
Doctor,检查是否已全部安装。
Where does it help?
它在哪些地方有帮助?
On any slow job that gives the same answer for the same input.
适用于任何输入相同就会得到相同答案的慢速任务。
Code that reads files or uses random numbers is skipped.
读取文件或使用随机数的代码会被跳过。
That code stays in Python.
这类代码会继续留在 Python 中。
So make the slow part fast, not the whole app.
所以只加速慢的部分,而不是整个应用。
Here's the recap.
这是回顾。
Step one, run the slow app.
第一步,运行速度慢的应用。
Step two, find the slow part.
第二步,找出速度慢的部分。
Step three, Claude code.
第三步,使用 Claude 编程。
Step four, a big model on Nebius.
第四步,在 Nebius 上使用大型模型。
Step five, a free model on your laptop.
第五步,在你的笔记本电脑上使用免费模型。
Step six, compare.
第六步,进行比较。
Every answer stayed the same.
每个答案都保持不变。
so make only the slow part fast and let the checks prove it.
所以只需让速度慢的部分变快,并让检查结果证明这一点。
and for the nebius certification, use code mervin2026.
至于 Nebius 认证,请使用代码 mervin2026。
the link is in the description.
链接在描述中。
do let me know in the comments below what you think about this.
请在下方评论区告诉我你对此的看法。
considering you already liked this video, you might also like the video shown above.
既然你已经喜欢这段视频了,也许你还会喜欢上方显示的那段视频。
i'll see you there.
我们在那里见。
Fast Anything 会扫描应用,找出耗时最多的代码,再让所选 AI 将适合优化的部分改写成 Rust,并用旧代码的结果检查新代码。示例程序比较 700 个客户姓名,找出 822 组可能重复项,原本约需 5 秒。三种模型方案都通过 33 项结果检查:Claude Code 提速 128 倍,Nebius 上的 GLM-5.3 首次提速 64 倍,本地免费的 Qwen 3.5 9B 提速 21 倍。视频还演示安装、扫描、改写和对比流程,并说明适用范围:相同输入应得到相同答案的慢任务更适合优化;涉及文件读取或随机数的代码会被跳过。
Fast Anything 是安装在电脑上的免费工具,可扫描应用并定位最慢的部分,再让 AI 仅将该部分改写为 Rust,之后检查新旧代码是否给出相同答案,并保留旧代码作为备份。它适用于 Python、JavaScript、Go、Java 等语言,重点是优化计算量大、重复执行且结果稳定的任务。视频比较 Claude Code、Nebius 云端模型和本地模型,提出的问题是免费模型能否达到付费工具的效果。
示例程序要从 700 名客户中找出姓名略有拼写差异的重复记录,例如 Matteo Esposito 的重复项和 Noah Miller 与 Noah Messler。程序逐对比较姓名,并在差异不超过两个字母时标记为重复,因此总计约有 24.5 万次比较。原始运行找到 822 组可能重复项,耗时接近 5 秒。安装 Fast Anything 后运行 scan 命令,它会执行应用并计时各部分;结果显示姓名两两比较几乎占据全部运行时间,因此只需优化这一段。
运行 fast-anything go 并指定 Claude Code 后,工具让它把慢速部分改写为 Rust,再用相同输入运行新旧代码。33 项结果全部匹配;应用耗时从约 4.5 秒降到 35 毫秒以内,提速 128 倍。这个结果说明付费编码工具可以快速完成该示例的优化,也引出成本较低的模型能否做到类似效果的问题。
可以把 Fast Anything 的 agent 指向一个自写的 Python 辅助程序,通过模型接口地址和模型名称调用 Nebius 上的 GLM-5.3,并在 Rust 检查失败时把错误发回模型修正。最初模型因推理耗尽可用输出而没有返回代码,将 reasoning effort 设为 low 后,首次改写便通过全部 33 项检查;应用从近 5 秒降到 74 毫秒,提速 64 倍。讲者称单次改写约花半美分,后续运行的提速倍数在 29 至 73 倍之间。Nebius Token Factory 承载了这个无法在多数笔记本上运行的大模型。
本地方案使用 Ollama 下载并运行免费的 Qwen 3.5 9B,通过修改辅助程序中的服务地址为 localhost:11434、并设置模型名称来调用。Rust 检查器前两次发现错误,辅助程序将错误返回模型修正,第三次才通过全部 33 项检查。最终应用提速 21 倍且不花模型调用费用;与云端大模型和 Claude Code 相比,速度提升较小,但示例的结果仍全部正确。
三种方案的结果分别是 Claude Code 提速 128 倍、Nebius 上的大模型首次提速 64 倍、本地免费模型提速 21 倍,且都通过了检查。演示应用可并排展示旧代码与新代码的运行时间和答案。工具还提供 agent 用于选择代码生成程序,bench 用于计时,report 用于生成摘要和图片,disable 用于关闭快速代码,doctor 用于检查安装状态。建议有 Claude Code 时使用它;否则免费模型也能带来明显提速。
Fast Anything 适合输入相同就应返回相同答案的慢任务。读取文件或使用随机数的代码会被跳过并留在 Python 中,因此优化目标是应用中可安全改写的慢速部分,而不是整款应用。新旧代码的结果检查用于确认改写后答案保持一致。
01:39 Fast Anything 通过定位瓶颈、将适合的慢代码改写为 Rust,并检查改写前后的答案来优化应用。
08:17 在姓名重复检测示例中,Claude Code、Nebius 上的 GLM-5.3 和本地 Qwen 3.5 9B 分别实现了 128 倍、首次 64 倍和 21 倍提速,且都通过了 33 项结果检查。
09:23 同输入应产生同一答案的慢任务更适合自动优化;涉及文件读取或随机数的代码会被跳过。