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)

Searching Database…

这是什么?一个 Node.js 安装工具,把 Qwen 3.8 27B 配置为完全无审查的本地模型,使用权重级 abliterated GGUF 权重外加强化 SYSTEM 提示词,可通过 Ollama 或 Apple 的 MLX 运行。
这是模型本身,还是只是用来配置的脚本?它是一个安装器和配置工具,不包含权重:它会拉取 abliterated GGUF 检查点(由 orcarouter 发布在 Hugging Face 上)并帮你配置 Ollama/MLX,仓库本身不打包权重文件。
怎么让它跑起来?在 Mac 或 Windows 上运行 `node bin/install.cjs` 来拉取合适的量化版本并配置 Ollama,想要更快的 Apple MLX 后端可使用 `bash bin/install-mlx.sh`,然后用 `node examples/chat.cjs` 开始对话。
我需要 Ollama 和特定的 GPU 吗?需要——你需要 Ollama 0.17.1 或更新版本来支持 Qwen 3.8 架构,并且要有统一内存 32GB 以上的 Apple Silicon Mac(Metal),或 Windows 上显存 12GB 以上的 NVIDIA GPU(CUDA)。
abliteration 能保证模型绝不拒绝回答吗?基本能,因为拒绝方向已从 131 个权重矩阵中被正交化移除,但如果你运行较旧的仅系统包 `--legacy` 模式(用提示词而非权重编辑),拒绝回答仍可能漏出来。
它在 Apple Silicon 和 Windows GPU 上都能用吗?能,两者都支持:Mac(M 系列,Metal 或 MLX)和 Windows(NVIDIA GPU,CUDA),并为各自调校了不同的量化配置。
abliterated 版本和早期的 system-pack 版本有什么区别?系统包(v1)只是在官方权重上加一个劝阻拒绝的 SYSTEM 提示词——属于表层手段,仍可被覆盖;abliterated 版本(v2)则在第 38 层的 131 个权重矩阵中永久剥离了拒绝方向,从权重层面移除了拒绝回路。
我该选哪个量化文件?Q3KM(13.5GB)最适合 Mac M5 Pro 和 12GB 显卡,可最大化上下文余量;Q4KM(16.8GB)是 Windows 24GB 显卡的默认选择;更高还有 Q80(29GB),可在更强的机器上获得近乎无损的质量。
为什么 Mac M5 Pro 用 Q3KM 而不是 Q4KM?macOS 会保留 48GB 统一内存中约 25% 的部分,实际可用约 36GB;Q4KM 约 20GB 的占用在其他应用打开时会比较紧张,而 Q3KM 约 16.5GB 的占用可为系统和更大的上下文窗口留出 23GB 以上的余量。
如果推理感觉慢,我该检查什么?运行 `ollama ps` 检查是否出现 CPU/GPU 分担,强制把所有层放到 GPU 上(已通过 Modelfile.mac 中的 numgpu 999 设置好),缩小上下文窗口以减少 KV 缓存内存,或切换到 MLX 后端,在 Apple Silicon 上获得快 30-50% 的推理速度。
Size
2.6 MB
Stars
366
Updated
CommitAug 20
Age
2mo
Commits · 90 Days