← Latest papers
🤖 machine learning

Depth-adaptive Inference of Looped Language Models via Continuous Depth Batching

This paper introduces Continuous Depth Batching (CDB), a novel scheduling framework that enables efficient, end-to-end depth-adaptive inference for looped language models by decoupling loop iterations from boundary stages and overlapping scheduling with GPU computation, thereby achieving up to 1.9x higher throughput and significantly lower latency compared to standard methods.

Original authors: Kristian Schwethelm, Daniel Rueckert, Georgios Kaissis

Published 2026-08-11
📖 5 min read🧠 Deep dive

Original authors: Kristian Schwethelm, Daniel Rueckert, Georgios Kaissis

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a massive, super-fast library where a single librarian can answer thousands of questions at once. In the world of Artificial Intelligence, this librarian is a "Large Language Model" (LLM), and the questions are text prompts from users. Usually, to save time and money, the librarian processes all questions in a strict line, giving every single one the exact same amount of attention, no matter how simple or complex the question is. This is efficient, but it's wasteful: answering "What is 2+2?" takes just as much brainpower as solving a complex physics problem, even though the first one is a breeze.

Recently, scientists discovered a clever trick called "looped" models. Instead of a straight line, these models have a "thinking loop." They can check their work, run the answer through a special thinking chamber, and if the answer looks good, they stop. If it looks shaky, they run it through the chamber again. This means easy questions get a quick pass, while hard ones get extra loops of deep thought. It's like a student who glances at a simple math problem and writes the answer immediately, but spends ten minutes scribbling on a whiteboard for a tough calculus problem. This sounds perfect, but it creates a nightmare for the librarian trying to manage the line. If everyone in the line needs a different amount of time in the thinking chamber, the whole line gets stuck. The librarian can't process the next group until the current group is done, and if some people are still thinking while others are finished, the system grinds to a halt. This paper tackles that exact traffic jam.

The authors of this paper introduce a new system called Continuous Depth Batching (CDB) to fix the traffic jam caused by these "thinking loops." They realized that the old way of managing the line (called standard batching) was too rigid. It treated every question as if it needed the same number of loops, which wasted the speed advantage of the new models. To solve this, they built a dynamic scheduler that acts like a super-organized traffic controller. Instead of waiting for the whole group to finish, this controller lets finished questions leave the line immediately and instantly swaps them with new questions waiting to start.

Think of it like a busy restaurant kitchen. In the old system, if a chef is making a simple salad (easy token) and a complex soufflé (hard token) at the same time, the whole kitchen has to wait until the soufflé is done before serving the salad or starting a new order. The new CDB system is different. As soon as the salad is ready, it's plated and sent out, and the chef immediately grabs a new order to start chopping vegetables, keeping the kitchen constantly busy. The paper shows that by doing this, the system can keep the "thinking loop" running at full speed without ever letting the chef's hands go idle.

The researchers tested this on two different AI models, named Ouro and Huginn. They found that CDB works incredibly well. For the Ouro model, the new system achieved up to 99% of the theoretical maximum speed-up possible. In plain English, this means the system is almost as fast as it could possibly be if you could magically remove every single second of wasted time. In real-world tests, this translated to processing 1.5 to 1.9 times more requests per second than the old methods. When the system was under heavy load, like a busy website with thousands of users, the wait time for answers dropped by 45% to 90%.

However, the paper also points out that this magic isn't automatic. The system works best when the "thinking loop" is the main part of the work. If the steps before the loop (like reading the question) and after the loop (like writing the final answer) are too slow or heavy, they can slow down the whole process. The authors found that for models where these extra steps are heavy, the speed-up is still good but not quite as dramatic. They also discovered a "sweet spot" for how many questions to process at once. If you try to process too few questions, the system wastes time reloading the model's "brain" (weights) for every single step. If you process too many, the system gets bogged down. CDB helps find that perfect balance by constantly refilling the line with new questions whenever a slot opens up.

One of the cleverest tricks the authors used is something called a "lookahead gate." Normally, the system has to wait for a question to finish its thinking loop before it knows if the answer is good enough to leave. This causes a tiny pause where the computer just sits there waiting. The new system predicts the answer one step early, allowing the next batch of questions to be prepared while the current one is still finishing. It's like a conductor who cues the next section of the orchestra just before the current section ends, so there is no silence between the notes. This tiny change reduced the computer's "idle time" to nearly zero, making the whole process incredibly smooth.

In short, this paper proves that we can make these smart, self-correcting AI models actually fast enough to use in the real world. By treating the "thinking loops" as a flexible schedule rather than a rigid line, and by constantly swapping finished tasks for new ones, the authors have built a system that is not only smarter but also significantly faster and more efficient. They didn't just suggest it might work; they built it, tested it on real hardware, and showed that it delivers massive speed gains, turning a theoretical idea into a practical tool for the future of AI.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →