RoofLang: Enabling AI-Driven Architecting of LLM Inference Systems

Abstract

AI is beginning to make substantive contributions to LLM inference optimization. Existing AI optimizations are predominantly profiling-based. Profiling-bound feedback confines the search to the capabilities and performance of an existing software stack, preventing a fundamentally better architecture of LLM inference systems from being identified. To enable the AI-driven LLM inference system architecting loop, we argue that a general workload representation, a verifiable mutation space, and an implementation-independent evaluator are required. We present the RoofLang domain-specific language (DSL) that provides these features. In our evaluation, RoofLang reveals that DeepSeek V4-series models could achieve 3.5–39.5× higher peak decode throughput than other representative models. This gap is disproportionate to their total parameter counts and arises largely from compact KV-cache designs that support larger batches and reduce memory traffic. A persistent optimizer agent further discovered several new architectures that improved both throughput and interactivity of DeepSeek V4 Pro on NVIDIA B300 by 6.23–50.1%.

Explore the Pareto frontier.

Compare throughput-interactivity pareto frontiers, across workloads, models, accelerators, and cluster sizes. Each curve shows the ideal-overlap projection from RoofLang's roofline-based discrete-event simulator. Results are analytical estimates for comparing designs, not for real deployment predictions.

x · interactivity y · throughput
Axis scale
Loading simulation data…
Interactive chart of per-user interactivity against per-GPU throughput.
Frontiers in view 0 cases

Citation

If RoofLang is useful in your work, please cite the technical report.

@article{yang2026rooflang,
  author = {Yang, Ziyue and Jiang, Yuting and Qu, Lei and Cheng, Peng},
  title = {RoofLang: Enabling AI-Driven Architecting of LLM Inference Systems},
  journal = {arXiv preprint arXiv:2609.12551},
  year = {2026},
  url = {https://arxiv.org/abs/2609.12551}
}