Multi-Ability Fusion in General LLMs: Final Fine-Tuning and Iteration Practices
This article explains how engineering teams merge general conversation and code capabilities into a single large language model. It covers the three-layer fusion architecture across data, post-training alignment, and inference routing, a dual-track evaluation approach to prevent capability regression, the incremental gains delivered by a final fine-tuned release, and a reusable checklist for moving from evaluation to production rollout.
1. Background: Why a Single Model with Multiple Abilities
In general-purpose LLM engineering, teams often run into a familiar split: one model excels at open-domain conversation and content generation, while another excels at code completion, cross-file understanding, and debugging suggestions. The two capability sets map to different training data distributions, different alignment objectives, and sometimes different inference parameter configurations. Maintaining two product lines over time forces the business side to support two integration paths, two prompt templates, and two evaluation baselines, while operations and compliance costs rise in parallel.
In the second half of 2024, the industry began merging and upgrading two prior models into one. One general LLM shipped a fused version on September 5, 2024, combining the conversation-focused model with the code-focused model into a single model and releasing it on both the web interface and the API. A final fine-tuned version followed on December 10, 2024, strengthening mathematical reasoning, code generation, and role-play, and filling in peripheral capabilities such as web search and file upload parsing, which marked the end of that iteration cycle. This version was released under a permissive open-source license, making private evaluation and secondary integration inside enterprises easier.
At an abstract level, the core of this kind of work is not “gluing two models together” but solving three engineering problems: how to unify capability boundaries, how to keep preference alignment from contaminating itself, and how to build an evaluation system that covers both conversation and code.
2. Three Layers of Capability Fusion
2.1 Data Layer: Unified Corpus Mixture and Deduplication
The first step is rebuilding the data mixture. General conversation corpora emphasize diversity and safety, while code corpora emphasize executability, dependency relationships, and comment conventions. In practice, layered sampling is common: first bucket by task type, then score by quality within each bucket, and finally apply deduplication and contamination detection to remove evaluation-set leakage. A schematic flow:
raw_corpus-> language/fence detection (natural language vs. code fence recognition)-> quality scoring (compilability, readability, safety)-> dedup (near-duplicate removal + evaluation-set contamination filtering)-> mixture sampling (conversation:code = tunable ratio)-> post-training dataset
2.2 Training Layer: Post-Training Alignment Instead of Retraining from Scratch
Fused versions usually do not re-run pre-training. Instead, they apply post-training on top of an existing base model. The common combination is supervised fine-tuning plus preference optimization: supervised data drives “can do the task,” preference data drives “does it in a way humans expect.” Preference data typically comes in pairs, where one response is more helpful and the other contains factual errors, overreach, verbosity, or code that does not run.
# Pseudocode: minimal loop for preference alignmentfor batch in preference_pairs:chosen, rejected = batch.chosen, batch.rejectedloss = preference_loss(model(chosen), model(rejected))loss.backward()optimizer.step()
2.3 Inference Layer: Unified Entry Point with Task Routing
Externally, only one model identifier is exposed. Internally, lightweight routing runs on request features: requests with a high proportion of code fences, stack traces, or function signatures take a code-first decoding strategy, while open-ended Q&A and long-form writing take a conversation-first strategy. Routing does not change model weights; it only adjusts decoding and prompt templates, avoiding a fragmented experience where one model behaves like two.
3. Evaluation: Proving the Fused Model Is Not Lopsided
The most common risk of a fused model is “code gets stronger, writing gets weaker,” so evaluation must run on two tracks in parallel. Among widely used public benchmarks, the conversation side tracks metrics such as ArenaHard win rate and AlpacaEval 2.0 score, while the code side tracks pass rates and executable test-case coverage. The fused version mentioned in the source article improved its ArenaHard win rate from 68.3% to 76.3% and reached 50.5 on AlpacaEval 2.0. The value of such numbers is a comparable relative baseline, not an absolute capability guarantee.
Enterprises are advised to build their own three-tier evaluation:
| Tier | Goal | Example Metrics |
|---|---|---|
| Unit | No regression on individual capabilities | Code execution rate, instruction slot hit rate |
| Scenario | Usable in real business flows | Ticket resolution rate, first-pass document approval rate |
| Regression | No rollback introduced by version upgrades | Win rate and variance on a fixed question set |
For execution, always fix random seeds and decoding parameters, and retain raw outputs for review. Run code tasks in a sandbox so untrusted code never reaches the main network.
4. Incremental Capabilities from the Final Fine-Tuned Version
The final fine-tuned version released on December 10, 2024 focused not on parameter scale but on filling in task coverage:
- Mathematical reasoning: stronger step-by-step reasoning and more stable formula formatting, with fewer skipped steps and unit errors;
- Code generation: better cross-language transfer and dependency awareness, with fewer invented, nonexistent interfaces;
- Writing and role-play: more consistent style while preserving factual constraints;
- File upload parsing: improved structured extraction with better tolerance for tables, logs, and configuration files;
- Web search: extending “memory” into “verifiable external information,” reducing errors caused by stale facts.
From an engineering standpoint, web search and file parsing are add-on capabilities that need separately designed permissions and auditing: search requests must be redacted, uploaded files must be restricted by type and size, and parsing results must annotate source snippets for traceability.
5. Implementation Checklist: Reusable Steps from Evaluation to Launch
- Define scenario weights: determine the traffic split between conversation and code first, then set the fusion mixture ratio;
- Establish a baseline: use the current production model as an A/B baseline instead of relying on a “feels better” impression;
- Run a small-traffic canary: split traffic by tenant or request hash, and watch error rates and latency percentiles;
- Govern prompts and templates: unify system prompts, code fence conventions, and output format constraints;
- Add cost guardrails: set quotas and caching for long contexts and high-frequency code completion;
- Ensure observability: log task type, decoding parameters, and evaluation hits to close the regression loop;
- Handle compliance and licensing: confirm the model license permits commercial use and redistribution, and keep audit records.
6. Common Pitfalls
- Pitfall 1: treating fusion as “adding parameters together.” It is actually a rebalancing of data distributions and alignment objectives.
- Pitfall 2: looking only at the aggregate score. A flat total with a code decline still registers as a regression on the business side.
- Pitfall 3: treating web search as a universal fix. Retrieval only supplements evidence; it cannot replace factual constraints and citation discipline.
- Pitfall 4: ignoring the license. A permissive license lowers the barrier to use but still requires compliance with attribution and distribution terms.
7. Conclusion
The path from “two models in parallel” to “a single fused model” and then to a “final fine-tuning wrap-up” is essentially about reducing integration complexity with a unified entry point, aligning with human preferences through post-training, and defending capability floors with dual-track evaluation. For developers, what is genuinely reusable is the method: set scenario weights first, then handle data mixture and preference alignment, and finally use canary releases and regression testing to keep upgrades safe. If managed training, inference, and monitoring capabilities are needed, engineering delivery can be built on general product categories such as the container platform, object storage, log service, and monitoring and alerting offered by Baidu AI Cloud.
