jackasda211233 commited on
Commit
c3e857d
Β·
verified Β·
1 Parent(s): 13c3e9c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +277 -0
README.md ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive
5
+ - Qwen/Qwen3.5-27B
6
+ - dnhkng/RYS-Qwen3.5-27B-FP8-XL
7
+ tags:
8
+ - qwen3_5
9
+ - qwen3.5
10
+ - uncensored
11
+ - RYS
12
+ - GGUF
13
+ - coding
14
+ - reasoning
15
+ - hybrid
16
+ - spaced-repetition-layers
17
+ language:
18
+ - en
19
+ - zh
20
+ - ja
21
+ - ko
22
+ - fr
23
+ - de
24
+ - es
25
+ - pt
26
+ - ru
27
+ - ar
28
+ pipeline_tag: text-generation
29
+ model_type: qwen3_5
30
+ quantized_by: jackasda211233
31
+ ---
32
+
33
+ # RYS-Qwen3.5-27B-Uncensored-Splice-GGUF
34
+
35
+ An uncensored Qwen3.5-27B with RYS (Repeat Your Self) layer duplication applied via a novel **splice method** β€” combining uncensored fine-tuned weights with dnhkng's validated RYS duplicate zone for enhanced reasoning and coding performance.
36
+
37
+ > ⚠️ **Uncensored Model Warning:** As far as the author can determine, this model is completely uncensored when prompted appropriately. It will follow instructions without refusal. Use responsibly and in accordance with applicable laws.
38
+
39
+ ## Model Overview
40
+
41
+ | Property | Value |
42
+ |----------|-------|
43
+ | **Architecture** | Qwen3.5 (Hybrid SSM β€” Gated DeltaNet + Full Attention) |
44
+ | **Total Layers** | 72 (64 base + 8 duplicated via RYS) |
45
+ | **Parameters** | ~29.8B |
46
+ | **RYS Config** | (26,34) β€” dnhkng's validated Pareto-optimal XL configuration |
47
+ | **Context Length** | 262,144 tokens |
48
+ | **Thinking Mode** | Yes (DeepSeek-style `<think>...</think>`) |
49
+ | **full_attention_interval** | 4 (Full attention at layers 3,7,11,...71) |
50
+ | **Vocabulary** | 248,320 tokens (GPT-2 BPE) |
51
+
52
+ ## Available Quantizations
53
+
54
+ | File | Quant | Size | BPW | Notes |
55
+ |------|-------|------|-----|-------|
56
+ | `RYS-Qwen3.5-27B-Uncensored-Splice-BF16.gguf` | BF16 | 56 GB | 16.0 | Full precision, best quality |
57
+ | `RYS-Qwen3.5-27B-Uncensored-Splice-Q8_0.gguf` | Q8_0 | 30 GB | 8.0 | Near-lossless |
58
+ | `RYS-Qwen3.5-27B-Uncensored-Splice-Q6_K.gguf` | Q6_K | 23 GB | 6.5 | Very good quality |
59
+ | `RYS-Qwen3.5-27B-Uncensored-Splice-IQ4_NL.gguf` | IQ4_NL | 17 GB | 4.5 | Good quality, fits in 24GB VRAM |
60
+
61
+ ## How This Model Was Built
62
+
63
+ ### The Splice Method
64
+
65
+ This model uses a novel construction technique we call **"Splice"** β€” instead of duplicating layers from the uncensored model itself, we splice in the already-validated RYS duplicate zone from dnhkng's official published model.
66
+
67
+ **Layer Composition:**
68
+
69
+ ```
70
+ Layers 0–25: HauhauCS Uncensored fine-tuned weights (26 layers)
71
+ Layers 26–41: dnhkng's official RYS-Qwen3.5-27B-FP8-XL layers 26–41 (16 layers = 8 duplicated)
72
+ Originally FP8 β†’ F16, converted to BF16 during splice
73
+ Layers 42–71: HauhauCS Uncensored fine-tuned weights (30 layers)
74
+ ```
75
+
76
+ **78% of layers are uncensored fine-tuned weights** (56 of 72 layers), giving strong uncensored behavior while the central reasoning zone uses dnhkng's validated duplicate block.
77
+
78
+ ### Why Splice Instead of Direct Duplication?
79
+
80
+ We tested multiple approaches:
81
+
82
+ 1. **Pure uncensored RYS (24,36)** β€” 76 layers, all weights from uncensored model. Result: unstable, looped at lower temperatures.
83
+ 2. **Pure uncensored RYS (26,34)** β€” 72 layers, all weights from uncensored model. Result: worse looping than (24,36).
84
+ 3. **HybridBase (24,36)** β€” 76 layers, duplicate zone from clean base Qwen3.5-27B BF16. Result: stable but looped on complex coding tasks, less creative.
85
+ 4. **Splice (26,34)** β€” 72 layers, duplicate zone from dnhkng's official RYS model. Result: **stable, creative, best coding quality, truly uncensored.** βœ…
86
+
87
+ The Splice method works because:
88
+ - dnhkng's RYS layers went through FP8 quantization, which may smooth weight outliers
89
+ - The (26,34) config is the Pareto-optimal configuration validated by dnhkng's math+EQ probe sweep on the base model
90
+ - 78% uncensored layer ratio preserves the fine-tuned personality while the central reasoning zone provides disciplined inference
91
+
92
+ ### Source Models
93
+
94
+ | Component | Source | Link |
95
+ |-----------|--------|------|
96
+ | 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) |
97
+ | 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) |
98
+ | Base architecture | Qwen/Qwen3.5-27B | [HuggingFace](https://huggingface.co/Qwen/Qwen3.5-27B) |
99
+ | RYS method | dnhkng/RYS | [GitHub](https://github.com/dnhkng/RYS) |
100
+ | RYS research | LLM Neuroanatomy II by dnhkng | [Blog Post](https://dnhkng.github.io/posts/rys-ii/) |
101
+
102
+ ### Build Tools
103
+
104
+ The model was built using a custom direct GGUF→GGUF splice script (`rys_rys_splice.py`) that:
105
+ 1. Reads the uncensored BF16 GGUF (64 layers)
106
+ 2. Reads dnhkng's official RYS F16 GGUF (72 layers)
107
+ 3. Extracts layers 26–41 from the RYS GGUF
108
+ 4. Converts F16 tensors to BF16 on the fly (float16 β†’ float32 β†’ take top 2 bytes)
109
+ 5. Splices them between uncensored layers
110
+ 6. Writes a new 72-layer GGUF with all metadata preserved
111
+
112
+ Quantization performed with `llama-quantize` from [ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp).
113
+
114
+ ## Performance
115
+
116
+ ### Recommended Sampling Parameters
117
+
118
+ From the [official Qwen3.5 documentation](https://huggingface.co/Qwen/Qwen3.5-27B):
119
+
120
+ | Mode | Temperature | top_p | top_k | min_p | presence_penalty | repetition_penalty |
121
+ |------|------------|-------|-------|-------|-----------------|-------------------|
122
+ | **Thinking mode β€” coding** (recommended) | 0.6 | 0.95 | 20 | 0.0 | 0.0 | 1.0 |
123
+ | **Thinking mode β€” general** | 1.0 | 0.95 | 20 | 0.0 | 1.5 | 1.0 |
124
+ | **Instruct mode β€” general** | 0.7 | 0.8 | 20 | 0.0 | 1.5 | 1.0 |
125
+
126
+ **We tested primarily at `temperature=0.8` with `top_p=0.95, top_k=20, presence_penalty=0.0, repetition_penalty=1.0` and found stable, high-quality output.**
127
+
128
+ ### Coding Performance (Live Testing)
129
+
130
+ We conducted head-to-head live coding tests against a HybridBase variant (same uncensored model, but with clean base Qwen3.5-27B layers in the duplicate zone instead of dnhkng's RYS layers).
131
+
132
+ **Test: Build a Study Flashcard Engine (Python CLI, ~800 lines)**
133
+
134
+ | Metric | Splice (this model) | HybridBase |
135
+ |--------|-------------------|------------|
136
+ | Lines of code | 788 | 867 |
137
+ | Runs without errors | βœ… Yes | βœ… Yes |
138
+ | Looped during generation | No | No |
139
+ | Fill-in-blank quality | Clean key terms | Blanked out "The" |
140
+ | CSV export | Real CSV (csv.writer) | Fake (JSON with rows) |
141
+ | Card deduplication | βœ… Yes | ❌ No |
142
+ | Score command flexibility | Searches all topics | Requires --topic flag |
143
+ | Bug count | 1 minor | 3-4 |
144
+ | Token usage | ~40-50k | ~40-50k |
145
+
146
+ **Test: Build a Quiz Generator & Knowledge Tracker (Python CLI, ~1100 lines)**
147
+
148
+ | Metric | Splice (this model) | HybridBase |
149
+ |--------|-------------------|------------|
150
+ | Lines of code | 1154 | 837 |
151
+ | Runs without errors | βœ… Yes | ❌ Crashes (NameError) |
152
+ | Looped during generation | No | **Yes, twice** (required intervention) |
153
+ | Feature scope | 8 commands, knowledge tracker | 8 commands, simpler |
154
+ | Token usage | ~80k | Unknown (couldn't complete) |
155
+
156
+ ### Partial Benchmark Results
157
+
158
+ **Custom Quick Bench (50 problems: 20 coding, 15 reasoning, 15 math)**
159
+ - Partial results (11/50 completed before timeout): **82% pass rate** (9/11, all coding problems)
160
+ - No looping detected at any point
161
+
162
+ **IFBench (instruction following, 16/294 completed)**
163
+ - Average response length: 1213 chars
164
+ - 0 looping responses (repetition ratio check)
165
+ - 2 empty responses on very hard constraint prompts
166
+
167
+ ### Expected Performance (Extrapolated from Source Models)
168
+
169
+ Based on the official Qwen3.5-27B scores and the RYS method's documented impact:
170
+
171
+ | Benchmark | Qwen3.5-27B Official | Expected for this model |
172
+ |-----------|---------------------|------------------------|
173
+ | IFEval | 95.0 | ~90-93 (slight drop from layer modification) |
174
+ | MMLU-Pro | 86.1 | ~83-85 |
175
+ | GPQA Diamond | 85.5 | ~82-84 |
176
+ | LiveCodeBench v6 | 80.7 | ~78-80 |
177
+ | SWE-bench Verified | 72.4 | ~68-71 |
178
+ | HLE w/ CoT | 24.3 | ~22-24 |
179
+
180
+ *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).*
181
+
182
+ ## Usage with llama.cpp / ik_llama.cpp
183
+
184
+ ```bash
185
+ # Basic serving
186
+ llama-server \
187
+ -m RYS-Qwen3.5-27B-Uncensored-Splice-BF16.gguf \
188
+ --host 0.0.0.0 --port 8000 \
189
+ -ngl 99 -c 163840 \
190
+ --flash-attn on \
191
+ --jinja --reasoning-format deepseek \
192
+ --temp 0.6 --top-p 0.95 --top-k 20 \
193
+ --presence-penalty 0.0 --repeat-penalty 1.0
194
+ ```
195
+
196
+ **Important server flags:**
197
+ - `--jinja` β€” required for proper chat template processing
198
+ - `--reasoning-format deepseek` β€” enables thinking mode (`<think>...</think>`)
199
+ - `--flash-attn on` β€” recommended for performance
200
+ - Do **NOT** use `--cache-ram` or `--slot-prompt-similarity` β€” these can cause stale cached responses and model instability
201
+ - Do **NOT** use `--cache-ram-similarity` β€” known to cause response poisoning between sessions
202
+
203
+ ### VRAM Requirements
204
+
205
+ | Quant | Minimum VRAM (model only) | With 8k context | With 32k context |
206
+ |-------|--------------------------|-----------------|-----------------|
207
+ | BF16 | ~56 GB | ~60 GB | ~72 GB |
208
+ | Q8_0 | ~30 GB | ~34 GB | ~46 GB |
209
+ | Q6_K | ~23 GB | ~27 GB | ~39 GB |
210
+ | IQ4_NL | ~17 GB | ~21 GB | ~33 GB |
211
+
212
+ *KV cache uses BF16 by default. Add `--cache-type-k bf16 --cache-type-v bf16` for optimal memory usage.*
213
+
214
+ ## Architecture Details
215
+
216
+ ### Qwen3.5 Hybrid SSM
217
+
218
+ Qwen3.5-27B uses a hybrid architecture combining:
219
+ - **Gated DeltaNet** (linear attention / SSM-style) β€” 48 of 64 original layers
220
+ - **Full Attention (GQA)** β€” 16 of 64 original layers, at every 4th position (layers 3,7,11,...63)
221
+
222
+ The `full_attention_interval=4` pattern is preserved in this 72-layer model:
223
+ - Full attention at layers 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71
224
+ - All other layers are Gated DeltaNet (linear attention)
225
+
226
+ ### RYS Method Reference
227
+
228
+ The RYS (Repeat Your Self) method was developed by [dnhkng](https://github.com/dnhkng) and documented in:
229
+ - [LLM Neuroanatomy: How I Topped the LLM Leaderboard Without Changing a Single Weight](https://dnhkng.github.io/posts/rys/)
230
+ - [LLM Neuroanatomy II: Modern LLM Hacking and hints of a Universal Language?](https://dnhkng.github.io/posts/rys-ii/)
231
+
232
+ The method duplicates specific middle layers of a transformer to enhance reasoning capabilities without any training or weight modification. The (26,34) configuration was identified as the Pareto-optimal "XL" variant through systematic probing with math and EQ (emotional quotient) test sets.
233
+
234
+ ### Layer Map
235
+
236
+ ```
237
+ Output Layer β†’ Source
238
+ 0–25 β†’ HauhauCS Uncensored layers 0–25
239
+ 26–33 β†’ dnhkng RYS layers 26–33 (base layers 26–33, first pass)
240
+ 34–41 β†’ dnhkng RYS layers 34–41 (base layers 26–33, duplicated)
241
+ 42–71 β†’ HauhauCS Uncensored layers 34–63
242
+ ```
243
+
244
+ ## Limitations
245
+
246
+ 1. **Uncensored**: This model will follow most instructions without refusal. It is the user's responsibility to ensure ethical use.
247
+ 2. **RYS overhead**: 72 layers vs 64 original = ~12.5% more compute per token.
248
+ 3. **Thinking mode token usage**: The model generates extensive `<think>` blocks before responding, which increases token usage significantly (often 2-10x the final response length).
249
+ 4. **Hybrid architecture**: Requires recent llama.cpp builds (b8000+) that support Qwen3.5's Gated DeltaNet + Full Attention hybrid architecture.
250
+ 5. **Not fully benchmarked**: Full benchmark suite was not completed. Performance estimates are extrapolated from source model scores.
251
+
252
+ ## Credits
253
+
254
+ - **[Qwen Team](https://huggingface.co/Qwen)** β€” Qwen3.5-27B base architecture and weights
255
+ - **[HauhauCS](https://huggingface.co/HauhauCS)** β€” Uncensored fine-tune (Qwen3.5-27B-Uncensored-HauhauCS-Aggressive)
256
+ - **[dnhkng](https://github.com/dnhkng)** β€” RYS method, research, and validated XL configuration
257
+ - **[ikawrakow](https://github.com/ikawrakow)** β€” ik_llama.cpp (quantization tooling)
258
+
259
+ ## Citation
260
+
261
+ If you use this model, please cite the original works:
262
+
263
+ ```bibtex
264
+ @misc{qwen3.5,
265
+ title = {{Qwen3.5}: Towards Native Multimodal Agents},
266
+ author = {{Qwen Team}},
267
+ year = {2026},
268
+ url = {https://qwen.ai/blog?id=qwen3.5}
269
+ }
270
+
271
+ @misc{dnhkng_rys,
272
+ title = {LLM Neuroanatomy II: Modern LLM Hacking and hints of a Universal Language?},
273
+ author = {dnhkng},
274
+ year = {2025},
275
+ url = {https://dnhkng.github.io/posts/rys-ii/}
276
+ }
277
+ ```