Superlinked: Scaling a Fleet of Small Open-Source Models

By LatestLLM Editorial ·

Superlinked: Scaling a Fleet of Small Open-Source Models

Learn how Superlinked solves the infrastructure bottlenecks of serving multiple small AI models using a pull-based queue and a Rust sidecar architecture.

Key takeaways

  • Top-down routing often limits GPU utilization to 20-30% for small model workloads due to stale worker state.
  • A pull-based architecture using NATS Jetstream and a shared queue can double cluster throughput.
  • Using a Rust sidecar abstracts multiple runtimes (PyTorch, Candle, SGLang), avoiding Python dependency conflicts.
  • Small embedding models on a single mid-range GPU can process 500,000 tokens per second with low-ten-millisecond latency.
  • A specialized LoRA costing only 80 cents to train improved German legal text retrieval by 18%.

For years, the AI industry has been obsessed with the 'bigger is better' philosophy, pushing parameters into the trillions. But a shift is happening: for specific production tasks, a fleet of small, specialized models is now outperforming the general-purpose giants.

⚡ TL;DR: Daniel Svonava of Superlinked reveals an Apache 2.0 open-source cluster architecture that replaces top-down routing with a shared queue (NATS Jetstream). This 'pull-based' approach doubles throughput and allows a single GPU to process 500,000 embedding tokens per second with low-ten-millisecond latency.

The Simple Version

Imagine you need to run a complex hospital. You could hire one world-famous 'super-doctor' who knows a little bit of everything, but they are expensive, slow to schedule, and often overkill for a simple flu shot.

Alternatively, you can hire a team of specialists: a cardiologist, a pediatrician, and a radiologist. They are faster, cheaper, and better at their specific jobs. This is the 'small model' strategy. Instead of one 27-billion parameter model for every task, you use a specialized model for OCR, another for SQL generation, and another for code review.

🎯 Think of it this way: Traditional AI serving is like a maître d' (the router) trying to assign guests to tables based on a list that is five minutes old. Superlinked's approach is like a buffet line: the food (the requests) is in a central tray, and the servers (the GPUs) grab exactly what they can handle the moment they are free.

How It Actually Works

The Problem with Top-Down Routing

Most current serving tools use a 'top-down' router. This router tries to track the state of every worker GPU—including their KV cache and current load—to decide where to send a request.

As Daniel Svonava explains, this creates a bottleneck because the router's view of the worker state is always slightly stale. When handling many small, fast requests, this leads to poor batch sizing and GPU utilization that often stalls between 20% and 30%.

The Pull-Based Architecture

Superlinked flips the script by using a gateway and a shared queue powered by NATS Jetstream. The gateway doesn't fully parse every request; it simply annotates the packet with metadata and drops it into the queue.

Instead of being 'pushed' a task, the workers 'pull' from the queue. This allows the GPU workers to form their own batches based on their actual real-time capacity, which Svonava notes "doubled cluster throughput."

Optimizing the Data Pipeline

To avoid the overhead of JSON and Base64 encoding—which the speaker describes as "not good for small models"—Superlinked uses MessagePack, a binary format. This allows multi-modal data to flow through the gateway more efficiently.

For requests larger than one megabyte, the gateway defers the heavy binary data to cloud storage in-flight, ensuring the internal queue remains unclogged while providing a clean REST interface to the user.

Technical Deep Dive

The Rust Sidecar and Runtime Abstraction

One of the biggest hurdles in serving a wide fleet of models is 'dependency hell.' Different models often require different versions of PyTorch or specific CUDA kernels, making it impossible to run them in a single Python environment.

Superlinked solves this with a Rust sidecar. This sidecar acts as an abstraction layer that sits over various runtimes—specifically PyTorch, Candle, and SGLang. By moving the orchestration to Rust and communicating over sockets, they can manage over 50 different adapters without competing Python requirements.

For context, Candle is a minimalist ML framework for Rust. While the speaker notes that Candle currently struggles to match PyTorch's raw performance, its binary size is roughly 10% of a PyTorch Docker image (1GB vs 12GB). This drastically reduces 'cold start' times when scaling workers up from zero.

The Auto-Research Loop

Serving open-source tools like vLLM or SGLang often feels like a research project because they ship untuned. To solve this, Superlinked implemented an auto-research loop that automatically performs parameter sweeps to find the optimal configuration for specific hardware and model combinations.

This loop doesn't just optimize the model; it bundles the entire cluster configuration. As a result, users don't have to manually tune their infra. In one proof-of-concept, this process produced a LoRA (Low-Rank Adaptation) that cost only 80 cents to train but improved retrieval quality on German legal text by 18%.

Embedding Performance at Scale

The efficiency of this stack is most evident in embedding tasks. By hosting their own small encoder models on mid-range hardware like the Nvidia L4 or RTX Pro 6000, they achieved 500,000 tokens per second on a single GPU.

This is a massive departure from managed endpoints (like OpenAI or Cohere), where latencies are often in the hundreds of milliseconds. In the Superlinked setup, latencies drop to the 'low tens of milliseconds' while reducing costs by orders of magnitude.

Why This Matters

The 'frontier' of LLM performance is flattening, meaning the gap between a 70B model and a well-tuned 7B model is shrinking for specific tasks. When you own the infrastructure and the fine-tuned weights, you gain a competitive advantage that managed services cannot provide.

By removing the 'conversation' between AI engineers (who want to deploy a new LoRA) and infrastructure engineers (who have to configure the server), companies can increase their organizational velocity. The ability to deploy a task-specific model—like one specifically trained on Vietnamese receipts—allows for a level of accuracy that generalist models simply cannot match.

Ultimately, this architecture proves that the bottleneck for open-source AI isn't the availability of models—thousands exist on Hugging Face—but the ability to serve a diverse fleet of them efficiently at scale.

Frequently asked questions

What is the main difference between top-down routing and pull-based routing?

Top-down routing has a central router that assigns tasks to workers based on potentially stale state. Pull-based routing uses a shared queue where workers grab tasks when they have actual capacity, leading to better batching and higher GPU utilization.

Why use a Rust sidecar instead of just using Python?

The Rust sidecar abstracts different runtimes and prevents 'dependency hell' where different models require conflicting Python versions or libraries, allowing 50+ adapters to run on the same infrastructure.

How does MessagePack benefit AI inference?

MessagePack is a binary format that is more efficient than Base64-encoded JSON, reducing overhead and increasing throughput for high-volume small model requests.

Sources

Source: “Superlinked: Scaling a Fleet of Small Open-Source Models” on YouTube by AI Engineer

Tags: LLM Inference, Open Source AI, GPU Optimization, Superlinked, Rust

Related articles