Yi Pan, Yile Gu, Jinbin Luo, Yibo Wu, Ziren Wang, Hongtao Zhang, Ziyi Xu, Shengkai Lin, Stephanie Wang, Baris Kasikci — arXiv preprint (2025) (2025)
Inference & ServingProgrammable Systems
Keywords: ML Systems Intra-Device Parallelism Programmable Execution
As machine learning models—especially Large Language Models (LLMs)—grow exponentially in scale, they are becoming increasingly heterogeneous. A single inference request isn’t just one big matrix multiplication anymore; it is a complex sequence of compute-bound, memory-bound, and network-bound operations.
This shift creates a massive inefficiency. While your GPU is busy waiting for a network operation (like an all-reduce in distributed training) to finish, its compute units often sit idle. To fix this, researchers have proposed intra-device parallelism—strategies like overlapping communication with computation, fusing kernels, or splitting batches.
But there is a catch: implementing these strategies is an engineering nightmare. Integrating a technique like dual-batch overlap into SGLang recently took developers over two months and 1,300 lines of invasive code changes. Worse, the best strategy changes depending on your hardware and workload, meaning you might need to rewrite that code for every new scenario.
We built DynaFlow to solve this. It is a new framework that makes integrating these complex parallel strategies transparent, flexible, and efficient.
The root of the problem is a “programming model mismatch”. Frameworks like PyTorch and vLLM assume a static, sequential execution order. They execute Operator A, wait for it to finish on the GPU, and then execute Operator B.
Intra-device parallelism breaks this rule. It wants to run Operator A (compute) and Operator B (network) at the same time. To force this behavior into existing frameworks, developers have to tear apart the model code, manually managing CUDA streams and memory buffers.
Our key insight with DynaFlow is to decouple the execution schedule from the model definition.
Instead of hard-coding parallelism into the model, DynaFlow sits between the model and the hardware. It allows developers to keep their model code clean and sequential while defining a separate “execution schedule” that rearranges how operators run on the GPU.

SplitModule) and then write a short Python function to control execution.
We put DynaFlow to the test by integrating four different parallelism strategies (including NanoFlow and TokenWeave) into three state-of-the-art systems: vLLM, SGLang, and Hugging Face Transformers.
The Performance Wins:
The Engineering Wins:
As models get bigger and hardware gets more complex, we cannot afford to leave performance on the table. Nor can we afford to spend months re-engineering our systems for every new optimization technique.
DynaFlow proves that we can have it both ways: the high performance of hand-tuned parallelism and the flexibility of high-level programming.
The expressive frontend of DynaFlow has even more potential. We are working on adding more advanced features by using it, such as: