Bridging On-Device and Cloud LLMs for Collaborative Reasoning: A Unified Methodology for Local Routing and Post-Training

Wenzhi Fang, Dong-Jun Han, Liangqi Yuan, Evan Chen, Christopher Brinton

TL;DR

This paper introduces a unified reinforcement learning (RL) framework that trains on-device Large Language Models (LLMs) to solve reasoning tasks while simultaneously learning when to "call for help" from a powerful cloud model. By embedding the routing decision directly into the model's internal reasoning process, the authors eliminate the need for external classifiers. This approach achieves performance near cloud-only levels while staying within strict resource budgets.

The Challenge of Device-Cloud Collaboration

Deploying LLMs involves a classic trade-off. On-device models (like Llama-3.2-1B) are fast, private, and inexpensive to run, but they often struggle with complex reasoning tasks. Conversely, cloud models (like DeepSeek-R1) offer brilliant reasoning capabilities but are expensive, require constant internet access, and introduce latency.

To balance these trade-offs, developers typically use "routing"—employing a separate, small classifier to decide if a query is "easy" enough for the device or "hard" enough to require the cloud. However, the authors identify three major flaws in this standard approach:

  1. Surface-Level Judgment: External routers only see the prompt. They cannot determine if a problem is truly difficult until the model actually attempts to solve it.
  2. Redundancy: Using a reasoning model as a router is computationally wasteful, as it duplicates the initial processing the on-device model should be doing.
  3. Decoupled Optimization: Training the router and the on-device model separately ignores the potential for the model to learn its own specific strengths and weaknesses.

A Unified Methodology: Group-Adaptive Policy Gradient (GAPG)

To overcome these limitations, the authors propose a unified methodology called Group-Adaptive Policy Gradient (GAPG). Instead of relying on a separate router, the on-device model is trained to emit a special <unknown> token when it determines internally that it cannot solve a problem.

This capability is instilled through RL-based post-training, utilizing three key technical components:

1. Hierarchical Rewards

The RL process frames post-training as a reward maximization problem featuring a "competition" between two rewards:

  • An Accuracy Reward ($\alpha_a$) for solving the problem locally.
  • A Coordination Reward ($\alpha_c$) for successfully offloading to the cloud.

By setting $\alpha_a > \alpha_c$, the model is heavily incentivized to prioritize independent problem-solving, calling the cloud only as a last resort.

2. Adaptive Prompt Filtering

A common issue in RL routing is "policy collapse," where a model either becomes too "lazy" (offloading everything) or too "stubborn" (never calling for help). To prevent this, the algorithm dynamically filters training batches. It ensures the model is consistently exposed to a balanced mix of prompts it can solve and prompts that require cloud assistance, calibrated to its current competence level.

3. Group-Level Policy Gradient

Inspired by DeepSeek’s GRPO, this technique stabilizes training by sampling multiple responses for the same prompt. It uses the group's mean reward as a baseline, which significantly reduces gradient variance and stabilizes optimization.

Datasets and Evaluation

The models (including on-device-scale LLaMA and Qwen models) were trained and evaluated on reasoning-heavy datasets:

  • Countdown: A symbolic reasoning task requiring models to reach a target number using basic arithmetic.
  • MATH-lighteval: A collection of 12,500 competition-level math problems.
  • Generalization Benchmarks: To test how well the learned routing transfers to unseen data, the authors evaluated the models on MATH-500, AMC23, MinervaMath, and AGI-Eval-Math.

Key Insights and Results

The GAPG method consistently outperformed traditional external routers and naive offloading strategies across multiple benchmarks.

  • The Model Knows Best: The most significant insight is that an LLM's internal reasoning state is a far better indicator of difficulty than the prompt alone. The model often attempts a few steps of reasoning, realizes it is "stuck," and then triggers the cloud call.
  • Early Exit Behavior: Analysis of "call-for-help" traces showed that the model does not just give up immediately. It performs substantive reasoning (averaging ~5 steps) before deciding to offload. This "early exit" saves significant token costs compared to a model that hallucinates a long, incorrect answer.
  • Substantial Accuracy Gains: On the MATH-lighteval benchmark, a Qwen-1.5B model using GAPG achieved 80.4% accuracy (with a 30% cloud budget), significantly outperforming the 70.9% achieved by a standard DeBERTa-based router.
  • Narrowing the Cloud Gap: With a 60% cloud budget, the collaborative system nearly matched the performance of a full cloud-only model while processing the majority of queries locally.
  • Transferable Routing: The routing logic learns a generalized strategy rather than just memorizing prompts. When the authors swapped the cloud model (DeepSeek-R1) for a weaker one (Qwen-30B) at inference time, the on-device model’s routing performance remained robust.

Limitations and Future Work

While highly effective for reasoning tasks, the authors note a few areas for future exploration:

  • Verifiable Rewards: The current framework relies on tasks with objective "ground truth" answers (like math and logic). Applying this to open-ended tasks (such as creative writing or summarization) would require more complex reward models, such as "LLM-as-a-Judge."
  • Hyperparameter Sensitivity: The balance between the local reward ($\alpha_a$) and cloud reward ($\alpha_c$) is critical. If the gap is too small, the model offloads too much; if too large, it never learns to collaborate. The authors suggest a coarse search strategy to find the "stable high-performing region."
  • Static Budgets: The current evaluation uses fixed cloud budgets. Future work could explore dynamic budgets that adjust on the fly based on real-time device constraints, such as battery life or network latency.

Summary updated

BibTeX
@inproceedings{fang2026bridging,
  author = {Wenzhi Fang and Dong-Jun Han and Liangqi Yuan and Evan Chen and Christopher Brinton},
  title = {{Bridging On-Device and Cloud LLMs for Collaborative Reasoning: A Unified Methodology for Local Routing and Post-Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=m0HB67qATB},
}
Figure