UK — The Register
Google gooses Python AI performance by... removing Python
AI2 min read
Google has open sourced XSE, a tool that runs machine learning models without the Python interpreter, so they run faster. It already handles more than six million queries a second inside Google services. The story is about removing Python from the serving step of AI systems.
What happened
Google released XSE, short for XLA Serving Engine, as open source software. It runs AI models in the serving step, which is the part that answers user requests. Data scientists still write models in Python. But the serving step uses C++ code, which runs faster, so Python is not needed when users make requests.
Key numbers
- More than 6 million queries per second handled at Google today.
- Services that use XSE include YouTube Shorts, Google Ads, and Search.
- In Google's tests on short requests, XSE gave 2 to 5 times the throughput of its best optimized Python server.
- It used about one quarter of the memory of that Python server.
Why Python is slow here
Python is easy for people to write, so data scientists like it. But a Python interpreter, the program that reads and runs Python code, adds extra work when it sits in the serving pipeline. That can slow things down and make systems harder to deploy. The OpenXLA Project, which has industry backing, offers tools that compile machine learning math into native code, meaning code made for a specific chip.
Why it matters
XSE is best for small, focused models, such as those that rank results, recommend videos, or handle images. These models get many short requests and need fast answers. Google says it is not aimed at large language models, which tools like vLLM or SGLang serve better. Other groups also try to move work out of Python, such as PyTorch's LibTorch and Microsoft's ONNX Runtime.
What to watch
- Google plans to connect XSE with TorchTPU, so PyTorch users can export models for C++ serving on TPUs.
- XLA SavedModels can run on GPUs and CPUs, which Google built with Arm and Intel, but Google clearly prefers its own TPU chips.
- Whether other companies adopt XSE for their own fast, small models.
Glossary
- XSE
- XLA Serving Engine, a new open source tool that runs trained AI models quickly, using C++ instead of Python.
- Python interpreter
- The program that reads and runs Python code. It can slow down AI systems when used during serving.
- OpenXLA Project
- An industry group that makes tools to turn machine learning math into fast native code for different chips.
- TPU
- Tensor Processing Unit, Google's own chip designed for AI work.
- vLLM
- A tool that serves large language models quickly. The article says it suits large-scale LLM work better than XSE.