DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environments

Reza Farahani, Zoha Azimi Ourimi, Mario Colosi, Lauri Loven, Christian Timmerer, Schahram DustdararXiv 2026

TL;DR

DRLM is a Deep Reinforcement Learning-based framework designed to intelligently route Large Language Model (LLM) queries across heterogeneous edge computing clusters. By combining lightweight quality and latency predictors with a factorized Proximal Policy Optimization (PPO) agent, DRLM reduces inference latency by up to 51% and queuing delays by up to 67% while maintaining high accuracy.

What Problem Does This Paper Address?

Deploying LLMs on edge devices (like smart routers, gateways, or local servers) reduces response times and preserves privacy. However, edge environments are highly heterogeneous, consisting of devices ranging from resource-constrained Raspberry Pis to more powerful NVIDIA Jetson boards.

At the same time, the design space for LLMs has exploded: a single model family can be deployed across multiple parameter scales and quantization levels (e.g., 4-bit vs 16-bit precision). This creates complex, non-monotonic trade-offs where a larger model might excel at math but fail at common-sense QA, or a quantized model might save memory but unexpectedly increase latency on specific hardware.

Existing orchestration solutions typically treat model performance as static or focus purely on infrastructure-level metrics like batching. They fail to jointly consider query semantics, hardware constraints, and real-time system dynamics (like CPU/GPU utilization and queue lengths), leading to severe bottlenecks under heavy workloads.

Methods

The authors introduce DRLM (Deep Reinforcement Learning-based LLM Query Orchestration), which models the routing challenge as a Markov Decision Process (MDP). The architecture consists of four main pillars:

  1. Query Profiler & Classifier: Extracts structural features (token length, complexity) and uses a Random Forest classifier on sentence embeddings to map incoming queries into semantic categories (e.g., Mathematics, History).
  2. Performance Predictor: Avoids executing costly LLM inferences during decision-making by using two lightweight proxies:
  3. Quality Estimator: A precomputed lookup table providing stable, class-conditioned empirical accuracy statistics.
  4. Latency Predictor: A gradient-boosted regressor (LightGBM) that estimates inference time based on query structure, model configuration, and hardware characteristics.
  5. Runtime Monitor: Continuously tracks device-level metrics, including active load and remaining processing time across the cluster.
  6. Factorized PPO Agent: A Deep Reinforcement Learning agent trained via Proximal Policy Optimization. To overcome the combinatorial explosion of the action space (choosing a model family, size, quantization, and device all at once), DRLM uses an autoregressive factorization method. It breaks the decision down sequentially: Model Family/Scale $\rightarrow$ Quantization Level $\rightarrow$ Execution Device.
DRLM Architecture

Datasets

To train and evaluate the system, the authors constructed a massive, real-world benchmarking dataset containing 223,835 measurements. The dataset spans:

  • 1,258 queries across 6 semantic classes subsampled from prominent benchmarks: MMLU (biology, history, geography), GSM8K (mathematics), CommonsenseQA, and TruthfulQA.
  • 8 model families (32 deployed instances total) including GPT-OSS, Gemma, Llama, Qwen, Tinyllama, and Mistral.
  • 5 quantization levels ($z2, z3, z4, z8, z16$).
  • Heterogeneous edge hardware including Raspberry Pi 3/4, NVIDIA Jetson Nano, Jetson Orin Nano, Jetson Orin AGX, and various virtual machines.

Key Insights and Ideas

  • Workload-Dependent Scaling: Bigger isn't always better. The authors observed that scaling up a model's size can occasionally degrade performance on specific tasks depending on the architecture, meaning static, size-based routing policies are inherently sub-optimal.
  • Quantization is Highly Variable: Quantization effects are deeply entangled with specific hardware. For example, running a 16-bit model vs a 4-bit model might yield marginal accuracy gains on an NVIDIA Jetson but cause massive, unacceptable latency spikes on a Raspberry Pi.
  • Action Space Factorization is Crucial: Trying to select a single (model, quantization, device) combination directly results in a massive action space that causes RL training to diverge. Factoring the policy into sequential sub-actions dramatically improves sample efficiency and allows the agent to stabilize rapidly within 200 training episodes.

Key Results

Evaluated on a realistic 64-node Kubernetes-based edge cluster, DRLM achieved significant performance gains over state-of-the-art methods like RouteLLM and OptLLM:

  • Latency & Queue Reduction: DRLM shortened inference latency by up to 51% and slashed queuing delays by up to 67% by dynamically balancing the cluster load.
  • High Efficiency Under Heavy Load: Under peak workloads (100 concurrent requests), DRLM reduced waiting times by 52% to 62% compared to competitive baselines, while sacrificing at most 8% accuracy.
  • Low Operational Overhead: The factorized policy network makes routing decisions in just ~35 ms per query, representing a 30% to 60% reduction in orchestration overhead compared to optimization-based approaches.

Limitations and Future Work

While DRLM excels at balancing latency and quality, its Quality Estimator relies on coarse, class-conditioned empirical statistics (lookup tables) rather than dynamic, per-query accuracy predictions. This means highly unusual queries within a standard class might receive sub-optimal routing.

For future work, the authors plan to expand DRLM into a true multi-objective optimization framework that explicitly accounts for hardware energy consumption and monetary costs—two critical factors for sustainable edge computing deployments.

Summary updated

BibTeX
@misc{farahani2026drlm,
  author = {Reza Farahani and Zoha Azimi Ourimi and Mario Colosi and Lauri Loven and Christian Timmerer and Schahram Dustdar},
  title = {{DRLM: Deep Reinforcement Learning-Based LLM Query Orchestration in Edge Environments}},
  year = {2026},
  eprint = {2609.00442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.00442},
}
Figure