Why On-Node Machine Learning Inference Matters
Machine learning inference usually means a round trip: retrieve candidates from one system, ship them to a separate model-serving layer, wait for a response, and stitch the result back together. Every hop adds latency, cost, and one more place for the model and the data to drift out of sync.
Vespa collapses that into one system. Models are deployed alongside your data and evaluated at serving time on the same nodes that already hold the documents being scored. There's no separate inference cluster to provision, monitor, or keep in lockstep with your index.
This pattern has a name: architecture inversion.
Instead of the traditional two-tier setup (retrieve from a search engine or database, then ship candidates to a separate stateless compute tier), the compute moves into the data layer itself. It's the same approach the largest recommendation and ranking systems in the world converged on once brute-force scoring stopped being optional.
No round trip. No second system. No drift between the model and the data.
That architecture is what makes it possible to:
- Cut inference latency, not just serving latency. Because the model runs on the same node as the data, there's no network call to a separate prediction service. The cost that usually dominates real-time ML serving simply isn't there.
- Use the framework your team already trained in. ONNX, TensorFlow, XGBoost, LightGBM, and Vespa's native tensor format are all first-class. Export what you have instead of rebuilding it for a proprietary format.
- Scale inference the same way you scale search. Add content nodes and inference capacity grows with it. There’s no separate autoscaling policy for a model-serving fleet that has to keep pace with your index.
- Go from embeddings to generation on one platform. Embedders, cross-encoders, classifiers, and LLMs can all be part of the same application package. One deploy, one place to version, one system to operate.