Efficient Multi-Model Orchestration for Self-Hosted Large Language Models
Bhanu Prakash Vangala, Tanu Malik
TL;DR
This work tackles the self-hosted DLM dilemma by introducing Pick and Spin, a Kubernetes-based framework that jointly routes prompts to the most relevant backends and scales resources on demand. It defines a normalized multi-objective score $f(p,S_{x,y})$ with weights $w_R,w_T,w_C$ to balance relevance, latency, and cost, and combines rule-based keyword routing with a DistilBERT classifier for semantic routing. The system employs a two-dimensional deployment matrix $M \in \mathbb{R}^{L \times I}$ and an orchestration layer, Spin, that maintains warm pools and uses Little's Law for capacity planning, all managed via a unified Helm chart. Experimental evaluation across four foundation models and eight benchmarks demonstrates up to 21.6% higher success rates, 30% lower latency, and 33% lower GPU cost per query compared with static deployments, validating PS as a practical approach for private, scalable multi-model AI deployment. The framework thus enables cost-efficient, privacy-preserving AI at organizational scale while offering tunable trade-offs between accuracy, latency, and resource use.
Abstract
Self-hosting large language models (LLMs) is increasingly appealing for organizations seeking privacy, cost control, and customization. Yet deploying and maintaining in-house models poses challenges in GPU utilization, workload routing, and reliability. We introduce Pick and Spin, a practical framework that makes self-hosted LLM orchestration scalable and economical. Built on Kubernetes, it integrates a unified Helm-based deployment system, adaptive scale-to-zero automation, and a hybrid routing module that balances cost, latency, and accuracy using both keyword heuristics and a lightweight DistilBERT classifier. We evaluate four models, Llama-3 (90B), Gemma-3 (27B), Qwen-3 (235B), and DeepSeek-R1 (685B) across eight public benchmark datasets, with five inference strategies, and two routing variants encompassing 31,019 prompts and 163,720 inference runs. Pick and Spin achieves up to 21.6% higher success rates, 30% lower latency, and 33% lower GPU cost per query compared with static deployments of the same models.
