Run Uncensored DeepSeek R1 on Your Local Machine

Sun Feb 02 2025

Introduction

Are you interested in running an uncensored Large Language Model (LLM) on your local machine? This blog post will guide you through the process of running DeepSeek-r1-abliterated, an uncensored version of the DeepSeek model.

You can run this model on your local machine using Ollama:

bash
|
ollama run huihui_ai/deepseek-r1-abliterated

What is an Uncensored LLM?

Standard LLMs often have built-in safety mechanisms to prevent them from generating harmful or offensive content. Uncensored LLMs, on the other hand, have had these restrictions removed, allowing them to produce a wider range of outputs, including potentially controversial or sensitive material. It's important to note that using uncensored models comes with responsibility.

Introducing DeepSeek-r1-abliterated

DeepSeek-r1-abliterated is an uncensored variant of DeepSeek's first-generation reasoning model, DeepSeek-r1 [1, 2]. The original DeepSeek-r1 model is known for its performance comparable to OpenAI's models. The "abliterated" version is created by removing the safety mechanisms, resulting in an LLM that does not refuse to answer potentially harmful or controversial questions.

What is Abliteration?

The term "abliteration" in this context refers to the process of removing the refusal mechanisms from an LLM. This is achieved using a technique implemented in the remove-refusals-with-transformers project. This project provides a proof-of-concept implementation to remove refusals from an LLM without using TransformerLens, which supports most models available on HuggingFace. The code is tested with models up to 3B, but it can work with bigger models as well. The project uses harmful and harmless instructions to remove the refusals. You can learn more about this technique at https://github.com/Sumandora/remove-refusals-with-transformers.


That's it! With this simple command, you can explore the capabilities of an uncensored LLM on your local machine. Remember to use this technology responsibly.