AI | UOB | 🎓 | R&D

Birmingham, United Kingdom
Joined July 2013
Introducing 𝐒𝐩𝐞𝐜𝐮𝐥𝐚𝐭𝐢𝐯𝐞 𝐃𝐞𝐜𝐨𝐝𝐢𝐧𝐠: 𝐇𝐨𝐰 𝐈𝐭 𝐄𝐯𝐨𝐥𝐯𝐞𝐝, 𝐖𝐡𝐞𝐧 𝐈𝐭 𝐒𝐭𝐚𝐲𝐬 𝐋𝐨𝐬𝐬𝐥𝐞𝐬𝐬, 𝐚𝐧𝐝 𝐖𝐡𝐚𝐭'𝐬 𝐍𝐞𝐱𝐭. An interactive tutorial @Madisonkanna and I built for the NeurIPS Education Track. Every LLM you use generates one token at a time. Autoregressive decoding is the bottleneck for inference. Speculative decoding accelerates this, and today it runs under nearly every hosted LLM. It is a cornerstone topic to learn in the LLM stack. Blog: neurips2026-speculative-deco…
33
106
11
812
119,496
PTCG! Very fun competition!
1
11
ankithsavio retweeted
Problem with this is they do not demonstrate how capable current models are at coming up with novel working research solutions & tangible, insightful questions. They are very capable at doing that but looking at the traces of these runs, it isnt demonstrating such capabilities. Instead, if you look at fable traces, it is doing sweeps / ablations on existing methods. This is basic auto-ml, which is not what research is about In other words, these results probably undermine current models capability to conduct research. I say again, they are very good at doing research (with right set of prompts ig)
We ran the largest open experiment on how frontier models do AI research. 100+ autonomous runs across 10+ models, sandboxed on 8xH200s for up to 8 days, iterating on the nanoGPT optimizer track. Best runs closed 82% of the gap to a record built by dozens of humans over months.
8
10
3
153
17,136
70+ Models Big Drop! Lessons Learned🫡
1
28
ankithsavio retweeted
> you are a person > who wants to understand llm inference > you read papers > “we use standard techniques” > which ones? where is the code? > open vllm > 100k lines of c++ and python > custom cuda kernel for printing > close tab > now you have this tweet > and mini-sglang > ~5k lines of python > actual production features > four processes > api server > tokenizer > scheduler > detokenizer > talk over zeromq > simple > scheduler is the boss > receives requests > decides: prefill or decode > batches them > sends work to gpu > prefill > process the prompt > compute heavy > thousands of tokens at once > flash attention does the lifting > decode > generate new tokens > one at a time > memory bound > needs kv cache > kv cache is the secret sauce > every token remembers the past > without it you recompute everything > with it you just append > memory is finite > enter radix cache > two requests > “explain quantum physics” > “explain quantum physics simply” > same prefix > why compute twice > radix tree stores prefixes > first request builds cache > second one reuses it > ~50% faster in practice > chunked prefill > 128k token prompt arrives > gpu says “nope” > scheduler says “relax” > splits into chunks > processes sequentially > avoids oom > tensor parallelism > one model > four gpus > each gpu holds a slice > allreduce merges results > 70b models on consumer rigs > overlap scheduling > gpu crunching current batch > cpu prepping next batch > two streams > no idle time > nano-flow > cuda graphs for decode > small batches > high overhead > record once > replay forever > 2ms → 1.5ms > codebase is readable > core = data structures > scheduler/ = the brain > engine/ = the muscle > layers/ = building blocks > models/ = llama, qwen > want to add a model > copy llama file > ~200 lines > add the architecture & its tricks > done > want to tweak scheduling > scheduler file line ~172 > choose your policy > done > want to grok attention > attention/fa.py > flash-attn integration > comments explain everything > linux (mostly) > cuda required > kernels jit compile > wsl2 if you’re on windows > mac users stay mad :P > run it > python -m minisgl --model "qwen/qwen3-0.6b" > openai-compatible api > token streaming > it just works > or go big > 70b on 8x rtx 3090s > --tp 8 > interactive shell too > --shell > chat in terminal > /reset clears history > great code > that works > and teaches you > while it runs
23
62
6
826
67,416
After 60+ days and 300+ models Will aim higher in the next one!🫡
1
44
ankithsavio retweeted
Reinforcement Learning Teachers of Test Time Scaling In this new paper, we introduce a new way to teach LLMs how to reason by learning to teach, not solve! The core idea: A teacher model is trained via RL to generate explanations from question-answer pairs, optimized to improve a student model’s understanding. Rather than solving problems from scratch, the teacher is rewarded based on how effectively its explanations help the student recover correct solutions. Many advanced reasoning models, like DeepSeek R1, follow a two-stage learning process: first, a teacher model is trained, and then its outputs are used to train a student model, which becomes the final product. These teacher models are usually trained using expensive reinforcement learning (RL), where the model must “learn to solve” complex problems from scratch and is rewarded only when it gets the right answer. This process is slow, costly, and often narrowly focused, requiring carefully filtered outputs from the teacher to ensure the student learns effectively. In contrast, our method tackles precisely these challenges. Instead of teaching by solving, our new reinforcement-learned teachers (RLTs) “learn to teach”, tasking them to output clear step-by-step explanations based on known solutions, just like great human instructors. Crucially, together with the questions, we also provide the correct answers to our teachers during training, which are now rewarded not for solving problems themselves, but for how helpful their explanations are to the student. This feedback loop aligns teacher training with its true purpose (being helpful to students), making it far more effective. It also allows us to use small, efficient models that wouldn’t otherwise be able to solve problems on their own. The result is surprising: Our compact teachers with only 7B parameters are better at teaching reasoning skills than orders-of-magnitude larger LLMs, making advanced AI more affordable and much faster to train. This holds not only for students of the same size (26% on our set of tasks vs 19% when using DeepSeek R1, which has 671B parameters) but also 32B students, much larger than the teacher itself (38% vs 34% using R1).
25
117
15
761
63,342
ankithsavio retweeted
I always found it puzzling how language models learn so much from next-token prediction, while video models learn so little from next frame prediction. Maybe it's because LLMs are actually brain scanners in disguise. Idle musings in my new blog post: sergeylevine.substack.com/p/…
50
174
33
1,278
315,144
Our computer vision textbook is now available for free online here: visionbook.mit.edu/ We are working on adding some interactive components like search and (beta) integration with LLMs. Hope this is useful and feel free to submit Github issues to help us improve the text!
34
597
26
2,870
182,514
Extract – a system built by the UK government, using our Gemini foundational model – will help council planners make faster decisions. 🚀 Using multimodal reasoning, it turns complex planning documents – even handwritten notes and blurry maps – into digital data in just 40s. Find out more. ↓ goo.gle/4jIuMJM
80
255
64
1,863
268,194
We encourage everyone to read our full blogpost so that our findings are only considered with appropriate context and nuance. Written overnight w/ @nikhilchandak29 @AmyPrb. We only hope to reduce confusion in how we interpret and make future claims. safe-lip-9a8.notion.site/Inc…
3
6
2
101
12,344
Check out my latest project on applying the Storm's Question Asking framework to generate personalized advice for improving your CV and Cover Letter. Related Links ~ Code : github.com/ankithsavio/Ghost… Blog : ankithsavio.bearblog.dev/gho… Looking forward to any feedbacks! #AI #LLMs #RAG
63
I partnered with @huggingface and @ben_burtenshaw to teach people how to fine-tune LLMs with GRPO. In this notebook, we fine-tune a tiny SmolLM-135M model on my filtered smoltldr dataset. Thanks to our reward function, we encourage the model to output generations ("TL;DR") of around 50 characters. Interestingly, this 135M model can learn this behavior with only 2k samples! The quality of the final results varies, but it was a fascinating exercise to tweak hyperparameters and get an intuition of how these tiny models behave with GRPO. It's been a fun collaboration, I hope you'll enjoy the course. :)
32
369
6
2,265
160,369
ankithsavio retweeted
Introducing The AI CUDA Engineer: An agentic AI system that automates the production of highly optimized CUDA kernels. sakana.ai/ai-cuda-engineer/ The AI CUDA Engineer can produce highly optimized CUDA kernels, reaching 10-100x speedup over common machine learning operations in PyTorch. Our system is also able to produce highly optimized CUDA kernels that are much faster than existing CUDA kernels commonly used in production. We believe that fundamentally, AI systems can and should be as resource-efficient as the human brain, and that the best path to achieve this efficiency is to use AI to make AI more efficient! We are excited to publish our paper, The AI CUDA Engineer: Agentic CUDA Kernel Discovery, Optimization and Composition. We also release a dataset of over 17,000 verified CUDA kernels produced by The AI CUDA Engineer. Paper: pub.sakana.ai/ai-cuda-engine… Kernel Archive Webpage: pub.sakana.ai/ai-cuda-engine… HuggingFace Dataset: huggingface.co/datasets/Saka… The AI CUDA Engineer utilizes evolutionary LLM-driven code optimization to autonomously improve the runtime of machine learning operations. Our system is not only able to convert PyTorch code into CUDA kernels, but through the use of evolution, it can also optimize the runtime performance of CUDA kernels, fuse multiple operations, and even discover novel solutions for writing efficient CUDA operations by learning from past innovations! We believe The AI CUDA Engineer opens a new era of AI-driven acceleration of AI and automated inference time optimization. We (@RobertTLange, @_Aaditya_Prasad, @Floating_Martin, @maxencefaldor, @yujin_tang, @hardmaru) are excited to continue Sakana AI's mission of leveraging AI to improve AI.
201
540
247
2,933
1,161,095
We made 5 challenges and if you score 47 points we'll offer you $500K/year + equity to join us at 🦥@UnslothAI! No experience or PhD needed. $400K - $500K/yr: Founding Engineer (47 points) $250K - $300K/yr: ML Engineer (32 points) Challenges: 1. Convert nf4 / BnB 4bit to Triton 2. Make FSDP2 work with QLoRA 3. Remove graph breaks in torch.compile 4. Help solve Unsloth issues! 5. Memory Efficient Backprop If you have any questions about the challenges, please feel free to ask! We're looking for people to help push Unsloth forward - so come join us to democratize AI further! Our past work includes: 1. 1.58bit DeepSeek R1 GGUFs: xitter.cf/UnslothAI/status/18838… 2. GRPO with Llama 3.1 8B in a Colab: xitter.cf/UnslothAI/status/18875… 3. Gemma bug fixes: xitter.cf/danielhanchen/status/1… 4. Gradient accumulation bug fixes: xitter.cf/danielhanchen/status/1… Details & submission guide: colab.research.google.com/dr…
Fixed a bug which caused all training losses to diverge for large gradient accumulation sizes. 1. First reported by @bnjmn_marie, GA is supposed to be mathematically equivalent to full batch training, but losses did not match. 2. We reproed the issue, and further investigation showed the L2 Norm betw bsz=16 and ga=16 was 10x larger. 3. The culprit was the cross entropy loss normalizer. 4. We ran training runs with denormalized CE Loss, and all training losses match. 5. We then re-normalized CE Loss with the correct denominator across all gradient accumulation steps, and verified all training loss curves match now. 6. We've already updated @UnslothAI with the fix, and wrote up more details in our blog post here: unsloth.ai/blog/gradient This issue impacts all libraries which use GA, and simple averaging of GA does not work for varying sequence lengths. This also impacts DDP and multi GPU training which accumulates gradients. Please update Unsloth via pip install --upgrade --no-cache-dir unsloth and use from unsloth import unsloth_train We have a Colab notebook using our fixed GA: colab.research.google.com/dr… and a Kaggle notebook: kaggle.com/code/danielhanche…
179
768
196
6,349
1,313,885
ankithsavio retweeted
Training our most capable Gemini models relies heavily on our JAX software stack + Google's TPU hardware platforms. If you want to learn more, see this awesome book "How to Scale Your Model": jax-ml.github.io/scaling-boo… It was put together by my @GoogleDeepMind colleagues @_sholtodouglas, @charliexychen, @pchoy95, @albertwebson, @vinayramasesh, @froystig, @anselmlevskaya, @sharadvikram, and Fede Lebron, and describing the work of many, many people!
Making LLMs run efficiently can feel scary, but scaling isn’t magic, it’s math! We wanted to demystify the “systems view” of LLMs and wrote a little textbook called “How To Scale Your Model” which we’re releasing today. 1/n
23
160
6
981
128,991
✨New blog post✨: my attempt as a vision researcher at finally understanding RLHF -- a deep dive into PPO & DeepSeek's GRPO! No hot take, I promise. yugeten.github.io/posts/2025…
25
172
6
1,310
89,677
ankithsavio retweeted
DeepSeek lecture is edited and uploaded 👉 by-hand.ai/dpseek ~ Thank you all 🙏 for attending my public lecture yesterday. In one hour, I managed to build a simplified DeepSeek model in Excel in front of a live audience of 3000+ people.
16
395
12
2,362
296,854
I don't have too too much to add on top of this earlier post on V3 and I think it applies to R1 too (which is the more recent, thinking equivalent). I will say that Deep Learning has a legendary ravenous appetite for compute, like no other algorithm that has ever been developed in AI. You may not always be utilizing it fully but I would never bet against compute as the upper bound for achievable intelligence in the long run. Not just for an individual final training run, but also for the entire innovation / experimentation engine that silently underlies all the algorithmic innovations. Data has historically been seen as a separate category from compute, but even data is downstream of compute to a large extent - you can spend compute to create data. Tons of it. You've heard this called synthetic data generation, but less obviously, there is a very deep connection (equivalence even) between "synthetic data generation" and "reinforcement learning". In the trial-and-error learning process in RL, the "trial" is model generating (synthetic) data, which it then learns from based on the "error" (/reward). Conversely, when you generate synthetic data and then rank or filter it in any way, your filter is straight up equivalent to a 0-1 advantage function - congrats you're doing crappy RL. Last thought. Not sure if this is obvious. There are two major types of learning, in both children and in deep learning. There is 1) imitation learning (watch and repeat, i.e. pretraining, supervised finetuning), and 2) trial-and-error learning (reinforcement learning). My favorite simple example is AlphaGo - 1) is learning by imitating expert players, 2) is reinforcement learning to win the game. Almost every single shocking result of deep learning, and the source of all *magic* is always 2. 2 is significantly significantly more powerful. 2 is what surprises you. 2 is when the paddle learns to hit the ball behind the blocks in Breakout. 2 is when AlphaGo beats even Lee Sedol. And 2 is the "aha moment" when the DeepSeek (or o1 etc.) discovers that it works well to re-evaluate your assumptions, backtrack, try something else, etc. It's the solving strategies you see this model use in its chain of thought. It's how it goes back and forth thinking to itself. These thoughts are *emergent* (!!!) and this is actually seriously incredible, impressive and new (as in publicly available and documented etc.). The model could never learn this with 1 (by imitation), because the cognition of the model and the cognition of the human labeler is different. The human would never know to correctly annotate these kinds of solving strategies and what they should even look like. They have to be discovered during reinforcement learning as empirically and statistically useful towards a final outcome. (Last last thought/reference this time for real is that RL is powerful but RLHF is not. RLHF is not RL. I have a separate rant on that in an earlier tweet xitter.cf/karpathy/status/182127…)
DeepSeek (Chinese AI co) making it look easy today with an open weights release of a frontier-grade LLM trained on a joke of a budget (2048 GPUs for 2 months, $6M). For reference, this level of capability is supposed to require clusters of closer to 16K GPUs, the ones being brought up today are more around 100K GPUs. E.g. Llama 3 405B used 30.8M GPU-hours, while DeepSeek-V3 looks to be a stronger model at only 2.8M GPU-hours (~11X less compute). If the model also passes vibe checks (e.g. LLM arena rankings are ongoing, my few quick tests went well so far) it will be a highly impressive display of research and engineering under resource constraints. Does this mean you don't need large GPU clusters for frontier LLMs? No but you have to ensure that you're not wasteful with what you have, and this looks like a nice demonstration that there's still a lot to get through with both data and algorithms. Very nice & detailed tech report too, reading through.
358
2,088
447
14,142
2,442,030
ankithsavio retweeted
We’re excited to introduce Transformer², a machine learning system that dynamically adjusts its weights for various tasks! sakana.ai/transformer-square… Adaptation is a remarkable natural phenomenon, like how the octopus can blend in with its environment, or how the brain rewires itself after injury. We believe our new system paves the way for a new generation of adaptive AI models, modifying their own weights and architecture to adapt to the nature of the tasks they encounter, embodying living intelligence capable of continuous change and lifelong learning. Paper: arxiv.org/abs/2501.06252 GitHub: github.com/SakanaAI/self-ada…
93
459
163
2,385
462,185