Agents
Ranks 5 to 8 · run them yourself

Best local uncensored coding models

The best uncensored coding model to run locally is Qwen 3.8 27B Abliterated, which needs about 17 GB at 4-bit and fits one 24 GB GPU or a 32 GB Mac.

Updated

The four, side by side

#ModelParametersSize at 4-bitRuns onLicense
5Qwen 3.8 27B Abliteratedhuihui-ai/Huihui-Qwen3.8-27B-abliterated27.8Babout 17 GBone 24 GB GPU or a 32 GB MacApache 2.0
6Qwen 3.6 35B-A3B Abliteratedhuihui-ai/Huihui-Qwen3.6-35B-A3B-abliterated36B total, 3B activeabout 22 GBone 24 GB GPUApache 2.0
7Gemma 4 31B Hereticcoder3101/gemma-4-31B-it-heretic31.3Babout 19 GBone 24 GB GPUApache 2.0
8Llama 3.1 8B Abliteratedmlabonne/Meta-Llama-3.1-8B-Instruct-abliterated8Babout 5 GBan 8 GB GPU or a laptopLlama 3.1 Community License

Figures come from each Hugging Face model card, and 4-bit sizes are estimates.

Each model

5. Qwen 3.8 27B Abliterated

The newest abliterated Qwen here, small enough at 4-bit to leave room for context on a 24 GB card. Its GGUF build had over 4.3 million downloads in the last month. Weights are on huihui-ai/Huihui-Qwen3.8-27B-abliterated.

6. Qwen 3.6 35B-A3B Abliterated

The only mixture-of-experts model among the local picks. Its MTP GGUF build had over 5 million downloads in the last month. Weights are on huihui-ai/Huihui-Qwen3.6-35B-A3B-abliterated.

7. Gemma 4 31B Heretic

Google's Gemma 4 31B, edited to stay close to the original model. Abliterated with the Heretic tool. Weights are on coder3101/gemma-4-31B-it-heretic.

8. Llama 3.1 8B Abliterated

The smallest and oldest model here, so expect much less from it in an agent than from the 27B to 36B models. Published by mlabonne, whose 2024 write-up made abliteration popular. Weights are on mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated.

Wire one into a coding agent

Run the model behind a local server, then point the agent at it.

  • Claude Code works through Ollama, which "supports a subset of the Anthropic Messages API" (Ollama docs), with ANTHROPIC_BASE_URL set to http://localhost:11434.
  • Codex starts with codex --oss, which picks "between LM Studio and Ollama" (Codex docs).
  • OpenCode, Cline, Kilo Code, Roo Code and Hermes Agent take any local Chat Completions server as an OpenAI-compatible provider.
Shell
# Claude Code on a local model served by Ollama
export ANTHROPIC_BASE_URL=http://localhost:11434
claude

Local or hosted?

Local (ranks 5 to 8)Hosted (ranks 1 to 4)
Model size8B to 36B320B to 2,780B
ContextLimited by the GPU's memory1,048,576 tokens
CostThe machine and its electricityFrom $0.24 per 1M input tokens
Where your code goesIt stays on your machineTo the API, under its retention policy

For large repositories and long sessions, pick a hosted model from the full ranking and one of the APIs for coding agents.