Jackrong KyleHessling1 commited on
Commit
0575f66
·
0 Parent(s):

Duplicate from KyleHessling1/Qwopus3.6-27B-Fusion-GGUF

Browse files

Co-authored-by: Kyle Hessling <KyleHessling1@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/orbital-gameplay.png filter=lfs diff=lfs merge=lfs -text
37
+ assets/orbital-title.png filter=lfs diff=lfs merge=lfs -text
38
+ Qwopus3.6-27B-Fusion-Q4_K_M-00002-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Qwopus3.6-27B-Fusion-Q4_K_M-00003-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Qwopus3.6-27B-Fusion-Q4_K_M-00004-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Qwopus3.6-27B-Fusion-Q4_K_M-00005-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Qwopus3.6-27B-Fusion-Q4_K_M-00006-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Qwopus3.6-27B-Fusion-Q4_K_M-00007-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Qwopus3.6-27B-Fusion-Q4_K_M-00008-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Qwopus3.6-27B-Fusion-Q4_K_M-00009-of-00009.gguf filter=lfs diff=lfs merge=lfs -text
46
+ assets/orbital-live.png filter=lfs diff=lfs merge=lfs -text
47
+ assets/hero-banner.png filter=lfs diff=lfs merge=lfs -text
48
+ assets/geometry.png filter=lfs diff=lfs merge=lfs -text
49
+ Qwopus3.6-27B-Fusion-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Qwopus3.6-27B-Fusion-Q4_K_M-00002-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e67ba5a8613b1e28b18428d9efb8745b24e80cedebf41930731e74227ef8e2d
3
+ size 1980022336
Qwopus3.6-27B-Fusion-Q4_K_M-00003-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:470c440d1a8a0fd4f8305c4f0a056195748147e7e44521308849adf51c2c6a0d
3
+ size 1952722624
Qwopus3.6-27B-Fusion-Q4_K_M-00004-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6d69824ae6496dadee147413f055dc64035e10ddbc94afbd21e99204ac40398
3
+ size 1976429696
Qwopus3.6-27B-Fusion-Q4_K_M-00005-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8e6b44dd400a43b2331afbd4712263f30aa8e57f898ac921302409044ff9bfb
3
+ size 1988228480
Qwopus3.6-27B-Fusion-Q4_K_M-00006-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:939122295bc51058eb89effb1f3c63908579e03c664da1d9471411ede35fa873
3
+ size 1978937216
Qwopus3.6-27B-Fusion-Q4_K_M-00007-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc09eca7d48ed6719cdf83be6997b0ae6e0806577c6cd55dd73e496bc8b9b214
3
+ size 1952722624
Qwopus3.6-27B-Fusion-Q4_K_M-00008-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6c86aa2ec18b97d9b162fd1d3e27c8167f1c42d9ddbf190f4a5ff51906b87f2
3
+ size 1994124288
Qwopus3.6-27B-Fusion-Q4_K_M-00009-of-00009.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c9f4e90605046fd73efcf6d8e4494359c67f95d00759f919130beb3bf544b5e
3
+ size 720574496
Qwopus3.6-27B-Fusion-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eeb9b184a180136b21fdd58e1cc66a47e031c176f7c1a76234ee469ce776609c
3
+ size 19535699040
README.md ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: qwen
4
+ license_link: https://huggingface.co/Qwen/Qwen3.6-27B/blob/main/LICENSE
5
+ language:
6
+ - en
7
+ tags:
8
+ - merge
9
+ - task-vector
10
+ - dare-ties
11
+ - layer-weighted
12
+ - qwen3
13
+ - qwen35
14
+ - reasoning
15
+ - code
16
+ - gguf
17
+ - llama.cpp
18
+ - experimental
19
+ base_model:
20
+ - Qwen/Qwen3.6-27B
21
+ pipeline_tag: text-generation
22
+ library_name: gguf
23
+ ---
24
+
25
+ <div align="center">
26
+
27
+ <img src="assets/hero-banner.png" alt="Qwopus3.6-27B Fusion — one 27B that reasons and codes, no skill lost" width="100%">
28
+
29
+ <h3>▶ <a href="https://huggingface.co/spaces/KyleHessling1/ORBITAL">PLAY <i>ORBITAL</i> — a game this model built, live in your browser</a> ◀</h3>
30
+
31
+ </div>
32
+
33
+ > **Research preview.** This model attempts to combine the **reasoning** capability of
34
+ > `Qwopus3.6-27B-v2` with the **code-execution** capability of `Qwopus3.6-27B-Coder` — in a single 27B
35
+ > model, *without significant loss to either* skill. In practice it behaves like a production model
36
+ > with both capabilities fused, but it has **not** yet been through a full rigorous evaluation. If you
37
+ > find issues, please reach out on X — **[@kylehessling1](https://x.com/kylehessling1)**.
38
+
39
+ - **Format:** GGUF, `Q4_K_M` (~16.5 GB) — runs on a single 24–32 GB GPU via `llama.cpp`.
40
+ - **Architecture:** `qwen35` hybrid (linear-attention + periodic full-attention), 27B params, 64 layers.
41
+ - **Native context:** 262,144 tokens. Verified clean (needle + termination) to 60K.
42
+ - **Modes:** thinking (reasoning) **on** by default; strong agentic/coding behavior.
43
+
44
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45
+
46
+ ## ◆ TL;DR
47
+
48
+ | | |
49
+ |---|---|
50
+ | **Base / anchor** | `Qwen/Qwen3.6-27B` (both parents descend from it) |
51
+ | **Parent A — reasoning** | `Qwopus3.6-27B-v2` — donates the merge base + embeddings/head/norms/MTP |
52
+ | **Parent B — code** | `Qwopus3.6-27B-Coder` — delta source, injected with depth-increasing weight |
53
+ | **Merge math** | `W(L) = V2 + α(L)·(Coder − V2)`, α linear ramp **0.12 (early) → 0.48 (late)** |
54
+ | **Frozen (copied from A)** | `embed_tokens`, `lm_head`, all `norm`, `mtp`/NextN, any vision tensors |
55
+
56
+ **Headline results** (Q4_K_M, thinking-on unless noted):
57
+
58
+ | Capability | Score | Stability | Score |
59
+ |---|---|---|---|
60
+ | HumanEval | **94.5%** | Termination @ temp 0.2 & 0.9 | **4/4 clean** |
61
+ | MBPP | **87.9%** | Temp sweep 0.5–0.9 | **10/10 clean** |
62
+ | GSM8K | **95.0%** | Seed variance (HumanEval) | **std 0.0** |
63
+ | MATH-500 | **62–64.7%** | Long-context needle+term @ 60K | **perfect** |
64
+ | IFEval (strict) | **82.8%** | SWE-bench Verified (astropy, 0:15) | **7/15 (47%)** |
65
+
66
+ > Against the alternatives on the same astropy slice: **Fusion 7/15** > equal-weight DARE-TIES **5/15** > DUS-38B frankenmerge **3/15**.
67
+
68
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
69
+
70
+ ## ◆ Where it shines — the one-stop creative programming agent
71
+
72
+ > **Best used as a single, closed-loop agentic creative programmer.** In a *build → run → self-fix*
73
+ > loop, Fusion is at its strongest as **one agent that plans, writes, and debugs on its own** — the
74
+ > reasoning⊕coding balance lets it close the loop by itself (see the ORBITAL / FLUX demos below,
75
+ > where it root-caused and fixed its own bugs from Playwright error reports).
76
+ >
77
+ > This is a different niche than its parents. The **`Coder`** model is excellent for **coding under
78
+ > active steering**, or as a **solid orchestration model** driving other tools/agents. **Fusion**, by
79
+ > contrast, is the ideal **one-stop creative builder** — you hand it a goal and it carries the whole
80
+ > creative-programming loop end-to-end.
81
+
82
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
+
84
+ ## ◆ Why I chose to make this merge
85
+
86
+ Two finetunes of the same base diverge into complementary specialists: one gets better at
87
+ multi-step reasoning, the other at writing code — but each pays for it. In particular the **coding
88
+ finetune becomes unstable in thinking mode** (it loops / degrades at low temperature). The goal was
89
+ a single model that keeps the reasoner's stability *and* the coder's skill.
90
+
91
+ My naive approaches, one of them eroneously proposed by Claude Fable, average the two, or run an equal-weight DARE-TIES merge from the common base. These alternatives underperformed and the geometry explains why.
92
+
93
+ ### ▌ The lineage
94
+
95
+ Because the coder model descended from the v2 version, the coders additions can be evaluated against the v2 by analyzing the delta. Projecting the coding
96
+ delta onto the reasoning delta reveals:
97
+
98
+ ```
99
+ proj(ΔCoder · ΔV2 / |ΔV2|²) ≈ 0.4 in early layers → ≈ 1.0 in late layers
100
+ ```
101
+
102
+ That ramp to 1.0 means **late layers of the coder already contain V2's full reasoning delta**. And:
103
+
104
+ - The coding delta is **~1.8× the magnitude** of the reasoning delta.
105
+ - In **early layers** the coding delta is **anti-aligned** with reasoning (`cos < 0`) — the coder
106
+ *partially reverted* V2's early-layer reasoning/control representations. **That anti-alignment is
107
+ the measured source of the coder's thinking-mode instability.**
108
+
109
+ An equal-weight merge (both task vectors added from the base) therefore commits two errors:
110
+ 1. It **double-counts V2's reasoning delta** (the coder already contains it), and
111
+ 2. It **imports the full early-layer destabilizing coding delta** at 100% strength.
112
+
113
+ ### ▌ The fix
114
+
115
+ Because the coder sits "downstream" of V2, the correct anchor is **V2 itself**, not the shared base
116
+ — this avoids the double-count. Then, instead of a constant fraction of the coding delta everywhere,
117
+ inject it with a **depth-increasing schedule**:
118
+
119
+ - **Early layers (α ≈ 0.12):** inject *little* coding delta → **protect** V2's reasoning/control
120
+ reps exactly where the coder damaged them.
121
+ - **Late layers (α ≈ 0.48):** inject *more* coding delta → add coding skill where the two parents
122
+ already agree (proj → 1.0) and it's safe.
123
+
124
+ The shape of the α ramp is dictated by the geometry, not hand-tuning. Embeddings, LM head, norms,
125
+ and the MTP head are identical across all three models (delta ≈ 0), so they're copied verbatim from
126
+ V2 rather than merged.
127
+
128
+ <div align="center">
129
+ <img src="assets/geometry.png" alt="Weight geometry — coder descends from V2, its delta is 1.8x and anti-aligned in early layers; the alpha ramp injects coding 0.12 early to 0.48 late" width="100%">
130
+ </div>
131
+
132
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
133
+
134
+ ## ◆ How it was built
135
+
136
+ **Merge.** The parents use Qwen's **hybrid attention schedule** (most layers linear/DeltaNet; every
137
+ 4th layer full softmax attention). Off-the-shelf `mergekit` **cannot** merge this architecture — it
138
+ templates `linear_attn.*` onto every layer and errors on the full-attention layers. So the merge is
139
+ a **custom streaming task-vector routine** operating directly on the (identical) tensor keys, immune
140
+ to arch templating. The full, reproducible script ships in this repo as
141
+ [`merge_layerweighted.py`](./merge_layerweighted.py):
142
+
143
+ ```python
144
+ def alpha(L, a_early, a_late):
145
+ return a_early + (a_late - a_early) * (L / (NLAYERS - 1)) # smooth linear ramp by depth
146
+
147
+ # per decoder tensor at layer L:
148
+ out = (v2 + alpha(L, 0.12, 0.48) * (coder - v2)).to(torch.bfloat16)
149
+ # embeddings / lm_head / norms / mtp / vision: copied from V2 verbatim
150
+ ```
151
+
152
+ **Quantize.** The bf16 merge was converted to GGUF and quantized to **`Q4_K_M`** with `llama.cpp`
153
+ (851 GGUF tensors, 16.5 GB).
154
+
155
+ **Evaluate.** Every candidate was gated at **both** temp 0.2 (a termination stress test) and temp
156
+ 0.9 (the finetune operating point) — "clean only at high temp" is riding sampling entropy, not
157
+ stability. This model is clean at both.
158
+
159
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
+
161
+ ## ◆ Demonstrations — driving a local agentic coding loop
162
+
163
+ Every artifact below was generated by **this model** running as the backend of an agentic coding
164
+ loop (OpenCode / Claude Code), building single-file HTML/JS apps end-to-end, then **verified with
165
+ headless Playwright**. What stood out isn't just that it writes polished games — it's that when the
166
+ Playwright harness handed back error reports, **the same model root-caused and fixed its own bugs**
167
+ with precise, correct diagnoses (excerpts below).
168
+
169
+ ### 🚀 ORBITAL — physics space-arcade (thinking-on)
170
+
171
+ *Setup:* "Build a complete, physics-driven, visually stunning arcade space game as a single
172
+ self-contained index.html — gravity is the weapon." *Outcome:* **built and runs cleanly, zero
173
+ console errors**, real 2-body gravity, particle trails, wave HUD, and it even self-balance-tuned its
174
+ own difficulty. 1,150 lines.
175
+
176
+ <div align="center">
177
+ <h3>▶ <a href="https://huggingface.co/spaces/KyleHessling1/ORBITAL">PLAY IT LIVE → huggingface.co/spaces/KyleHessling1/ORBITAL</a> ◀</h3>
178
+ <i>(runs entirely in your browser — the exact single file this model wrote)</i>
179
+ </div>
180
+
181
+ | Title screen | Live gameplay (Wave 1) |
182
+ |---|---|
183
+ | ![ORBITAL title](assets/orbital-title.png) | ![ORBITAL gameplay](assets/orbital-gameplay.png) |
184
+
185
+ The same loop also produced three more complete, self-contained games — **PRISM DEFENSE** (neon
186
+ tower defense, 1,074 lines), **NEON SERPENT** (synthwave Snake with smooth interpolated movement,
187
+ 657 lines), and **STARLIGHT SURVIVORS** (survivors-style auto-shooter, 555 lines). Each was built,
188
+ Playwright-tested, and where the harness surfaced a bug the model root-caused and fixed it itself
189
+ (e.g. a tower-targeting `bestDist = Infinity` that should have been `-Infinity`; three weapon
190
+ upgrades missing a `fireTimer` init that made `fireTimer -= dt` evaluate to `NaN`). The impressive
191
+ part is the quality of the model's own debugging inside a *build → error report → self-fix* loop,
192
+ not flawless one-shot output.
193
+
194
+ ### 📋 FLUX — a full Trello-style Kanban dashboard (the strongest capability demo)
195
+
196
+ The most demanding build: a complete **single-file Kanban app** (`~3,373 lines`, no backend,
197
+ localStorage persistence), assembled by the model over **five steered phases**, each a fresh session
198
+ that read a spec + the current file and extended it — Playwright-verified between phases.
199
+
200
+ ![FLUX board](assets/flux-board.png)
201
+
202
+ **What works** (all Playwright-driven against real interactions): boards / lists / cards CRUD,
203
+ **drag-and-drop** cross-list moves with persistence, a markdown card modal with live preview,
204
+ labels / due dates / checklists, keyboard shortcuts, and **live search/filter** — below, typing
205
+ `drag` narrows to the matching card in real time:
206
+
207
+ ![FLUX live search](assets/flux-search.png)
208
+
209
+ **Analysis.** Over five phases the model needed only **two** corrections, each caught by Playwright
210
+ and fixed by the model: an undeclared `dragMoveOffsetX` (1-line) and a search UI that was built but
211
+ not yet wired to the filter logic.
212
+
213
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
214
+
215
+ ## ◆ Architecture details
216
+
217
+ | Field | Value |
218
+ |---|---|
219
+ | `general.architecture` | `qwen35` (hybrid linear + full attention) |
220
+ | Parameters | ~27B (size label `27B`) |
221
+ | Layers (`block_count`) | 64 |
222
+ | Hidden size | 5120 |
223
+ | FFN size | 17408 |
224
+ | Attention heads / KV heads | 24 / 4 (GQA) |
225
+ | Full-attention interval | every 4th layer (`full_attention_interval = 4`); the rest are linear/DeltaNet |
226
+ | Linear-attn (SSM) | conv kernel 4, state 128, groups 16, inner size 6144, time-step rank 48 |
227
+ | Key/Value length | 256 |
228
+ | Vocab | 248,320 |
229
+ | Native context | 262,144 |
230
+ | RoPE | freq base 1e7, mRoPE sections `[11, 11, 10]`, partial rotary (dim 64) |
231
+ | MTP / NextN head | present in parents (copied from V2) |
232
+ | Quant | `Q4_K_M` (file type 15), quant version 2 |
233
+
234
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
235
+
236
+ ## ◆ Usage
237
+
238
+ ### ▌ llama.cpp (recommended)
239
+
240
+ Validated inference config (single-stream, thinking on):
241
+
242
+ ```bash
243
+ llama-server \
244
+ -m tv-lw-balanced-Q4_K_M.gguf \
245
+ -c 98304 \ # 96K context; native is 262K but 96K fits comfortably on 32GB
246
+ --parallel 1 \ # SINGLE stream — validated single-stream
247
+ -ngl 999 \ # all layers on GPU
248
+ --cache-type-k q8_0 --cache-type-v q8_0 \
249
+ --reasoning on --jinja \ # thinking mode + the baked-in chat template
250
+ --host 0.0.0.0 --port 8001
251
+ ```
252
+
253
+ Recommended sampling: `temperature 0.85–1.0 top_p 0.9`.
254
+
255
+ **Temperature — run it hot.** Best capability lands at **temp 0.85–1.0** (the finetune's natural
256
+ operating point, and consistent with the agentic/SWE results). Then the surprising part: **the merge
257
+ itself appears to have repaired much of the low-temperature instability** of the parent finetunes —
258
+ Fusion stays clean at temps where the bases loop and degrade (**4/4 termination at *both* 0.2 and
259
+ 0.9**, 10/10 across 0.5–0.9). So, *unlike its parents*, you **can** run it cooler for more
260
+ determinism if you want, without the looping. Exactly why merging improves temperature stability
261
+ isn't fully understood, but it's consistent across every test we ran. **High temperature still
262
+ yields the best results.** Thinking mode is **on** by default and is where the model is strongest.
263
+
264
+ ### ▌ As a coding backend (Claude Code / OpenAI-compatible clients)
265
+
266
+ The `llama-server` endpoint is OpenAI-compatible and has driven multi-file app builds end-to-end. If
267
+ you point **Claude Code** at it, use a proxy that does **native Anthropic↔OpenAI tool translation**
268
+ (text-encoded tools stall the agent).
269
+
270
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
271
+
272
+ ## ◆ Evaluation — full results
273
+
274
+ All at `Q4_K_M`, thinking-on unless noted.
275
+
276
+ **Capability:** HumanEval 94.5% · MBPP 87.9% · GSM8K 95.0% · MATH-500 62% (64.7% subset) ·
277
+ IFEval-strict 82.8%.
278
+
279
+ **Stability** (the axis that separated this project's winners from losers):
280
+
281
+ | Test | Result |
282
+ |---|---|
283
+ | Termination @ temp 0.2 / 0.9 | 4/4 / 4/4 clean |
284
+ | Temperature sweep 0.5–0.9 | 10/10 clean (9/10 at 0.1 & 1.0) |
285
+ | Seed variance — HumanEval / MATH | std 0.0 / 2.36 |
286
+ | Long-context needle + termination | perfect to 60K tokens, zero looping |
287
+
288
+ **Agentic (SWE-bench Verified, astropy slice, thinking-on):** Fusion **7/15 (47%)** >
289
+ equal-weight DARE-TIES **5/15** > DUS-38B frankenmerge **3/15**.
290
+
291
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
292
+
293
+ ## ◆ Limitations
294
+
295
+ - **Not yet rigorously evaluated.** No large-scale safety alignment / RLHF / red-teaming. Inherits
296
+ biases and limits of the Qwen base and both parent finetunes.
297
+ - The astropy **+2 (7/15 vs 5/15) is within noise** on n=15 — the geometry approach is validated as
298
+ *sound and directionally better*, not a large agentic jump.
299
+ - On the hardest agentic instances the model can over-deliberate and hit the generation cap without
300
+ submitting; capping `max_tokens` (~8K) mitigates this.
301
+ - Validated primarily at `Q4_K_M`; other quants should work but aren't separately benchmarked.
302
+
303
+ > **Found a problem? →** please reach out on X: **[@kylehessling1](https://x.com/kylehessling1)**.
304
+
305
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
306
+
307
+ ## ◆ Method credit & acknowledgments
308
+
309
+ The path to this model was not a straight line, and the credit is honest about that:
310
+
311
+ - **[Jackrong](https://huggingface.co/Jackrong) — base-model builder, collaborator, and good friend.**
312
+ This fusion stands entirely on his work: he built both parent finetunes
313
+ ([`Qwopus3.6-27B-v2`](https://huggingface.co/Jackrong/Qwopus3.6-27B-v2) and
314
+ [`Qwopus3.6-27B-Coder`](https://huggingface.co/Jackrong/Qwopus3.6-27B-Coder)) that this merge fuses.
315
+ Beyond the models, his counsel and contributions throughout were **priceless** — this project simply
316
+ does not exist without him. **Go follow his work → [huggingface.co/Jackrong](https://huggingface.co/Jackrong).**
317
+ - The **initial naive approaches** — a 38B depth-upscaled (DUS) frankenmerge and an equal-weight
318
+ DARE-TIES merge from the shared base — were **proposed by Fable**. Both underdelivered. In
319
+ hindsight, those plans conspicuously **omitted the one nuance that turned out to be decisive**: the
320
+ *lineage* relationship between the parents (that the coder is a descendant of V2). Without that
321
+ nuance, an equal-weight merge is essentially guaranteed to double-count V2's delta and import the
322
+ destabilizing early-layer coding delta at full strength — which is exactly what went wrong.
323
+ - **Grok 4.5** was **instrumental in the final, working merge.** Its analysis surfaced the
324
+ parent→descendant lineage from the weight geometry and motivated the **layer-weighted delta-scale**
325
+ recipe (protect early reasoning, inject coding late) that this model is built on.
326
+
327
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
328
+
329
+ ## ◆ Lineage / provenance
330
+
331
+ ```
332
+ Qwen/Qwen3.6-27B (shared base)
333
+ ├── Qwopus3.6-27B-v2 (reasoning finetune) ──┐
334
+ └── Qwopus3.6-27B-Coder (code finetune, │ ← descends from V2 (proj→1.0 in late layers)
335
+ itself downstream of V2) │
336
+
337
+ Qwopus3.6-27B-Fusion = V2 + α(L)·(Coder − V2), α: 0.12 → 0.48 by depth
338
+ ```
339
+
340
+ ## ◆ License
341
+
342
+ A merge of derivatives of `Qwen/Qwen3.6-27B`; usage is governed by the **Qwen base model license**.
343
+ The parent finetunes are personal research models. No third-party training data is redistributed
344
+ here — only merged weights and the merge script. Comply with the upstream Qwen license.
345
+
346
+ ## ◆ Reproduction
347
+
348
+ ```bash
349
+ python merge_layerweighted.py --out ./Qwopus3.6-27B-Fusion --a-early 0.12 --a-late 0.48
350
+ # then convert + quantize with llama.cpp: convert_hf_to_gguf.py → llama-quantize ... Q4_K_M
351
+ ```
352
+
353
+ If you build on the *method* (geometry-grounded, layer-weighted task-vector merging of a
354
+ parent/descendant finetune pair), a mention of **"FusionThink layer-weighted delta-scale merge"** is
355
+ appreciated.
356
+
357
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
358
+
359
+ <div align="center">
360
+ <i>Built and evaluated locally on a single RTX 5090. Model produced by Kyle Hessling
361
+ (<a href="https://x.com/kylehessling1">@kylehessling1</a>).</i>
362
+ </div>
assets/flux-board.png ADDED
assets/flux-search.png ADDED
assets/geometry.png ADDED

Git LFS Details

  • SHA256: 1d77e6fdf95da6e5f4c2543601b4abe5cfdfee3fada7b97bb8ac1790c303cfca
  • Pointer size: 131 Bytes
  • Size of remote file: 322 kB
assets/hero-banner.png ADDED

Git LFS Details

  • SHA256: 2fdc9765b6784c6adfd328b5123b62f9b4ba95c55cd59961a4af4a7fecab63f4
  • Pointer size: 131 Bytes
  • Size of remote file: 268 kB
assets/orbital-gameplay.png ADDED

Git LFS Details

  • SHA256: 1303242b25596d4a61ec328a5ff16f156ed10a390340ff1c295b32239a582274
  • Pointer size: 131 Bytes
  • Size of remote file: 511 kB
assets/orbital-live.png ADDED

Git LFS Details

  • SHA256: 859f518dbecf1ae11d798c1784ed3026651bfa0f1867cb2631a6c1bde4838279
  • Pointer size: 131 Bytes
  • Size of remote file: 393 kB
assets/orbital-title.png ADDED

Git LFS Details

  • SHA256: 6c28f6801736f17ecf08d229fed3c25926eeae1b27452e64a25438c2b76ed1ab
  • Pointer size: 131 Bytes
  • Size of remote file: 521 kB
merge_layerweighted.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Layer-weighted delta-scale merge, grounded in the measured weight geometry:
3
+ Coder DESCENDS from V2 (late-layer proj->1.0), its delta is ~1.8x v2's magnitude, and in EARLY
4
+ layers the coding delta is ANTI-aligned with v2's reasoning (cos<0) => it damaged reasoning/control.
5
+ So: W_new = V2 + alpha(L) * (Coder - V2), alpha ramps low (early, protect reasoning) -> high (late,
6
+ inject coding). embed/lm_head/norm/mtp/vision are frozen across all 3 -> copied from V2 verbatim.
7
+ """
8
+ import os, re, json, gc, sys, argparse
9
+ import torch
10
+ from safetensors import safe_open
11
+ from safetensors.torch import save_file
12
+
13
+ SSD="/media/kylehessling/Extreme SSD"
14
+ V2_PATH=f"{SSD}/Qwopus3.6-27B-v2" # base (reasoning) — also donates embed/lm_head/norm/mtp/vision
15
+ CO_PATH=f"{SSD}/Qwopus3.6-27B-Coder" # coder — delta source
16
+ SHARD=5_000_000_000
17
+ NLAYERS=64
18
+ COPY_V2=re.compile(r"(embed_tokens|lm_head|^mtp\.|\.mtp\.|nextn|\.norm\.|vision|visual|image|video|patch_embed|merger)")
19
+ LAYER_RE=re.compile(r"\.layers\.(\d+)\.")
20
+
21
+ def load_index(p):
22
+ return {k:os.path.join(p,v) for k,v in json.load(open(f"{p}/model.safetensors.index.json"))["weight_map"].items()}
23
+
24
+ class ShardWriter:
25
+ def __init__(s,o): s.o,s.buf,s.cur,s.i,s.tot,s.wm=o,{},0,0,0,{}; os.makedirs(o,exist_ok=True)
26
+ def _flush(s):
27
+ if not s.buf: return
28
+ s.i+=1; nm=f"model-{s.i:05d}.safetensors"; save_file(s.buf,os.path.join(s.o,nm),metadata={"format":"pt"})
29
+ for k in s.buf: s.wm[k]=nm
30
+ s.buf,s.cur={},0; gc.collect()
31
+ def add(s,n,t): s.buf[n]=t.contiguous(); s.cur+=t.numel()*t.element_size(); s.tot+=1; (s._flush() if s.cur>=SHARD else None)
32
+ def finalize(s):
33
+ s._flush(); n=s.i
34
+ for j in range(1,n+1):
35
+ old=f"model-{j:05d}.safetensors"; new=f"model-{j:05d}-of-{n:05d}.safetensors"
36
+ os.rename(os.path.join(s.o,old),os.path.join(s.o,new))
37
+ for k,v in list(s.wm.items()):
38
+ if v==old: s.wm[k]=new
39
+ json.dump({"metadata":{"total_size":0},"weight_map":s.wm},open(f"{s.o}/model.safetensors.index.json","w"),indent=2)
40
+
41
+ def alpha(L, a_early, a_late):
42
+ return a_early + (a_late-a_early)*(L/(NLAYERS-1)) # smooth linear ramp by depth
43
+
44
+ def main():
45
+ ap=argparse.ArgumentParser()
46
+ ap.add_argument("--out",required=True)
47
+ ap.add_argument("--a-early",type=float,default=0.12)
48
+ ap.add_argument("--a-late",type=float,default=0.48)
49
+ ap.add_argument("--uniform",type=float,default=None,help="if set, constant alpha (control candidate)")
50
+ a=ap.parse_args()
51
+ iv,ic=load_index(V2_PATH),load_index(CO_PATH)
52
+ assert set(iv)==set(ic),"key mismatch"
53
+ H={}
54
+ def get(i,n):
55
+ p=i[n]
56
+ if p not in H: H[p]=safe_open(p,"pt")
57
+ return H[p].get_tensor(n)
58
+ w=ShardWriter(a.out); copied=merged=0
59
+ for i,n in enumerate(sorted(iv)):
60
+ if COPY_V2.search(n):
61
+ w.add(n,get(iv,n)); copied+=1
62
+ else:
63
+ m=LAYER_RE.search(n); L=int(m.group(1)) if m else NLAYERS//2
64
+ al = a.uniform if a.uniform is not None else alpha(L,a.a_early,a.a_late)
65
+ v2=get(iv,n).float(); co=get(ic,n).float()
66
+ out=(v2 + al*(co-v2)).to(torch.bfloat16)
67
+ w.add(n,out); merged+=1
68
+ if i%150==0:
69
+ print(f" [{i}/{len(iv)}] copied={copied} merged={merged}",flush=True); H.clear(); gc.collect()
70
+ w.finalize()
71
+ sched = f"uniform {a.uniform}" if a.uniform is not None else f"ramp {a.a_early}->{a.a_late}"
72
+ print(f"[merge] DONE ({sched}) copied={copied} merged={merged} -> {a.out}",flush=True)
73
+ import shutil
74
+ for fn in os.listdir(V2_PATH):
75
+ if fn.endswith((".json",".model",".txt")) and "safetensors" not in fn: shutil.copy2(os.path.join(V2_PATH,fn),os.path.join(a.out,fn))
76
+ print("[merge] copied config+tokenizer from V2",flush=True)
77
+
78
+ if __name__=="__main__": main()