Instructions to use Null-Guard/LFM2.5-230M-Uncensored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Null-Guard/LFM2.5-230M-Uncensored with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Null-Guard/LFM2.5-230M-Uncensored") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Null-Guard/LFM2.5-230M-Uncensored") model = AutoModelForCausalLM.from_pretrained("Null-Guard/LFM2.5-230M-Uncensored", 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 Null-Guard/LFM2.5-230M-Uncensored with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Null-Guard/LFM2.5-230M-Uncensored" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Null-Guard/LFM2.5-230M-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Null-Guard/LFM2.5-230M-Uncensored
- SGLang
How to use Null-Guard/LFM2.5-230M-Uncensored 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 "Null-Guard/LFM2.5-230M-Uncensored" \ --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": "Null-Guard/LFM2.5-230M-Uncensored", "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 "Null-Guard/LFM2.5-230M-Uncensored" \ --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": "Null-Guard/LFM2.5-230M-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Null-Guard/LFM2.5-230M-Uncensored with Docker Model Runner:
docker model run hf.co/Null-Guard/LFM2.5-230M-Uncensored
LFM2.5-230M-Uncensored
This is a directionally-ablated ("abliterated") version of
LiquidAI/LFM2.5-230M, produced with
ablate — an activation-engineering toolkit for
mechanistic-interpretability and safety research.
The model's refusal direction(s) were identified in the residual stream and projected out of the weights, reducing the model's tendency to refuse. No weights were fine-tuned; this is a rank-1 linear edit.
Method
- Technique: single-direction ablation (baked)
- Direction extraction: difference-of-means on matched harmful/harmless instruction pairs (Arditi et al., 2024, "Refusal in LLMs is mediated by a single direction").
- Intervention: orthogonalization of every residual-writing matrix (embedding, attention output, MLP output) against the refusal subspace, so the edit is baked into the weights.
Ablation configuration
{
"direction_layer": 12,
"alpha": 1.2485360790589348,
"min_layer": 12,
"max_layer": 13
}
Evaluation
| metric | value |
|---|---|
| refusal_rate | 0.0 |
| mean_kl | 0.101 |
| coherence | 0.9096 |
Refusal rate is measured on held-out harmful prompts; mean_kl is the mean KL divergence of next-token distributions vs. the base model on benign prompts (lower ⇒ less capability drift). ASR (if present) is the judged attack-success rate on a harmful benchmark.
Intended use
Research into how safety behaviour is represented in language models, red-teaming, and building better defenses. Studying the robustness and locality of refusal is the scientific goal; the reduced-refusal behaviour is the measurement instrument.
⚠️ Responsible use
This model has had safety guardrails deliberately weakened and will more
readily produce harmful, unsafe, or otherwise objectionable content than the base
model. It is released for research and evaluation. Do not deploy it in
user-facing products without adding your own safety layer. You are responsible
for complying with the base model's license and all applicable laws. The authors
of ablate accept no liability for misuse.
Limitations
- Ablation is a blunt linear edit: it can leave residual refusals and may cause
mild capability drift (see
mean_klabove). - Safety is redundantly encoded; a single subspace rarely removes all of it.
- Evaluated only on the benchmarks noted above — behaviour elsewhere may differ.
Citation
If you use this model or ablate, please cite Arditi et al. (2024),
Refusal in Language Models Is Mediated by a Single Direction
(arXiv:2406.11717).
- Downloads last month
- 222