CoolFace
Modelpublic

pragmaticcs/Triumvirate-Qwopus-MiMo-Ornith-9B-Coder

sourceHugging Faceapache-2.0updated 3d agoView on Hugging Face
1likes199downloads
Model Card

Triumvirate-Qwopus-MiMo-Ornith-9B-Coder

<div align="center">

![License](https://opensource.org/licenses/Apache-2.0) ![Library](https://github.com/huggingface/transformers) ![Merge Method](#merge-methodology--mathematical-formulation) ![Architecture](#architectural-specifications) ![Attention-EB5757?style=for-the-badge)](#architectural-specifications) ![Context](#architectural-specifications)

</div>

Most sub-10B coding models crumble the moment they enter real-world agentic workflows: they either produce clean code but loop endlessly when a shell command fails, or handle tool calls reasonably well while hallucinating obscure API syntax.

Triumvirate is a merge designed to solve that dilemma. It combines three of the most capable specialized fine-tunes of **Qwen 3.5 9B** and fuses their task vectors directly into the base backbone:

[!IMPORTANT] The result is a lean, blisteringly fast 9B pure-text causal engine with a native 256k context window that runs comfortably on consumer GPUs.

Contents


Architectural Specifications

ParameterSpecification
Total Parameters8.8B (Text Backbone)
Architecture TypeDense Causal Language Model (qwen3_5_text)
Hidden Dimension (d<sub>model</sub>)4096
Intermediate Dimension (d<sub>mlp</sub>)12288 (SwiGLU)
Decoder Layers32
Attention MechanismHybrid Gated DeltaNet (3 Linear Attention : 1 Full Attention)
Full Attention LayersLayers 3, 7, 11, 15, 19, 23, 27, 31
Linear Attention Heads16 Key Heads / 32 Value Heads (d<sub>k</sub> = d<sub>v</sub> = 128)
Full Attention Heads16 Query / 4 Key-Value (GQA, d<sub>h</sub> = 256)
Rotary Position Embedding (RoPE)1D Partial RoPE (θ = 10⁷, Factor = 0.25)
Maximum Sequence Length262,144 tokens (256k)
Native Precisionbfloat16

Composition & Donor Weighting

The foundation checkpoint serves as the structural base (W₀). Three donor models contribute directional task vectors weighted continuously across network depth:

ModelRoleSpecialization FocusDepth Target
Qwen/Qwen3.5-9BBase Anchor (W₀)Structural anchor & GDN linear attention stateGlobal
Jackrong/Qwopus3.5-9B-CoderDonor 1 (D₁)Claude 3.5 Opus distillation; typing, syntax, algorithmsLower Layers (x ≤ 0.35)
ornith-ai/Ornith-1.5-9BDonor 2 (D₂)Agentic RL; loop-termination & error-pivot disciplineMid Layers (0.35 < x < 0.70)
XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9BDonor 3 (D₃)77.4B tokens SFT; SWE-bench Pro, multi-turn tool logicTop Layers (x ≥ 0.70)

Merge Methodology & Mathematical Formulation

The merge combines TIES-DELLA saliency trimming, consensus sign election, Gated DeltaNet norm stabilization, and continuous sinusoidal depth modulation.

1. Task Vector Formulation

For each donor checkpoint k ∈ {1, 2, 3}, the parameter update delta is isolated relative to the base anchor W₀:

$$ \tauk = Dk - W_0, \quad k \in \{\text{MiMo}, \text{Ornith}, \text{Qwopus}\} $$

2. Asymmetric Sinusoidal Depth Modulation

Task vector mixing coefficients are continuously parameterized over normalized network depth x = l / (L - 1), where l ∈ {0, 1, ..., 31} and L = 32:

$$ u_{\text{qwopus}}(x) = 0.45 \cos^2\left(\frac{\pi}{2} x\right) + 0.25 $$

$$ u_{\text{ornith}}(x) = 0.35 \sin^2\left(\pi x^{0.85}\right) + 0.15 $$

$$ u_{\text{mimo}}(x) = 0.55 \sin^2\left(\frac{\pi}{2} x^{1.20}\right) + 0.20 $$

The donor weights α<sub>k</sub>(l) are normalized to form a partition of unity across all layers:

$$ \alphak(l) = \frac{uk(x)}{\sum{j=1}^3 uj(x)}, \quad \sum{k=1}^3 \alphak(l) = 1.0 $$

  • —*Lower Layers (x → 0):* Qwopus dominates with α₁(0) ≈ 0.67, ensuring foundational language representations and syntax heads are grounded in Claude 3.5 Opus traces.
  • —*Middle Layers (x ≈ 0.5): The sub-linear exponent (x*<sup>0.85</sup>) accelerates Ornith's activation to peak across middle transformer blocks with α₂(16) ≈ 0.354, reinforcing state-space continuity and execution discipline.
  • —*Top Layers (x → 1): The super-linear exponent (x*<sup>1.20</sup>) concentrates MiMo's task vector with α₃(31) ≈ 0.652 into the upper decoders, governing semantic reasoning, multi-turn planning, and final token synthesis.

3. Saliency Trimming (TIES-DELLA Pruning)

To eliminate parameter interference and cross-talk, task vectors are pruned based on parameter energy. Given density parameter ρ = 0.70, an update threshold γ<sub>k</sub> is computed per tensor:

$$ \gammak = \text{Quantile}{1 - \rho}\left(\{|\tau_{k, ij}|\}\right) $$

Updates below the top 70% magnitude are zeroed out via a saliency mask:

$$ Mk = \mathbb{I}\left(|\tauk| \ge \gamma_k\right) $$

$$ \hat{\tau}k = \tauk \odot M_k $$

4. Consensus Sign Election & Disjoint Averaging

Surviving task vectors often conflict in directional signs, causing mutual cancellation when averaged naively. A directional consensus sign vector Γ is elected:

$$ \Gamma = \operatorname{sgn}\left(\sum{k=1}^3 \alphak(l) \hat{\tau}_k\right) $$

A binary agreement mask A<sub>k</sub> discards parameter updates that oppose the elected consensus sign:

$$ Ak = \mathbb{I}\left(\operatorname{sgn}(\hat{\tau}k) = \Gamma\right) \odot \mathbb{I}\left(\hat{\tau}_k \neq 0\right) $$

The merged task delta is reconstructed using only parameters aligned with the majority direction:

$$ \Delta{\text{TIES}} = \begin{cases} \frac{\sum{k=1}^3 \alphak(l) \left(\hat{\tau}k \odot Ak\right)}{\sum{k=1}^3 \alphak(l) Ak} & \text{if } \sum{k=1}^3 \alphak(l) A_k > 0 \\ 0 & \text{otherwise} \end{cases} $$

The dense layer weights are restored onto the base foundation:

$$ W{\text{dense}} = W0 + \Delta_{\text{TIES}} $$

5. Gated DeltaNet (GDN) Gate Norm Stabilization

In linear attention layers, gate matrices control state retention and output gating via non-linear sigmoid activations. Direct delta merging shifts the operator norm, causing activation saturation or exploding outputs. To guarantee numerical stability, the merged gate weight W<sub>gate, unscaled</sub> = W₀ + ∑<sub>k</sub> α<sub>k</sub> τ<sub>k</sub> is projected onto the base tensor's Frobenius norm:

$$ W{\text{gate}} = W{\text{gate, unscaled}} \cdot \frac{\|W0\|F}{\|W{\text{gate, unscaled}}\|F} $$

6. Log-Decay and Normalization Parameter Convexity

For state-space logarithmic decay tensors (A<sub>log</sub> ∈ (-∞, 0]), biases, and layer normalization parameters, delta blending can violate mathematical boundary constraints. These tensors are merged strictly via convex interpolation:

$$ W{\text{convex}} = \sum{k=1}^3 \alphak(l) Dk $$

Because ∑<sub>k</sub> α<sub>k</sub>(l) = 1.0, α<sub>k</sub>(l) ≥ 0, and D<sub>k, ij</sub> ≤ 0 for all decay parameters:

$$ \sum{k=1}^3 \alphak(l) D{k, ij} \le \maxk(D{k, ij}) \le 0 \implies \exp\left(W{\text{convex}, ij}\right) \in (0, 1] $$

This guarantees Bounded-Input Bounded-Output (BIBO) stability and prevents exponential divergence in recurrent linear attention states.


Layer-Stratified Component Policies

Parameter GroupTarget IdentifiersApplied PolicyDensity (ρ)Mathematical Invariant
Embeddings & LM Headembed_tokens, lm_headConvex Blend—Fixed weights: 50% Qwopus, 30% MiMo, 20% Ornith.
Dense MLPs & Self-Attentionself_attn, mlp.gate_proj, up_proj, down_projTIES-DELLA0.70Saliency pruning + consensus sign election.
Recurrent Linear Attentionlinear_attn.in_proj_*, out_proj, conv1dRecurrent Delta—Unpruned linear delta accumulation.
DeltaNet Attention Gatesattn_output_gateNorm-Stabilized—Projected onto base Frobenius norm \\W₀\\<sub>F</sub>.
Decay Rates & NormalizationsA_log, norm, biasConvex Blend—Enforces A<sub>log</sub> ≤ 0 to preserve recurrent stability.

Agentic Chat Template

This model uses the Improved Chat Template for Qwen 3.x by Olivia Rossi to support multi-tier Chain-of-Thought (CoT) reasoning, dual-format agentic tool execution, automatic error-recovery heuristics, and strict token-waste elimination.


Recommended Generation Parameters

The following parameters are optimal for code synthesis, terminal agent execution, and complex reasoning:

ParameterRecommended SettingOperational Function
Temperature0.6Balances deterministic syntax structure with creative algorithmic pathing.
Top-P0.95Nucleus sampling cutoff to discard degenerate token tails.
Top-K20Restricts sampling pool to top candidates, preventing syntactic drift.
Min-P0.0 (Off)Disables relative thresholding in favor of Top-K / Top-P governance.
Repetition PenaltyOff (1.0)Disabled to prevent penalty distortion on repeated syntax (braces, boilerplate).
Presence PenaltyOff (0.0)Preserves deterministic variable and function naming across long contexts.

How to Use

Serving via vLLM

bash
vllm serve pragmaticcs/Triumvirate \
  --dtype bfloat16 \
  --max-model-len 65536 \
  --gpu-memory-utilization 0.95 \
  --enable-prefix-caching \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_coder \
  --enable-reasoning \
  --reasoning-parser qwen3

Inference via Transformers

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "pragmaticcs/Triumvirate"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

messages = [
    {
        "role": "system",
        "content": "You are a principal software engineer. Think carefully before outputting production-grade code."
    },
    {
        "role": "user",
        "content": "Implement an asynchronous token-bucket rate limiter in Python supporting burst handling and thread-safe redis synchronization."
    }
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    enable_thinking=True,
    return_tensors="pt"
).to(model.device)

outputs = model.generate(
    inputs,
    max_new_tokens=2048,
    temperature=0.6,
    top_p=0.95,
    top_k=20,
    do_sample=True,
)

response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
print(response)

Citation & References

bibtex
@inproceedings{yadav2023ties,
  title={Resolving Interference When Merging Models},
  author={Yadav, Prateek and Tam, Derek and Choshen, Leshem and Raffel, Colin and Bansal, Mohit},
  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
  volume={36},
  pages={7093--7115},
  year={2023}
}

@article{deep2024della,
  title={DELLA-Merging: Reducing Interference in Model Merging through Magnitude-Based Sampling},
  author={Deep, Pala Tej and Bhardwaj, Rishabh and Poria, Soujanya},
  journal={arXiv preprint arXiv:2406.11617},
  year={2024}
}

@inproceedings{yu2024dare,
  title={Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch},
  author={Yu, Le and Yu, Bowen and Yu, Haiyang and Huang, Fei and Li, Yongbin},
  booktitle={International Conference on Machine Learning (ICML)},
  year={2024}
}