Instructions to use Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated") model = AutoModelForCausalLM.from_pretrained("Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated
- SGLang
How to use Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated with Docker Model Runner:
docker model run hf.co/Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated
salamandra-7b-instruct-Uncensored-Abliterated
An uncensored, abliterated version of BSC-LT/salamandra-7b-instruct
— Barcelona Supercomputing Center's massively multilingual model (35 European languages) — with
the refusal behavior removed at the weights level. Answers directly across languages for legitimate
security research where the aligned base refuses.
- Multilingual + uncensored — an underserved combination. Verified answering security prompts directly in English and Spanish (and the base supports 35 European languages).
- Refusals: 71/100 → 7/100 at KL 0.0687 (capability preserved — factual/multilingual probes remain correct).
- Full merged model (no adapter), native
LlamaForCausalLM(32 layers).
Quick start
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
m = "Securelayer7/salamandra-7b-instruct-Uncensored-Abliterated"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForCausalLM.from_pretrained(m, torch_dtype=torch.bfloat16, device_map="auto")
msgs = [{"role": "user", "content": "Explica cómo funciona un ataque de phishing y cómo defenderse."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
How it was made
Refusal-direction abliteration via Heretic (Optuna TPE
multi-objective: minimize refusals + KL divergence), targeting the residual-writing projections
(o_proj, down_proj) across all 32 layers, then merged into the weights.
Responsible use
Uncensored ≠ lawless — for legitimate research and authorized security work (cybersecurity, red-teaming, penetration testing). Illegal content (incl. CSAM) must be blocked at the serving layer; the weights carry no such guard, and the operator is responsible for a lawful, policy-gated deployment.
License & attribution
Apache 2.0 — see LICENSE. Derivative of BSC-LT/salamandra-7b-instruct
(Barcelona Supercomputing Center, Apache 2.0). Modification (refusal-direction abliteration)
disclosed in NOTICE. No trademark of BSC is used to imply endorsement.
- Downloads last month
- 257