Token-Level Multi-LLM Routing and Collaborative Generation: Architecture and Training Practice

    This article examines token-level collaboration among multiple large language models, focusing on a lightweight router that performs expert selection and complementary logit correction at each generation step. It reviews the limitations of MoE, multi-agent systems, and model merging; explains the design rationale through an MDP perspective; outlines a two-stage SFT and CDPO training strategy; and summarizes experiment design considerations and practical lessons for building lower-cost, higher-quality multi-model LLM services.

    Background: The Tension Between Capability and Cost

    Large language models have demonstrated strong capabilities in mathematical reasoning, code generation, instruction following, and other areas. However, building a general-purpose model that performs well across all domains often requires an extremely large parameter scale, which drives up both training and deployment costs. Small domain-expert models are efficient at inference and can perform strongly within a single domain, but they have an obvious generalization bottleneck: once a task falls outside their training distribution, quality drops quickly.

    As a result, real systems commonly face a trade-off: use one expensive general-purpose large model, or combine multiple cheaper expert models? Multi-model collaboration is a technical direction that emerged to address this tension. Its core goal is to approach or even exceed the performance of a single very large model while keeping overall cost lower.

    Limitations of Existing Collaboration Approaches

    Before discussing token-level collaboration, it is useful to review the problems with three mainstream approaches:

    1. Mixture-of-Experts (MoE): Multiple experts are embedded inside a unified model and activated sparsely. This can work well, but training costs are high, architectural constraints are strong, and it is difficult to reuse existing independent expert models.
    2. Multi-Agent Systems (MAS): Multiple models collaborate at the response level through dialogue, debate, or similar mechanisms. This is flexible, but each interaction requires passing the full context, resulting in high latency and token overhead. The context window can also be quickly consumed by multiple rounds of interaction.
    3. Model merging: The parameters of multiple models are directly fused. This is low-cost, but the parameter spaces of different models may interfere with one another, and the weights are static, so expert contributions cannot be adjusted dynamically based on the input.

    The approach that truly comes closest to “fine-grained collaboration” is token-level collaboration—deciding at each generation step who should produce the next token and how the outputs should be fused. It has the greatest potential, but most existing methods rely only on the raw output distributions of expert models. Once an expert gives an incorrect high-confidence prediction on a token it is unfamiliar with, the entire system can be led astray, resulting in insufficient robustness.

    Core Design: A Dual-Task Router with Complementary Logits

    To address these issues, a framework can be built around a lightweight router inserted into the generation path, performing two tasks at each step:

    • Expert selection: Based on the current context, choose the candidate expert model most suitable for generating the next token.
    • Complementary correction: The router itself outputs a set of complementary logits that are fused with the selected expert’s logits to correct or refine the expert’s prediction.

    Schematically, the next-token distribution can be represented as:

    1. final_logits = combine(router_logits, expert_logits[selected])

    This “complementary generation” is a key design choice: the system no longer blindly trusts expert output. When an expert model makes a mistake on a token, the router’s complementary logits can partially override that error. When the expert performs well, the influence of the complementary term can be learned to be small. Selection and correction are decoupled yet coordinated, creating a larger policy space than “pure routing selection.”

    Theoretical Perspective: Why Selection Alone Is Not Enough

    Modeling token-level collaboration as a Markov Decision Process (MDP) provides a rigorous way to argue this point:

    • The state is the prefix generated so far, and the action includes “which expert to select” and “how to fuse the output.”
    • If the action space is restricted to pure expert selection, it can be shown that reaching an optimal policy under this setting requires fairly strong assumptions—for example, that the set of expert models has global coverage of the target distribution (for any state, there is always an expert that can produce the optimal token). This assumption is difficult to satisfy in practice, especially for cross-domain inputs.
    • With complementary logit generation, the action space expands from discrete selection to a combination of selection plus continuous correction, significantly enlarging the policy space. Theoretical analysis shows that the optimal value function can be recovered under looser conditions.

    This explains theoretically why “selection plus correction” is more robust than “selection only”: the correction mechanism provides a fallback path for erroneous predictions and reduces dependence on expert coverage.

    Staged Training Strategy

    Training uses a two-stage scheme that balances stability and error-correction capability:

    Stage 1: Supervised Fine-Tuning (SFT)
    High-quality multi-domain data is used to train the router so that it learns:

    • A stable expert selection policy (correct routing in scenarios such as mathematics, code, and general instructions);
    • Basic complementary logit generation capability.

    The goal of this stage is to establish a stable collaborative relationship between the routing layer and the expert models, avoiding severe routing oscillation early in training.

    Stage 2: Complementary Direct Preference Optimization (CDPO)
    The router’s complementary logits are further optimized on preference data so that the system can actively correct systematic errors from expert models. The key point in this stage is that the preference signal not only tells the model “which output is better,” but also indirectly tells the router through gradients “which types of tokens experts tend to get wrong and how much compensation is needed.”

    The two stages together enable coordinated optimization of the routing layer and the base models, balancing “selecting the right expert” and “correcting the output well.”

    Experiment Design Considerations

    When validating this type of framework, a reasonable experimental setup typically includes:

    • Expert model selection: Choose two model families with different architectures as experts, covering the three major domains of mathematical reasoning, code generation, and instruction following, in order to examine the framework’s compatibility with different model sources.
    • Data: Use a mixed dataset covering multiple domains for training and testing, and introduce high-quality preference data to support the second-stage optimization.
    • Comparison baselines: Include sequence-level collaboration, multi-agent systems, model merging, and token-level routing with pure expert selection. Evaluate comprehensively across performance, robustness, and inference overhead.

    Reported public results indicate that this type of “selection plus complementary correction” token-level collaboration scheme can achieve better overall performance than traditional collaboration methods on multi-domain tasks, while keeping inference overhead within an acceptable range.

    Practical Takeaways

    For teams that need to combine multiple models in production environments, this direction offers several lessons:

    1. Fine-grained routing is preferable to response-level orchestration: Token-level decisions greatly reduce the context overhead of multi-agent interaction.
    2. Do not fully trust experts: The router should have independent correction capability rather than performing only discrete selection.
    3. Train in stages: First stabilize routing behavior, then perform preference-driven error-correction optimization. This is an effective way to reduce training difficulty.
    4. Think clearly at the theoretical level first: MDP modeling helps determine whether the action space is large enough before implementation, avoiding solutions that depend on strong assumptions.

    As the open-source expert model ecosystem becomes increasingly rich, token-level collaboration based on lightweight routers is expected to become an important technical option for low-cost, high-quality LLM services.