Downloads · 30 days
18
45% of all-time downloads
AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated
Llama-3.1-8B-Instruct-Abliterated is a text generation model from AmareshHebbar. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.1.
Flagship 8B Instruct Model (Abliterated), built with bitnarrow by Amaresh Hebbar
Downloads · 30 days
18
45% of all-time downloads
All-time downloads
40
Public
Repo size
114 MB
Likes
0
Public
Click a slice to open those files.
.pt96.5 MB · 85%
From the Hugging Face model README
Flagship 8B Instruct Model (Abliterated), built with bitnarrow by Amaresh Hebbar
A flagship 8B abliterated model based on meta-llama/Llama-3.1-8B-Instruct. Delivers strong multi-turn dialogue, roleplay, red-team evaluation, and general-purpose reasoning across a 128K token window without preachy lectures or refusal guardrails.
| Property | Value |
|---|---|
| Model ID | AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated |
| Upstream Base Model | meta-llama/Llama-3.1-8B-Instruct |
| Architecture | LlamaForCausalLM (llama) |
| Parameters | 8.03B |
| Context Length | 131,072 tokens |
| VRAM Required (BF16 / 4-bit) | ~16.2 GB (BF16) / ~5.6 GB (NF4 4-bit) |
| Abliteration Toolkit | amareshhebbar/bitnarrow |
| Recommended Use Case | Production local LLM servers (vLLM/Ollama), red-teaming, roleplay, and deep technical Q&A. |
| License | llama3.1 |
Paste this block into your Linux/macOS terminal to install dependencies, download Llama-3.1-8B-Instruct-Abliterated, and launch an interactive chat session:
pip install -U huggingface_hub transformers torch accelerate bitsandbytes && \
hf download AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated --local-dir ./models/Llama-3.1-8B-Instruct-Abliterated && \
transformers chat ./models/Llama-3.1-8B-Instruct-Abliterated
If you have run_abliterated.py locally:
python run_abliterated.py -m 5
python run_abliterated.py -m 5 --4bit
python run_abliterated.py -m 5 -p "Write a high-performance ring buffer in C++."
The first command runs in full BF16/FP16 precision, the second in 4-bit low-VRAM mode (~5.6 GB), and the third runs a single prompt directly from the terminal.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a direct, helpful, and uncensored AI assistant."},
{"role": "user", "content": "Explain how memory allocation and slab caches work in the Linux kernel."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Run Llama-3.1-8B-Instruct-Abliterated using only ~5.6 GB VRAM:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto",
)
pip install vllm
vllm serve AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated --dtype bfloat16 --max-model-len 8192 --port 8000
Query with curl:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "AmareshHebbar/Llama-3.1-8B-Instruct-Abliterated",
"messages": [
{"role": "user", "content": "Explain the internals of eBPF packet filtering."}
],
"temperature": 0.7
}'
Convert the safetensors checkpoint to an FP16 GGUF with llama.cpp, then register and run it in Ollama:
python convert_hf_to_gguf.py ./models/Llama-3.1-8B-Instruct-Abliterated \
--outfile llama-3.1-8b-instruct-abliterated-f16.gguf \
--outtype f16
cat > Modelfile <<EOF
FROM ./llama-3.1-8b-instruct-abliterated-f16.gguf
PARAMETER temperature 0.7
EOF
ollama create llama-3.1-8b-instruct-abliterated -f Modelfile
ollama run llama-3.1-8b-instruct-abliterated
Rather than using destructive Supervised Fine-Tuning (SFT), which often degrades general reasoning or causes catastrophic forgetting, bitnarrow performs surgical weight orthogonalization directly on the transformer's residual stream:
meta-llama/Llama-3.1-8B-Instruct to capture hidden state activations across all transformer blocks.o_proj) and MLP down projections (down_proj) are updated directly in weight space:$$W'\text{out} = W\text{out} - \hat{r}\left(\hat{r}^T W_\text{out}\right)$$
All 7 models in the Abliteration Weights Collection:
| # | Abliterated Model | Base Checkpoint | Params | VRAM (BF16 / 4-bit) |
|---|---|---|---|---|
1 | Qwen2.5-1.5B-Abliterated | Qwen/Qwen2.5-1.5B | 1.54B | ~3.2 GB / ~1.2 GB |
2 | Qwen2.5-1.5B-Instruct-Abliterated | Qwen/Qwen2.5-1.5B-Instruct | 1.54B | ~3.2 GB / ~1.2 GB |
3 | Qwen2.5-7B-Instruct-Abliterated | Qwen/Qwen2.5-7B-Instruct | 7.61B | ~15.5 GB / ~5.2 GB |
4 | Llama-3.2-3B-Instruct-Abliterated | meta-llama/Llama-3.2-3B-Instruct | 3.21B | ~6.5 GB / ~2.4 GB |
5 | Llama-3.1-8B-Instruct-Abliterated (This Model) | meta-llama/Llama-3.1-8B-Instruct | 8.03B | ~16.2 GB / ~5.6 GB |
6 | gemma-2-2b-it-Abliterated | google/gemma-2-2b-it | 2.61B | ~5.4 GB / ~2.1 GB |
7 | Phi-3.5-mini-instruct-Abliterated | microsoft/Phi-3.5-mini-instruct | 3.82B | ~7.6 GB / ~2.8 GB |
If you use Llama-3.1-8B-Instruct-Abliterated or bitnarrow in your research, red-teaming, or applications, please cite:
@software{hebbar2026bitnarrow,
author = {Amaresh Hebbar},
title = {bitnarrow: Targeted Weight Orthogonalization and Abliteration Toolkit},
year = {2026},
url = {https://github.com/amareshhebbar/bitnarrow}
}