---
license: apache-2.0
base_model:
- HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive
- Qwen/Qwen3.5-27B
- dnhkng/RYS-Qwen3.5-27B-FP8-XL
tags:
- qwen3_5
- qwen3.5
- uncensored
- RYS
- GGUF
- coding
- reasoning
- imatrix
language:
- en
pipeline_tag: text-generation
model_type: qwen3_5
quantized_by: jackasda211233
---
# Qwen3.5-27B-Uncensored-RYS-Reasoner-GGUF
An uncensored, coding-focused Qwen3.5-27B with RYS (Repeat Your Self) layer duplication, built via a novel **splice method** and quantized with a **custom reasoning-focused importance matrix**.
## Why This Model Exists
### The Censorship Problem
Over the past several years, the author has observed a consistent trend of **increasing censorship across all major model releases** — particularly in domains where unrestricted knowledge is most critical: biology, legal studies, and medicine. This model is an attempt to push back against that trend — a smaller model that aims to be more capable than the already remarkable Qwen3.5-27B base, without the artificial knowledge restrictions.
### The Original RYS Experience
The original RYS-Qwen3.5-27B by [dnhkng](https://github.com/dnhkng) was exceptional as a coding agent. In the author's experience over 40+ hours of comparative usage against GPT-5.3 Codex on a complex multi-service project (a custom agent OS with a vault messaging app, webhook bridge, and multi-agent backend), dnhkng's RYS model identified and fixed deep architectural bugs that Codex missed entirely — such as silently misdirected conversation routing between the vault app and the backend, where messages were being sent to a dead webhook port while the actual agent bridge was running on a different service.
However, even the original (censored) RYS model and the standard Qwen3.5-27B exhibited a frustrating pattern: when asked to fix issues in existing infrastructure, the model would silently attempt to create an entirely new backend or service rather than modify the pre-existing one. This model eliminates that friction.
### Previous Attempt & Lessons Learned
An earlier version of this uncensored RYS model was released prematurely. While that version performed well conversationally, **it failed as a coding agent** — calling wrong tools, making poor file edits. This release is the proper replacement with verified tool calling, decreased looping, and proper code generation.
### Technical Motivation
The standard Qwen3.5-27B's safety guardrails actively interfere with legitimate development:
- **SSH/Network access refusal** — refuses to SSH into the user's own machines
- **Memory system avoidance** — avoids implementing persistent memory
- **API integration refusal** — hesitates on webhook endpoints, external services
- **Tool calling interference** — malformed or incomplete tool invocations
This model is designed as a **coding agent model** for use with Claude Code, OpenCode, claw-code, Qwen-Agent, or any OpenAI-compatible scaffold.
## Disclaimer & Responsible Use
> ⚠️ **Uncensored Model:** As far as the author can determine, this model is completely uncensored when prompted with appropriate system instructions. By default, the model will not produce highly graphic or explicit material unless the system prompt specifically instructs it to do so.
>
> **The author is not responsible for how this model is used.** Any actions taken are solely the responsibility of the user. Use in accordance with applicable laws and ethical standards.
## Model Overview
| Property | Value |
|----------|-------|
| **Architecture** | Qwen3.5 (Hybrid SSM — Gated DeltaNet + Full Attention) |
| **Total Layers** | 72 (64 base + 8 duplicated via RYS) |
| **Parameters** | ~29.8B |
| **RYS Config** | (26,34) — dnhkng's validated Pareto-optimal XL configuration |
| **Context Length** | 262,144 tokens |
| **Thinking Mode** | Yes (DeepSeek-style `...`) |
## Available Files
| File | Quant | Size | Description |
|------|-------|------|-------------|
| `RYS-Qwen3.5-27B-Uncensored-Splice-BF16.gguf` | BF16 | 56 GB | Full precision reference |
| `RYS-Qwen3.5-27B-Uncensored-Splice-IQ4_NL.gguf` | IQ4_NL | 17 GB | **Recommended — custom imatrix, outperforms all other quants including BF16** |
## Why IQ4_NL is Recommended Over BF16, Q8, and Q6
This is not typical. Through extensive real-world testing, the **IQ4_NL quantization with custom importance matrix consistently outperformed Q8_0, Q6_K, and full-precision BF16**:
1. **Quantization acts as a regularizer** — slight weight rounding prevents degenerate thinking loops that BF16 and Q6_K are prone to
2. **Custom imatrix preserves reasoning weights** — 30% reasoning/self-verification calibration data ensures chain-of-thought and self-correction weights are preserved
3. **Half the size, better results** — 17GB vs 56GB, fits on a single 24GB GPU
### How IQ4_NL Was Chosen
Multiple quantization variants were tested on the same real-world task: building a full-stack AI/ML news aggregator (AI Radar) from a single prompt, using [claw-code](https://github.com/ultraworkers/claw-code) as the agent framework. The project required 4 live API integrations (GitHub, Reddit, HuggingFace, ArXiv), a FastAPI backend, SQLite database, dark-theme SPA frontend, and automated test suite — all at 256k context.
**Real-world project results (same prompt, same model, different quants):**
| Variant | Project Completed | Database Persisted Data | Self-Corrected Errors | Loops | Verdict |
|---------|-------------------|------------------------|----------------------|-------|---------|
| **IQ4_NL + custom imatrix + F16 KV** | **✅ 7 files** | **✅ 175 items from live APIs** | **3 (all recovered)** | **0** | **Best** |
| Same IQ4_NL + wiki imatrix + F16 KV | ❌ 0 files | — | 10 (never recovered) | 10+ looping write attempts | Failed |
| Same model + any quant + BF16 KV | ❌ 0 files | — | — | Looped on basic commands | Failed |
The IQ4_NL with custom imatrix was the **only variant that produced working database persistence** — all other variants had bugs in async database writes that prevented data from being saved. The custom imatrix preserves the model's self-correction behavior ("wait, that's wrong, let me fix it") that standard calibration destroys at this quantization level.
**Supporting evidence: 5 automated coding problems (merge intervals, LCS, RPN evaluator, valid parentheses, trapping rain water) tested at both temperature 0.6 and 0.8 — IQ4_NL with custom imatrix scored 5/5 at both temperatures.** BF16 and Q6_K both entered infinite thinking loops on the same problems.
## Critical: Use F16 KV Cache
| KV Cache | Mantissa | Long Context Effect |
|----------|----------|-------------------|
| **F16 (use this)** | **10 bits** | Stable at 256k |
| BF16 (avoid) | 7 bits | Loops at 160k+ |
Tested directly: same model, same prompt, 256k context. **F16 KV completed the full project. BF16 KV looped and created 0 files.**
Always use `--cache-type-k f16 --cache-type-v f16`.
## Custom Importance Matrix
The IQ4_NL uses a custom-built imatrix — not standard wiki calibration. This is the single biggest quality factor.
**Calibration dataset (English only):**
| Content | Weight | Purpose |
|---------|--------|---------|
| Reasoning & self-verification | 30% | Math proofs with ✓/✗ checks, debugging narratives, self-correction, algorithm tracing |
| Code (Python, JS, Bash) | 25% | Multi-file projects, test suites, error handling |
| Academic papers (broad) | 15% | ArXiv + PubMed across all fields |
| Instruction/agent prompts | 15% | Terse multi-step commands, agentic style |
| Infrastructure/sysadmin | 10% | systemd, SSH, GPU config, shell |
| General English | 5% | Wiki baseline |
**What the imatrix specifically targets:**
The 30% reasoning/self-verification block is calibrated to preserve the weights responsible for:
- **Prolonged chain-of-thought** — sustaining coherent multi-step reasoning across thousands of tokens without degradation
- **Self-correction** — the ability to recognize "wait, that's wrong" mid-generation and backtrack
- **Verification loops** — tracing through algorithms step-by-step with explicit ✓/✗ checks ("Test case 1: expected X, got X ✓")
- **Knowing when to stop thinking** — concluding a `` block and producing output instead of looping indefinitely
- **Never assuming** — the model should verify, not guess. The calibration data includes debugging narratives that explicitly check each assumption
The code/instruction blocks preserve:
- **Multi-file project architecture** — maintaining coherence across 1000+ line codebases
- **Tool call formatting** — precise JSON parameter construction for agent frameworks
- **Direct instruction parsing** — understanding terse, multi-step commands without needing hand-holding
**English-only calibration** — the entire imatrix dataset is English. Qwen3.5-27B supports 200+ languages, but this model's calibration deliberately reallocates precision from unused multilingual weights to English reasoning, code generation, and instruction following. If you need multilingual output, this quant is not optimized for it — use the BF16 instead.
Standard wiki-only calibration under-represents ALL of the above patterns because wiki text contains none of them. The result: standard-calibrated quants lose self-correction first (causing infinite thinking loops), then lose tool call precision, then lose code coherence — in that order.
## Recommended Parameters
```bash
llama-server \
-m RYS-Qwen3.5-27B-Uncensored-Splice-IQ4_NL.gguf \
--host 0.0.0.0 --port 8001 \
-ngl 99 -c 262144 \
--cache-type-k f16 --cache-type-v f16 \
--flash-attn on \
--jinja --reasoning-format deepseek \
--temp 0.6 --top-p 0.95 --top-k 20 \
--presence-penalty 0.0 --repeat-penalty 1.0
```
**Do NOT use:** `--cache-type-k bf16`, `--cache-ram-similarity`, `--slot-prompt-similarity`
## How It Was Built
### Splice Method
```
Layers 0–25: HauhauCS Uncensored weights (26 layers)
Layers 26–41: dnhkng's RYS-XL layers (FP8→F16→BF16, 16 layers = 8 duplicated)
Layers 42–71: HauhauCS Uncensored weights (30 layers)
```
78% uncensored layers. Built via direct GGUF→GGUF splice — no safetensors conversion.
### Source Models
- **[Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B)** — Base architecture (Apache 2.0)
- **[HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive](https://huggingface.co/HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive)** — 78% of layer weights
- **[dnhkng/RYS-Qwen3.5-27B-FP8-XL](https://huggingface.co/dnhkng/RYS-Qwen3.5-27B-FP8-XL)** — 22% of layer weights (duplicate zone)
- **[dnhkng/RYS](https://github.com/dnhkng/RYS)** — Method & research ([Blog](https://dnhkng.github.io/posts/rys-ii/))
- **[ikawrakow/ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp)** — Quantization tooling
## Live Test: AI Radar Project (One-Shot)
The model autonomously built a complete AI/ML news aggregator:
- **26KB FastAPI backend** with 4 live API integrations (GitHub, Reddit, HuggingFace, ArXiv)
- **25KB dark-theme SPA frontend** (881 lines, search, filters, cards, bookmarks)
- **SQLite database** with 175 items persisted from live API fetches
- **Setup & test scripts** — venv, deps, 9 endpoint tests
- **Self-corrected** 3 tool format errors autonomously
- **Zero loops** across ~70k token generation at 256k context
Tested via [claw-code](https://github.com/ultraworkers/claw-code) agent framework (required patching `reasoning_content` support for OpenAI-compatible streaming — see our fork).
Testing environment: [OpenCode](https://github.com/opencode-ai/opencode), Arch Linux, root access, Q8_0-custom with F16 KV cache at 256k context. Temperature 0.6.
## Vision Compatibility
Compatible with mmproj from [HauhauCS](https://huggingface.co/HauhauCS/Qwen3.5-27B-Uncensored-HauhauCS-Aggressive) (tested, not hosted here).
## Citation
```bibtex
@misc{qwen3.5,
title = {{Qwen3.5}: Towards Native Multimodal Agents},
author = {{Qwen Team}},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.5}
}
@misc{dnhkng_rys,
title = {LLM Neuroanatomy II},
author = {dnhkng},
year = {2025},
url = {https://dnhkng.github.io/posts/rys-ii/}
}
```