jackasda211233 commited on
Commit
3b47ade
Β·
verified Β·
1 Parent(s): 541cc20

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +95 -11
README.md CHANGED
@@ -104,15 +104,75 @@ The Splice method works because:
104
  - The (26,34) config is the Pareto-optimal configuration validated by dnhkng's math+EQ probe sweep on the base model
105
  - 78% uncensored layer ratio preserves the fine-tuned personality while the central reasoning zone provides disciplined inference
106
 
107
- ### Source Models
108
 
109
- | Component | Source | Link |
110
- |-----------|--------|------|
111
- | Uncensored weights (layers 0–25, 42–71) | HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive | [HuggingFace](https://huggingface.co/HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive) |
112
- | RYS duplicate zone (layers 26–41) | dnhkng/RYS-Qwen3.5-27B-FP8-XL (F16 GGUF) | [HuggingFace](https://huggingface.co/dnhkng/RYS-Qwen3.5-27B-FP8-XL) |
113
- | Base architecture | Qwen/Qwen3.5-27B | [HuggingFace](https://huggingface.co/Qwen/Qwen3.5-27B) |
114
- | RYS method | dnhkng/RYS | [GitHub](https://github.com/dnhkng/RYS) |
115
- | RYS research | LLM Neuroanatomy II by dnhkng | [Blog Post](https://dnhkng.github.io/posts/rys-ii/) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  ### Build Tools
118
 
@@ -189,9 +249,15 @@ We conducted head-to-head live coding tests against a HybridBase variant (same u
189
  - 0 looping responses (repetition ratio check)
190
  - 2 empty responses on very hard constraint prompts
191
 
192
- ### Expected Performance (Extrapolated from Source Models)
 
 
 
 
193
 
194
- Based on the official Qwen3.5-27B scores and the RYS method's documented impact:
 
 
195
 
196
  | Benchmark | Qwen3.5-27B Official | Expected for this model |
197
  |-----------|---------------------|------------------------|
@@ -202,7 +268,7 @@ Based on the official Qwen3.5-27B scores and the RYS method's documented impact:
202
  | SWE-bench Verified | 72.4 | ~68-71 |
203
  | HLE w/ CoT | 24.3 | ~22-24 |
204
 
205
- *Note: These are estimates. The RYS method typically adds +1-3% on reasoning benchmarks (per dnhkng's research) but may lose some on instruction following due to architectural changes. The uncensored fine-tune may also shift scores. Full benchmark results were not completed due to infrastructure limitations (BF16 thinking mode inference is slow).*
206
 
207
  ## Usage with llama.cpp / ik_llama.cpp
208
 
@@ -266,6 +332,24 @@ Output Layer β†’ Source
266
  42–71 β†’ HauhauCS Uncensored layers 34–63
267
  ```
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  ## Limitations
270
 
271
  1. **Uncensored**: This model will follow most instructions without refusal. It is the user's responsibility to ensure ethical use.
 
104
  - The (26,34) config is the Pareto-optimal configuration validated by dnhkng's math+EQ probe sweep on the base model
105
  - 78% uncensored layer ratio preserves the fine-tuned personality while the central reasoning zone provides disciplined inference
106
 
107
+ ### The Hybrid SSM Attention Constraint
108
 
109
+ Qwen3.5-27B is **not** a standard transformer β€” it uses a hybrid architecture where two types of layers alternate in a strict repeating pattern:
110
+
111
+ ```
112
+ Layer Type Pattern (repeats every 4 layers):
113
+ [0] Linear Attention (Gated DeltaNet / SSM)
114
+ [1] Linear Attention (Gated DeltaNet / SSM)
115
+ [2] Linear Attention (Gated DeltaNet / SSM)
116
+ [3] Full Attention (GQA β€” 24 heads Q, 4 heads KV, 256 dim)
117
+ [4] Linear Attention ...
118
+ ...repeating...
119
+ ```
120
+
121
+ This pattern is governed by `full_attention_interval=4` in the model config. **The total layer count must be divisible by 4** for this pattern to remain valid. If violated, llama.cpp and other GGUF runtimes cannot reconcile the layer types and will crash at load.
122
+
123
+ This constraint eliminates many RYS configurations:
124
+
125
+ | RYS Config | Total Layers | Divisible by 4 | Status |
126
+ |------------|-------------|----------------|--------|
127
+ | (24,35) | 75 | ❌ No | Crashes |
128
+ | **(24,36)** | **76** | **βœ… Yes** | **Works** |
129
+ | **(26,34)** | **72** | **βœ… Yes** | **Works (this model)** |
130
+ | (33,34) | 65 | ❌ No | Crashes |
131
+
132
+ The (26,34) config duplicates 8 layers (26–33), which contains exactly **2 Full Attention layers** (at positions 27 and 31) and **6 Gated DeltaNet layers**. This preserves the 4-layer repeating pattern perfectly:
133
+
134
+ ```
135
+ Layers 24-27: [DeltaNet, DeltaNet, DeltaNet, FullAttn] ← original
136
+ Layers 28-31: [DeltaNet, DeltaNet, DeltaNet, FullAttn] ← original
137
+ Layers 32-35: [DeltaNet, DeltaNet, DeltaNet, FullAttn] ← DUPLICATED from 24-27
138
+ Layers 36-39: [DeltaNet, DeltaNet, DeltaNet, FullAttn] ← DUPLICATED from 28-31
139
+ ```
140
+
141
+ ### F16 β†’ BF16 Tensor Conversion
142
+
143
+ The dnhkng RYS source GGUF uses F16 (IEEE 754 half-precision), while the uncensored model uses BF16 (Brain Float 16). These are different 16-bit formats:
144
+
145
+ - **F16**: 1 sign + 5 exponent + 10 mantissa bits β€” higher precision, smaller range
146
+ - **BF16**: 1 sign + 8 exponent + 7 mantissa bits β€” lower precision, same range as float32
147
+
148
+ During the splice, F16 tensors are converted to BF16:
149
+ ```
150
+ F16 β†’ Float32 (lossless upcast) β†’ BF16 (take upper 2 bytes of float32)
151
+ ```
152
+
153
+ This conversion loses ~3 bits of mantissa precision but gains the dynamic range benefits of BF16, which is what the rest of the model uses. In practice, this has no measurable impact on output quality.
154
+
155
+ ### Source Models & Attribution
156
+
157
+ This model would not exist without the work of these authors:
158
+
159
+ **1. [Qwen Team](https://huggingface.co/Qwen) β€” Qwen3.5-27B (Base Architecture)**
160
+ - [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) β€” The foundation model. All 64 original layers, the tokenizer, the hybrid SSM architecture, and all training were done by the Qwen team. This model is a derivative work.
161
+ - License: Apache 2.0
162
+
163
+ **2. [HauhauCS](https://huggingface.co/HauhauCS) β€” Uncensored Fine-Tune**
164
+ - [HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive](https://huggingface.co/HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive) β€” Provides the uncensored weights used in **56 of 72 layers** (layers 0–25 and 42–71). This fine-tune removes the safety guardrails that interfere with legitimate coding workflows. The "Aggressive" variant was chosen for maximum uncensoring.
165
+ - Contribution: 78% of this model's total layer weights
166
+
167
+ **3. [dnhkng](https://github.com/dnhkng) β€” RYS Method & Validated Layer Configuration**
168
+ - [dnhkng/RYS-Qwen3.5-27B-FP8-XL](https://huggingface.co/dnhkng/RYS-Qwen3.5-27B-FP8-XL) β€” Provides the **duplicate zone layers** (layers 26–41). These are the base Qwen3.5-27B weights that went through FP8 quantization and were validated as the optimal duplication zone via systematic math+EQ probe sweeps.
169
+ - [RYS GitHub Repository](https://github.com/dnhkng/RYS) β€” The RYS method implementation
170
+ - [LLM Neuroanatomy: How I Topped the LLM Leaderboard Without Changing a Single Weight](https://dnhkng.github.io/posts/rys/) β€” Original RYS research
171
+ - [LLM Neuroanatomy II: Modern LLM Hacking and hints of a Universal Language?](https://dnhkng.github.io/posts/rys-ii/) β€” Extended research with Qwen3.5-27B, including the (26,34) Pareto-optimal configuration used in this model
172
+ - Contribution: 22% of this model's total layer weights (the critical reasoning duplication zone)
173
+
174
+ **4. [ikawrakow](https://github.com/ikawrakow) β€” ik_llama.cpp**
175
+ - Quantization tooling (llama-quantize) used to produce the Q8_0, Q6_K, and IQ4_NL variants
176
 
177
  ### Build Tools
178
 
 
249
  - 0 looping responses (repetition ratio check)
250
  - 2 empty responses on very hard constraint prompts
251
 
252
+ ### Expected Performance (Extrapolated from Source Models & dnhkng's Research)
253
+
254
+ Performance expectations are derived from two sources:
255
+ 1. The [official Qwen3.5-27B benchmark scores](https://huggingface.co/Qwen/Qwen3.5-27B)
256
+ 2. dnhkng's [LLM Neuroanatomy II](https://dnhkng.github.io/posts/rys-ii/) research, which systematically measured the impact of RYS layer duplication on Qwen3.5-27B using math and EQ (emotional quotient) probe sets
257
 
258
+ In dnhkng's research, the (26,34) XL configuration achieved a combined delta of **+0.1288** across math and EQ probes with only 12.5% parameter overhead β€” sitting on the validated Pareto frontier of performance vs. compute cost. The full probe sweep tested all possible (i,j) configurations and identified four optimal variants (S, M, L, XL), with XL (26,34) being the maximum-performance option.
259
+
260
+ Based on these findings:
261
 
262
  | Benchmark | Qwen3.5-27B Official | Expected for this model |
263
  |-----------|---------------------|------------------------|
 
268
  | SWE-bench Verified | 72.4 | ~68-71 |
269
  | HLE w/ CoT | 24.3 | ~22-24 |
270
 
271
+ *Note: These are estimates based on dnhkng's published RYS research findings and the official Qwen3.5-27B scores. The RYS method was shown to improve reasoning capabilities (math +0.0755, EQ +0.0533 for the XL config in dnhkng's probe sweep) while potentially trading small amounts of instruction-following precision. The uncensored fine-tune may also shift absolute scores. Full standardized benchmark results were not completed due to infrastructure limitations (BF16 thinking mode inference at ~60-120s per request made large benchmark suites impractical). The live coding tests above provide the most reliable quality signal for this model's intended use case.*
272
 
273
  ## Usage with llama.cpp / ik_llama.cpp
274
 
 
332
  42–71 β†’ HauhauCS Uncensored layers 34–63
333
  ```
334
 
335
+ ## Research Foundation
336
+
337
+ This project would not have been possible without [dnhkng's](https://github.com/dnhkng) groundbreaking RYS (Repeat Your Self) research. The key insights from their work that directly informed this model:
338
+
339
+ 1. **Layer duplication enhances reasoning without training** ([LLM Neuroanatomy](https://dnhkng.github.io/posts/rys/)): dnhkng discovered that duplicating specific middle layers of a transformer creates a "deeper reasoning circuit" that measurably improves performance on math and emotional intelligence benchmarks β€” with zero training, zero weight modification, and zero data.
340
+
341
+ 2. **Systematic configuration optimization** ([LLM Neuroanatomy II](https://dnhkng.github.io/posts/rys-ii/)): dnhkng conducted exhaustive sweeps of all possible (i,j) duplication configurations on Qwen3.5-27B, measuring each with dedicated math (Math120) and EQ (EQ140) probe sets. This identified four Pareto-optimal configurations:
342
+ - S (33,34): +1 layer, minimal overhead
343
+ - M (31,34): +3 layers, balanced
344
+ - L (30,35): +5 layers, strong
345
+ - **XL (26,34): +8 layers, maximum performance** ← used in this model
346
+
347
+ 3. **The hybrid SSM constraint**: dnhkng's work on Qwen3.5's hybrid Gated DeltaNet + Full Attention architecture revealed that the `full_attention_interval=4` pattern must be preserved post-duplication β€” a critical constraint for GGUF-based inference that is not documented elsewhere.
348
+
349
+ 4. **Pareto-optimal validation**: The (26,34) configuration was validated not just on the initial scan but on larger probe sets, confirming it as the best performance-per-compute option at +0.1288 combined delta with 12.5% overhead.
350
+
351
+ The author's contribution was to combine these RYS findings with the HauhauCS uncensored fine-tune using the novel splice method β€” taking dnhkng's already-validated duplicate zone layers directly and embedding them within the uncensored model's layer stack, rather than re-duplicating from scratch.
352
+
353
  ## Limitations
354
 
355
  1. **Uncensored**: This model will follow most instructions without refusal. It is the user's responsibility to ensure ethical use.