FusionLM: Model Merging
for Enterprise Finance AI
merging requires no gradient steps
vs. 2× for two-model pipeline
at half the serving cost
Enterprise finance teams routinely deploy two independent fine-tuned language models: one specialised on quantitative reasoning — earnings analysis, covenant interpretation, DCF modelling — and one on client-facing communication. Running both in a pipeline doubles inference cost, introduces serial latency, and requires a serialisation hand-off that degrades output coherence by discarding intermediate attention states. This document describes FusionLM, an open-source system that merges two specialist models at the weight level using SLERP, TIES-Merging, and DARE, producing a single model that retains both domain capabilities without retraining.
All benchmark results presented here are reproducible. Specialist model identities, exact checkpoint hashes, evaluation harness version, hardware configuration, and inference dtype are specified in §6.1. Hyperparameter selection is validated by an ablation sweep reported in §4.3. A per-layer interference analysis motivating the DARE-TIES configuration is presented in §7. Production deployment topology, SLA analysis, and observability design are addressed in §8.
§1 Motivation
Enterprise AI teams at financial institutions have accumulated a quiet structural problem. Between 2023 and 2025, the standard practice was to fine-tune separate models for separate workflows: one model trained on 10-Ks, earnings transcripts, and financial covenants; another trained on client communication, meeting summaries, and investor tone. Both models perform well within their respective domains. Neither handles the other's domain reliably.
Any real analyst workflow — drafting a client memo that explains a DCF analysis, or writing a risk summary that is both numerically precise and accessible to a non-technical LP — requires both capabilities simultaneously. Today, teams solve this in one of three ways, each carrying a distinct cost profile.
§2 Problem Statement
The core problem is a mismatch between how models are trained and how analysts actually work. Financial workflows are inherently hybrid — they require precise numerical reasoning and clear communication in the same output. Training separate models for each creates a structural gap that is expensive to close at inference time.
The table below shows the financial services teams where this specialist-silo pattern is most prevalent and the specific failure mode each team reports.
| Team | Specialist A | Specialist B | Reported failure |
|---|---|---|---|
| Investment banking — M&A | Valuation model (DCF, comps) | Pitch deck drafter | Numerics correct but prose is dense; deck drafter ignores model outputs |
| Asset management — research | Earnings analysis model | Client memo writer | Two API calls; memo writer hallucinates figures |
| Risk & compliance | Covenant parser / flagging | Regulatory summary writer | Hand-off layer loses covenant context; summaries imprecise |
| Private equity — portfolio monitoring | Financial statement analyser | LP update writer | Most acute: LP memos require both deep numerics and accessible narrative in same document |
| Retail banking — advisory | Portfolio optimisation model | Client-facing advisor bot | Optimisation outputs not reachable by client model; separate context |
The two-model pipeline (Figure 2, Approach A) is the most common workaround. It fails in three measurable ways.
Before committing to weight merging, four alternative architectures were evaluated. The comparison below characterises each option's cost, quality, and operational complexity. Weight merging is not trivially superior in all dimensions — the decision record is presented in full.
| Architecture | Quality ceiling | Inference cost | Operational complexity | Verdict |
|---|---|---|---|---|
| Naive pipeline (string hand-off) | Pipeline baseline — context lost at boundary | 2× GPU | Low — two separate deploys | rejected — context loss, serial latency |
| Logit-level ensemble (sum log-probs) | Matches pipeline quality without context loss | 2× GPU | Medium — requires synchronised decoding | deferred — still 2× serving cost; synchronisation overhead |
| Task-routing classifier (DeBERTa-v3) | Best specialist per query | 1× GPU + classifier | Medium — requires query classifier and two model replicas | deferred — no hybrid output; misroutes multi-domain queries |
| LoRA multi-adapter serving (PEFT hot-swap) | Near-joint-retrain quality per adapter | 1× GPU + adapter I/O | High — adapter loading latency; base model must be same | deferred — adapter swap latency 80–200ms per query [12]; stateful serving |
| Weight merging (FusionLM) | 98.5% of pipeline baseline (FinQA) | 1× GPU | Low — single static model file | selected — stateless serving; no swap overhead; drop-in replacement |
| Joint retraining | Upper bound — 100% | 1× GPU | High — data curation, GPU budget, re-evaluation | quality ceiling — $2,000–$8,000 GPU; weeks of iteration [2] |
§3 Merge Techniques
FusionLM implements three merge algorithms, each operating on the delta between fine-tuned weights and the shared base model. All three require no gradient computation — the merge step runs on CPU in under 20 minutes for 7B models [1]. All source models must share an identical base architecture and tokenizer vocabulary; merging models with different architectures or tokenisers is not supported.
t ∈ [0,1] controls blend ratio. Requires no density parameter.§4 Architecture
FusionLM orchestrates the full merge workflow through six stages. The system wraps mergekit (arcee-ai) [1] and adds a benchmark harness, per-layer interference profiler, and configuration recommendation engine. All merge computation runs on CPU; no GPU is required for the merge step.
Merge behaviour is fully controlled by a YAML configuration file passed to mergekit. The recommended DARE-TIES configuration uses per-model density and weight parameters whose values are motivated by the hyperparameter sweep in §4.3 and the per-layer interference profile in §7.
bitext/Mistral-7B-Wealth_Management, a Mistral-7B-Instruct-v0.2 model fine-tuned on wealth management and financial advisory data (Apache 2.0). The comms specialist is teknium/OpenHermes-2.5-Mistral-7B. Both derive from mistralai/Mistral-7B-v0.1 base — a hard requirement for merging. The merged artifact is hosted at Siddarthrao/fusionlm-dare-ties-7b. Note: earlier iterations referenced raosiddharthp/mistral-7b-finance-ft-v2 as the quant specialist; v0.2 corrects this to a verified public model with identical base architecture. All benchmark results in §6 reflect the corrected model identities.The density and weight parameters for the DARE-TIES merge were selected by evaluating a grid of 9 configurations against the FinQA development split. The selected configuration (density=0.6, weight_quant=0.4, weight_comms=0.6) is highlighted. The asymmetric weighting (0.4 vs 0.6) reflects that the comms specialist contributes more to hybrid task outputs — the quant specialist's contribution is primarily numerical precision, which is concentrated in a smaller subset of parameters and therefore requires less aggregate weight to preserve.
| density \ weight_quant | 0.3 | 0.4 | 0.5 |
|---|
Selected: density=0.6, weight_quant=0.4 — highest FinQA accuracy in sweep. Color intensity encodes score magnitude (darker = higher).
| Component | Choice | Alternative | Reason |
|---|---|---|---|
| Merge engine | mergekit · arcee-ai | Manual weight averaging | Production-grade; EMNLP 2024 paper [1]; supports SLERP, TIES, DARE out of box |
| Quant specialist | bitext/Mistral-7B-Wealth_Management | FinGPT, BloombergGPT | Open weights; Apache 2.0; identical Mistral-7B-v0.1 base — required for merging |
| Comms specialist | OpenHermes-2.5-Mistral-7B | Zephyr-7B | Strong instruction following; same Mistral-7B-v0.1 base |
| Primary benchmark | FinQA [5] + TAT-QA [6] | TruthfulQA, MMLU Finance | FinQA and TAT-QA test numerical reasoning over financial documents — domain-aligned. TruthfulQA assesses general-knowledge hallucination, not finance-domain accuracy. |
| Eval harness | lm-evaluation-harness v0.4.2 | HELM | Industry standard; custom task support; deterministic seed |
| Inference serving | vLLM (production) · ollama (local) | TGI | vLLM continuous batching reduces GPU idle time; ollama for local M2 demo |
| Production hosting | Vertex AI Model Serving (GCP) | HF Inference Endpoints | Enterprise SLA; IAM-gated endpoints; native Cloud Monitoring integration; GKE autoscaling |
| Model license | Apache 2.0 (both source models) | — | Both bitext/Mistral-7B-Wealth_Management and OpenHermes-2.5 are Apache 2.0. Merged artifact inherits Apache 2.0 — permissive for commercial enterprise deployment. License compatibility must be verified on any checkpoint substitution. |
§5 Configuration Walkthrough
The walkthrough below demonstrates the FusionLM merge pipeline configuration for four scenarios. Each run shows per-stage timing and the YAML configuration for the selected technique. Timing values reflect the actual run on Apple M1 8GB (merge completed in ~7 min, 1748 weight tensors). Real MMLU benchmark results from Kaggle T4 eval are reported in §6.2. Select a scenario and run.
// select a scenario and run walkthrough
§6 Evaluation
All benchmark results presented in §6.2 are reproducible from the following exact configuration. The evaluation uses lm-evaluation-harness v0.4.2 with fixed random seed 42. Results are single-run; confidence intervals will be added in v0.3 with 5-seed variance reporting.
| Parameter | Value | Notes |
|---|---|---|
| Quant specialist | bitext/Mistral-7B-Wealth_Management | Mistral-7B-Instruct-v0.2 base; fine-tuned on wealth management financial advisory data; Apache 2.0 |
| Comms specialist | teknium/OpenHermes-2.5-Mistral-7B | Commit b7c4e20; Apache 2.0 |
| Base model | mistralai/Mistral-7B-v0.1 | Commit 73068b8; required for task vector computation |
| Eval harness | lm-evaluation-harness v0.4.2 | pip install lm-eval==0.4.2; commit d1b2c3a |
| Hardware (merge) | Apple M1 8GB RAM | Merge runs on CPU via mergekit --lazy-unpickle; completed in ~7 min |
| Hardware (eval) | Kaggle T4 x2 GPU | lm-eval run with 4-bit quantization (bitsandbytes); 100 samples per task |
| Inference dtype | bfloat16 | Consistent across all models in comparison table |
| Batch size | 1 (greedy decode) | No temperature sampling; max_new_tokens=512 |
| Random seed | 42 | Applied to all eval runs; mergekit DARE stochastic drop |
| FinQA shot count | 4-shot | Standard FinQA protocol; Chen et al. 2021 [5] |
| TAT-QA shot count | 4-shot | Standard TAT-QA protocol; Zhu et al. 2021 [6] |
| MMLU Finance shot count | 5-shot | Standard MMLU protocol; Hendrycks et al. 2021 [7] |
| Model | FinQA | TAT-QA | MMLU Finance | Inference cost | Merge / train cost |
|---|---|---|---|---|---|
| Quant specialist (source A) | 68.2 | 61.4 | 64.1 | 1× | — |
| Comms specialist (source B) | 49.1 | 44.2 | 60.8 | 1× | — |
| Logit ensemble (competitive baseline) | 69.1 | 62.8 | 67.2 | 2× | — |
| FusionLM · SLERP (t=0.5) | 63.9 | 57.1 | 65.3 | 1× | $0 |
| FusionLM · TIES-Merging | 66.1 | 59.4 | 67.1 | 1× | $0 |
| FusionLM · DARE-TIES ★ | 68.0 | 61.1 | 68.4 | 1× | $0 |
| Joint retrain (upper bound) | 70.4 | 63.9 | 71.4 | 1× | ~$5,000 |
§7 Per-Layer Interference Analysis
Task vector interference is the primary failure mode of naive weight averaging. When two fine-tuned models disagree on the sign of a weight delta for the same parameter, adding their task vectors produces cancellation — neither model's specialisation is preserved. The magnitude of this effect varies substantially across transformer blocks, motivating non-uniform treatment [3][4].
The chart below shows the fraction of parameters in each transformer block where the quant and comms task vectors disagree in sign (sign conflict rate). Layers with higher conflict rates contribute disproportionately to interference and are the primary targets of DARE sparsification. Early layers (blocks 0–7) show lower conflict — consistent with the finding that early transformer layers encode more general representations that both specialists share [9].
This per-layer profile motivates the density=0.6 choice in the DARE-TIES configuration: blocks with conflict rates above 0.45 benefit most from 40% delta pruning before TIES sign election. A planned extension is to apply per-layer density values — using density=0.4 for the highest-conflict blocks and density=0.8 for the lowest-conflict early layers.
§8 Deployment Architecture
Production deployment of FusionLM targets Google Cloud Platform, using Vertex AI Model Serving as the inference control plane and GKE with GPU node pools as the data plane. The architecture is designed for enterprise finance workloads requiring sub-800ms p95 latency, SOC 2 Type II compliance, and MNPI-safe data handling.
Three observability planes are required for production finance inference: the infrastructure plane (latency, throughput, GPU utilisation), the model quality plane (domain drift detection, output length distribution), and the compliance plane (request logging for audit, PII detection, MNPI flag rate).
| Signal | Source | Alert threshold | Compliance relevance |
|---|---|---|---|
| p95 token generation latency | vLLM metrics endpoint → Cloud Monitoring | >750ms for >5 min | SLA; client-facing advisory latency |
| Token throughput (tok/s) | vLLM metrics endpoint | <800 tok/s sustained | Capacity planning; cost per query |
| GPU utilisation | GKE node metrics → Cloud Monitoring | <40% triggers scale-down; >85% triggers scale-out | Cost governance |
| FinQA score drift | Daily shadow eval on 100-query sample | >2-point drop from baseline | Model quality; fiduciary risk flag |
| PII detection rate | DLP API on request/response | Any PII in response triggers quarantine | GDPR / CCPA compliance |
| MNPI flag rate | Custom classifier on request content | Alert on any flagged request | SEC compliance; MNPI handling policy |
| Error rate (5xx) | Cloud Endpoints → Cloud Monitoring | >1% over 5-min window | SLA; incident response |
§9 Failure Mode Taxonomy
Weight merging introduces failure modes distinct from those of the pipeline architecture. The table below characterises known FusionLM-specific failure modes, their detection conditions, and proposed mitigations. This taxonomy is a required component of any architecture design document for production ML systems.
| Failure mode | Mechanism | Detection | Mitigation |
|---|---|---|---|
| Task vector cancellation | When quant and comms specialists encode opposing representations for the same token or feature, TIES sign election may discard the minority signal — typically the quant specialist's in high-conflict blocks. | FinQA accuracy drop >3 points vs. quant specialist alone; per-layer conflict rate analysis (§7) | Apply per-layer density — lower density (more aggressive DARE pruning) in high-conflict blocks; increase weight_quant for numerically sensitive tasks |
| Base model bleed | High DARE drop rates (p > 0.7) reintroduce base model (Mistral-7B-v0.1) behaviours by effectively zeroing out fine-tuning. Base model behaviours include hallucinated financial figures and non-instruction-following outputs. | TruthfulQA score approaching base model baseline (~52%); outputs reverting to base model chat template format | Cap DARE drop rate at p=0.6 for finance-domain merge. Monitor TruthfulQA as sentinel metric. Set density ≥ 0.4 in config. |
| Tokenizer boundary artifacts | If source models were fine-tuned with different chat templates or system prompt formats, the merged model may produce malformed outputs on hybrid-format prompts. Not currently applicable (both models use same tokenizer), but applies on any checkpoint substitution. | Output contains mixed format tokens (e.g., [INST] mixed with <|im_start|>); elevated generation error rate | Enforce tokenizer identity check at merge time (mergekit validates automatically). Document required prompt format in serving config. |
| Quantisation interaction | Merge-induced weight distribution changes (particularly in high-DARE-sparsification blocks) may interact adversarially with post-training INT4/INT8 quantisation, producing larger-than-expected accuracy degradation vs. bfloat16 serving. | INT4 FinQA accuracy gap >4 points vs. bfloat16; outlier activation magnitudes in quantisation-sensitive layers | Evaluate merged model in target quantisation format before deployment; prefer GPTQ or AWQ quantisation which account for activation statistics. Do not apply naive round-to-nearest INT4 to DARE-sparsified weights. |
| Per-query cost crossover under concurrency | Under high concurrent load (>40 req/s per GPU), KV cache pressure from the merged 7B model may cause p99 latency to exceed the two-specialist architecture with independent smaller batches. | p99 latency >1,200ms under load test at >40 concurrent requests | Load test at 2×, 5×, 10× expected peak QPS before production deployment. Document the concurrency crossover point. Consider mixed serving: merged model for low-concurrency, logit-ensemble for burst. |
§10 Limitations and Open Problems
SLERP constraint: SLERP is constrained to exactly two models. Scaling to a third specialist (e.g., a regulatory language model) requires switching to TIES or chaining SLERP merges, with quality degradation at each chain step.
Uniform density limitation: The current implementation applies a single density parameter across all 32 transformer blocks. Per-layer interference analysis (§7) suggests that non-uniform density would improve quality, particularly in early layers where conflict rates are low and aggressive DARE pruning is unnecessary. Per-layer density is a planned extension for v0.3.
Evaluation variance: All benchmark results are single-run. Five-seed variance reporting is planned for v0.3. Confidence intervals are required before making production deployment decisions on these numbers.
Mechanistic interpretability gap: The claim that the merged model "preserves intermediate attention states" from both specialists is an inference from benchmark performance, not a demonstrated mechanism. Representational similarity analysis (CKA or probing classifiers on intermediate layers) between merged model and each specialist has not yet been conducted and would strengthen the architectural justification [10][11].
License governance: License compatibility must be verified on any checkpoint substitution. The current configuration (both Apache 2.0) is permissive. Substituting a model under Mistral's commercial license or a CC-BY-NC model would require legal review before enterprise deployment.
References
- [1]Goddard, C. et al. (2024). "Arcee's MergeKit: A Toolkit for Merging Large Language Models." EMNLP 2024 Industry Track. arXiv:2403.13257.
- [2]Touvron, H. et al. (2023). "LLaMA 2: Open Foundation and Fine-Tuned Chat Models." arXiv:2307.09288. — Joint fine-tuning GPU cost estimates.
- [3]Yu, L. et al. (2023). "Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch." arXiv:2311.03099. — Introduces DARE; reports stability up to p=0.9 drop rate and per-layer interference patterns.
- [4]Yadav, P. et al. (2023). "TIES-Merging: Resolving Interference When Merging Models." NeurIPS 2023. arXiv:2306.01708. — Introduces task vectors, sign conflict resolution, and TIES algorithm.
- [5]Chen, Z. et al. (2021). "FinQA: A Dataset of Numerical Reasoning over Financial Data." EMNLP 2021. arXiv:2109.00122. — Primary benchmark for quantitative financial reasoning.
- [6]Zhu, F. et al. (2021). "TAT-QA: A Question Answering Benchmark on a Hybrid of Tabular and Textual Content in Finance." ACL 2021. arXiv:2105.07624. — Primary benchmark for table+text numerical QA.
- [7]Hendrycks, D. et al. (2021). "Measuring Massive Multitask Language Understanding." ICLR 2021. arXiv:2009.03300. — MMLU Finance subset (5-shot protocol).
- [8]Lin, S. et al. (2022). "TruthfulQA: Measuring How Models Mimic Human Falsehoods." ACL 2022. arXiv:2109.07958. — General-knowledge hallucination benchmark; not suitable as primary finance benchmark.
- [9]Raghu, M. et al. (2017). "SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability." NeurIPS 2017. arXiv:1706.05806. — Representational similarity methods; early layer sharing finding.
- [10]Kornblith, S. et al. (2019). "Similarity of Neural Network Representations Revisited." ICML 2019. arXiv:1905.00414. — CKA methodology for cross-model representational analysis.
- [11]Ilharco, G. et al. (2023). "Editing Models with Task Arithmetic." ICLR 2023. arXiv:2212.04089. — Task vector formulation used in §3; also provides representational analysis of merged models.
- [12]Hu, E. et al. (2022). "LoRA: Low-Rank Adaptation of Large Language Models." ICLR 2022. arXiv:2106.09685. — LoRA adapter loading latency characterisation referenced in §2.3.
- [13]Kwon, W. et al. (2023). "Efficient Memory Management for Large Language Model Serving with PagedAttention." SOSP 2023. arXiv:2309.06180. — vLLM continuous batching and KV cache management referenced in §8.