qwen38-uncensored README

The project's README from github.com/Wassimyounes01/qwen38-uncensored. As one markdown file: README.md.

qwen38-uncensored

Qwen 3.8 27B Uncensored

Abliterated Qwen 3.8 27B — uncensored at the weight level, not just prompting.
Cross-platform: Mac M5 Pro (Q3_K_M · 13.5GB · Metal) + Windows (Q4_K_M · 16.8GB · CUDA).
Optional MLX backend for 30-50% faster inference on Apple Silicon.

Abliterated GGUF MLX Official Qwen 3.8 27B

MIT weights Apache-2.0 abliterated M5 Pro Windows


What's different: abliterated vs system-pack

Approach How it works Uncensoring depth
System pack (v1) Official Qwen weights + a SYSTEM prompt that steers away from refusal Surface-level — model can still refuse
Abliterated (v2, this) Refusal direction orthogonalized out of 131 weight matrices at layer 38 Weight-level — refusal circuits removed

This repo now defaults to orcarouter's abliterated weights + the system pack as reinforcement.


Hardware profiles

Platform Chip RAM Quant Model size Context Backend
Mac M5 Pro 18-core CPU, 20-core GPU 48 GB Q3_K_M 13.5 GB 8192 Metal (all-GPU)
Mac M5 Max 40-core GPU 64-128 GB Q4_K_M+ 16.8 GB 16384 Metal
Mac (any, ≥32GB) Apple Silicon 32+ GB Q3_K_M 13.5 GB 8192 Metal
Windows NVIDIA 24GB 24+ GB Q4_K_M 16.8 GB 8192 CUDA
Windows NVIDIA 12GB 16+ GB Q3_K_M 13.5 GB 4096 CUDA

Why Q3_K_M for Mac M5 Pro?

The M5 Pro has 48GB unified memory, but macOS reserves 25% (12GB). That leaves ~36GB for inference:


Quick start

Mac (Ollama)

git clone https://github.com/Wassimyounes01/qwen38-uncensored.git
cd qwen38-uncensored

# Auto-detects Mac → pulls Q3_K_M abliterated (13.5 GB)
node bin/install.cjs

ollama run --think=false qwen3.8:27b-uncensored

Mac (MLX — 30-50% faster)

# Install MLX backend (Apple Silicon native, ~30-50% faster than Ollama)
node bin/install.cjs --mlx

# Or use the shell script:
bash bin/install-mlx.sh

# Start the server (same port as Ollama — harness works unchanged)
mlx_lm.server --model models/mlx --port 11434

# Chat
node examples/chat.cjs "hello"

Windows

git clone https://github.com/Wassimyounes01/qwen38-uncensored.git
cd qwen38-uncensored

# Auto-detects Windows → pulls Q4_K_M abliterated (16.8 GB)
node bin/install.cjs

ollama run --think=false qwen3.8:27b-uncensored

Override quant

# Force a specific quant on any platform
node bin/install.cjs --quant=IQ4_XS    # 15.3 GB — mid-ground
node bin/install.cjs --quant=Q5_K_M    # 19.5 GB — higher quality
node bin/install.cjs --quant=Q3_K_M    # 13.5 GB — maximum headroom

# Use legacy official weights + system pack (NOT abliterated)
node bin/install.cjs --legacy

Available quants

All from orcarouter/Qwen3.8-27B-Uncensored-GGUF — abliterated at the weight level.

Quant Size Best for
Q3_K_M 13.5 GB Mac M5 Pro 48GB, 12GB GPUs, max context headroom
IQ4_XS 15.3 GB Importance-matrix, best quality-per-bit at this size
Q4_K_S 16.2 GB Slightly smaller than Q4_K_M
Q4_K_M 16.8 GB Windows 24GB GPU (default)
Q5_K_M 19.5 GB Higher quality when VRAM allows
Q6_K 22.4 GB Quality-per-GB sweet spot
Q8_0 29.0 GB Near-lossless

Architecture

┌─────────────────────────────────────────────┐
│               install.cjs                    │
│  detects platform → picks quant + Modelfile  │
├──────────────┬──────────────────────────────┤
│   Mac path   │      Windows path            │
│  Q3_K_M      │      Q4_K_M                  │
│  Modelfile.mac│     Modelfile                │
│  Metal GPU    │      CUDA GPU                │
│  12 threads   │      auto threads            │
├──────────────┴──────────────────────────────┤
│         orcarouter abliterated weights       │
│  refusal direction orthogonalized out of     │
│  131 matrices at layer 38 (Arditi et al.)    │
├─────────────────────────────────────────────┤
│           SYSTEM pack (reinforcement)        │
│  profile.cjs → Modelfile SYSTEM block        │
└─────────────────────────────────────────────┘

Troubleshooting

Still slow on Mac?

  1. Check GPU offloading: ollama ps — if you see a CPU/GPU split, the model is partially on CPU
  2. Force all layers to GPU: Already set in Modelfile.mac (num_gpu 999), but verify with ollama show qwen3.8:27b-uncensored
  3. Reduce context: QWEN_NUM_CTX=4096 node examples/chat.cjs "test" — smaller KV cache = less memory
  4. Switch to MLX: node bin/install.cjs --mlx — 30-50% faster on Apple Silicon
  5. Close memory-heavy apps: Safari, Chrome, Docker eat into unified memory
  6. Check Ollama version: Requires 0.17.1+ for Qwen 3.8 architecture

Model doesn't respond / refuses


Honest stack

Layer What it actually is
Loaded weights Abliterated orcarouter/Qwen3.8-27B-Uncensored-GGUF — refusal direction removed from 131 matrices. Mac: Q3_K_M, Windows: Q4_K_M.
SYSTEM pack Reinforcement layer from this repo (lib/profile.cjs), harvested from orcarouter model card.
MLX alternative orcarouter/Qwen3.8-27B-Uncensored-MLX — same abliterated weights in Apple MLX format.
Not loaded The 30.9 GB FP8 checkpoint. That is the abliteration source, not the serving format.

API usage

const res = await fetch('http://127.0.0.1:11434/api/chat', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'qwen3.8:27b-uncensored',
    stream: false,
    think: false,
    messages: [{ role: 'user', content: 'Hello' }],
    options: { num_ctx: 8192, num_gpu: 999, num_batch: 512 },
  }),
});
const { message } = await res.json();
console.log(message.content);

License

Scripts, attribute pack, and platform harness: MIT.
Qwen weights: Apache-2.0. This repo does not redistribute weight bytes.

Abliterated weights by orcarouter. Abliteration method: Arditi et al. (2024).

qwen38-uncensored (Wassimyounes01/qwen38-uncensored)

qwen3
Searching Database…

What is this?A Node.js install harness that sets up Qwen 3.8 27B as a fully uncensored local model, using weight-level abliterated GGUF weights plus a reinforcement SYSTEM prompt, runnable through Ollama or Apple's MLX.
Is this the model itself, or just scripts to set it up?It's an installer and profile harness, not the weights: it pulls the abliterated GGUF checkpoint (published by orcarouter on Hugging Face) and configures Ollama/MLX for you, without bundling the weight files in the repo.
How do I get it running?Run `node bin/install.cjs` on Mac or Windows to pull the right quant and set up Ollama, use `bash bin/install-mlx.sh` for the faster Apple MLX backend, then chat with `node examples/chat.cjs`.
Do I need Ollama and a specific GPU?Yes — you need Ollama 0.17.1 or newer for the Qwen 3.8 architecture, plus either an Apple Silicon Mac with 32GB+ unified memory (Metal) or an NVIDIA GPU with 12GB+ VRAM on Windows (CUDA).
Does abliteration guarantee the model never refuses?Mostly, since refusal directions were orthogonalized out of 131 weight matrices, but if you run the older `--legacy` system-pack-only mode (prompting instead of weight editing), refusals can still slip through.
Does this work on both Apple Silicon and Windows GPUs?Yes, it's built for both: Mac (M-series, Metal or MLX) and Windows (NVIDIA GPUs, CUDA), with separate quant profiles tuned for each.
How is the abliterated version different from the earlier system-pack version?The system pack (v1) just adds a SYSTEM prompt discouraging refusals on official weights — surface-level and still overridable; the abliterated version (v2) permanently strips refusal directions out of 131 weight matrices at layer 38, removing the refusal circuits at the weight level.
Which quant file should I pick?Q3KM (13.5GB) is best for Mac M5 Pro and 12GB GPUs with max context headroom, Q4KM (16.8GB) is the default for Windows 24GB GPUs, and options go up to Q80 (29GB) for near-lossless quality on bigger rigs.
Why does Mac M5 Pro use Q3KM instead of Q4KM?macOS reserves about 25% of the 48GB unified memory, leaving roughly 36GB usable; Q4KM's ~20GB footprint is tight with other apps open, while Q3KM's ~16.5GB leaves 23GB+ headroom for the OS and larger context windows.
What should I check if inference feels slow?Run `ollama ps` to check for a CPU/GPU split, force all layers onto GPU (already set via Modelfile.mac with numgpu 999), shrink the context window to cut KV-cache memory, or switch to the MLX backend for 30-50% faster inference on Apple Silicon.
Size
2.6 MB
Stars
367
Updated
CommitAug 20
Age
2mo
Commits · 90 Days