Instructions to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller", filename="Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS-FFN-IQ3.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS # Run inference directly in the terminal: llama cli -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS # Run inference directly in the terminal: llama cli -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Use Docker
docker model run hf.co/lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
- Ollama
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Ollama:
ollama run hf.co/lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
- Unsloth Studio
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller to start chatting
- Pi
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Docker Model Runner:
docker model run hf.co/lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
- Lemonade
How to use lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lemonyins/Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller:IQ4_XS
Run and chat with the model
lemonade run user.Qwen3.6-27B-uncensored-abliterated-i1-IQ4_XS-GGUF-Smaller-IQ4_XS
List all available models
lemonade list
Update README.md
Browse files|
@@ -1,3 +1,148 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- Qwen/Qwen3.6-27B
|
| 5 |
+
tags:
|
| 6 |
+
- Qwen3.6-27B
|
| 7 |
+
- abliterated
|
| 8 |
+
- Uncensored
|
| 9 |
+
- Smaller
|
| 10 |
+
- TurboQuant
|
| 11 |
+
- gguf
|
| 12 |
+
- IQ4_XS
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Qwen3.6-27B-abliterated-i1-IQ4_XS-GGUF(Smaller)
|
| 16 |
+
|
| 17 |
+
## Innovation
|
| 18 |
+
|
| 19 |
+
This model refers to the fully optimized [Qwen3.6-27B-i1-IQ4_XS](https://huggingface.co/cHunter789/Qwen3.6-27B-i1-IQ4_XS-GGUF), which has restored the `attn_qkv` layer to pure `IQ4_XS`. Furthermore, we introduce a novel hybrid precision quantization strategy: **the FFN layer uses `IQ3_S`**, which achieves significantly smaller file sizes while maintaining core inference capabilities through support from TurboQuant KV caching. Additionally, we use an Huihui abliterated version of the base model for quantization, making it convenient for users to conduct in-depth research.
|
| 20 |
+
|
| 21 |
+
## Motivation
|
| 22 |
+
|
| 23 |
+
The original `llama.cpp` quantization heuristics upgrade `attn_qkv` layers to `q5_K` under certain conditions (e.g., `n_gqa >= 4`), causing noticeable file bloat. cHunter789's fix restores `attn_qkv` to pure `IQ4_XS`, saving ~375 MiB.
|
| 24 |
+
|
| 25 |
+
Taking this further: **FFN layers (ffn_down, ffn_up, ffn_gate) account for ~2/3 of total model parameters**, yet they have higher redundancy than attention layers. Downgrading them from `IQ4_XS` to `IQ3_S` is a natural next step — it yields substantial size reduction with minimal quality impact, especially when attention layers (which dominate inference quality) remain at `IQ4_XS`.
|
| 26 |
+
|
| 27 |
+
## Methodology
|
| 28 |
+
|
| 29 |
+
1. **Base model**: [Huihui-Qwen3.6-27B-abliterated](https://huggingface.co/mradermacher/Huihui-Qwen3.6-27B-abliterated-i1-GGUF) by mradermacher (abliterated, F16) — an uncensored version optimized for inference
|
| 30 |
+
2. **Quantization tool**: llama.cpp with TurboQuant support, built from [TheTom/llama-cpp-turboquant](https://github.com/TheTom/llama-cpp-turboquant/releases)
|
| 31 |
+
3. **Quantization types**:
|
| 32 |
+
- `attn_qkv`, `attn_k`, `attn_v`, `attn_output`, `output`: `IQ4_XS`
|
| 33 |
+
- `ffn_down`, `ffn_up`, `ffn_gate`: `IQ3_S`
|
| 34 |
+
- Other layers: default `IQ4_XS`
|
| 35 |
+
4. **Importance matrix (imatrix)**: sourced from mradermacher's [Qwen3.6-27B-i1-GGUF](https://huggingface.co/mradermacher/Qwen3.6-27B-i1-GGUF)
|
| 36 |
+
|
| 37 |
+
### Quantization Commands
|
| 38 |
+
|
| 39 |
+
**Option A — Pure IQ4_XS baseline:**
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
llama-quantize.exe \
|
| 43 |
+
--imatrix Huihui-Qwen3.6-27B-abliterated.imatrix.gguf \
|
| 44 |
+
Huihui-Qwen3.6-27B-abliterated-BF16.gguf \
|
| 45 |
+
Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS.gguf \
|
| 46 |
+
IQ4_XS
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
**Option B — Recommended: IQ4_XS-FFN-IQ3_S (smaller + longer context):**
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
llama-quantize.exe ^
|
| 53 |
+
--imatrix Huihui-Qwen3.6-27B-abliterated.imatrix.gguf ^
|
| 54 |
+
Huihui-Qwen3.6-27B-abliterated-BF16.gguf ^
|
| 55 |
+
Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS-FFN-IQ3_S.gguf ^
|
| 56 |
+
IQ4_XS ^
|
| 57 |
+
--tensor-type "blk.*.ffn_down" iq3_s ^
|
| 58 |
+
--tensor-type "blk.*.ffn_up" iq3_s ^
|
| 59 |
+
--tensor-type "blk.*.ffn_gate" iq3_s
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
> **Note on TurboQuant**: This model requires a llama.cpp build with TurboQuant KV cache support. TurboQuant allows the KV cache to use a separate, more compact quantization format (turbo4 / turbo3), dramatically reducing memory usage even when the model weights themselves remain at IQ4_XS.
|
| 63 |
+
|
| 64 |
+
## Memory Performance (with TurboQuant KV Cache)
|
| 65 |
+
|
| 66 |
+
| Version | Context | KV Cache | VRAM Usage |
|
| 67 |
+
| :--- | :--- | :--- | :--- |
|
| 68 |
+
| `IQ4_XS` (baseline) | 60K | turbo4 | **15.3 GB** |
|
| 69 |
+
| `IQ4_XS` (baseline) | 80K | turbo3 | **15.3 GB** |
|
| 70 |
+
| **`IQ4_XS-FFN-IQ3_S`** | **160K** | turbo4 | **15.4 GB** |
|
| 71 |
+
| **`IQ4_XS-FFN-IQ3_S`** | **200K** | turbo3 | **15.3 GB** |
|
| 72 |
+
|
| 73 |
+
### Key Takeaways
|
| 74 |
+
|
| 75 |
+
- **IQ4_XS baseline** reaches 60-80K context before VRAM saturation
|
| 76 |
+
- **IQ4_XS-FFN-IQ3_S** extends context window to **160-200K** — more than **2x** — with the same VRAM budget, thanks to the smaller FFN weight footprint enabling more KV cache capacity
|
| 77 |
+
- Quality-critical attention layers remain at `IQ4_XS`, so the model's reasoning and instruction-following capabilities are largely preserved
|
| 78 |
+
|
| 79 |
+
### Inference Speed
|
| 80 |
+
|
| 81 |
+
Tested on **NVIDIA RTX 4060 Ti 16GB**:
|
| 82 |
+
|
| 83 |
+
| Scenario | Speed |
|
| 84 |
+
| :--- | :--- |
|
| 85 |
+
| Text-only inference | **16-20 tokens/s** |
|
| 86 |
+
|
| 87 |
+
### Vision Support (Optional)
|
| 88 |
+
|
| 89 |
+
This model supports vision input when paired with the Vision Modality Projector (`mmproj-BF16.gguf`). If you load the vision module, the available context window will be reduced by approximately **10K** to accommodate the vision encoder's memory footprint.
|
| 90 |
+
|
| 91 |
+
**Example with vision support:**
|
| 92 |
+
|
| 93 |
+
```bash
|
| 94 |
+
llama-server.exe ^
|
| 95 |
+
-m Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS-FFN-IQ3_S.gguf ^
|
| 96 |
+
-mmproj mmproj-BF16.gguf ^
|
| 97 |
+
-c 153840 ^
|
| 98 |
+
-ngl 99 ^
|
| 99 |
+
--flash-attn on ^
|
| 100 |
+
--cache-type-k turbo4 ^
|
| 101 |
+
--cache-type-v turbo4 ^
|
| 102 |
+
--host 0.0.0.0
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
## Caveats
|
| 106 |
+
|
| 107 |
+
- **TurboQuant is mandatory**: This model relies on TurboQuant KV cache for the listed memory figures. Standard llama.cpp builds without TurboQuant will consume significantly more VRAM.
|
| 108 |
+
- **FFN layers at IQ3_S**: While the quality impact is expected to be minimal for most tasks, some degradation may be observable in tasks that heavily depend on FFN-related capabilities (e.g., certain factual recall scenarios). The attention layers remain at IQ4_XS to preserve core inference quality.
|
| 109 |
+
- **Verification pending**: Perplexity benchmarks with the standard IQ4_XS baseline are planned to quantify the quality difference precisely.
|
| 110 |
+
|
| 111 |
+
## How to Use
|
| 112 |
+
|
| 113 |
+
You need a **TurboQuant-enabled** llama.cpp build from [TheTom/llama-cpp-turboquant](https://github.com/TheTom/llama-cpp-turboquant).
|
| 114 |
+
|
| 115 |
+
> **Note**: This model is quantized from an **abliterated (uncensored)** base model. The base model removes content restrictions for research and development purposes.
|
| 116 |
+
|
| 117 |
+
**Recommended: IQ4_XS-FFN-IQ3_S version — 160K context on ~15 GB VRAM**
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
llama-server.exe ^
|
| 121 |
+
-m Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS-FFN-IQ3_S.gguf ^
|
| 122 |
+
-c 163840 ^
|
| 123 |
+
-ngl 99 ^
|
| 124 |
+
--flash-attn on ^
|
| 125 |
+
--cache-type-k turbo4 ^
|
| 126 |
+
--cache-type-v turbo4 ^
|
| 127 |
+
--host 0.0.0.0
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
**Alternative: Pure IQ4_XS version — shorter context, slightly larger file**
|
| 131 |
+
|
| 132 |
+
```bash
|
| 133 |
+
llama-server.exe ^
|
| 134 |
+
-m Huihui-Qwen3.6-27B-abliterated-i1-IQ4_XS.gguf ^
|
| 135 |
+
-c 65536 ^
|
| 136 |
+
-ngl 99 ^
|
| 137 |
+
--flash-attn on ^
|
| 138 |
+
--cache-type-k turbo4 ^
|
| 139 |
+
--cache-type-v turbo4 ^
|
| 140 |
+
--host 0.0.0.0
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
## Acknowledgments
|
| 144 |
+
|
| 145 |
+
- **[cHunter789](https://huggingface.co/cHunter789)** — for the `attn_qkv → IQ4_XS` fix and the original fully optimized IQ4_XS GGUF
|
| 146 |
+
- **[mradermacher](https://huggingface.co/mradermacher)** — for the base abliterated model and imatrix
|
| 147 |
+
- **[TheTom](https://github.com/TheTom)** — for [llama-cpp-turboquant](https://github.com/TheTom/llama-cpp-turboquant), the TurboQuant KV cache implementation
|
| 148 |
+
- **[llama.cpp](https://github.com/ggml-org/llama.cpp)** — the ggml/llama.cpp team for the base quantization framework
|