Instructions to use orcarouter/LFM3-1.7B-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use orcarouter/LFM3-1.7B-abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="orcarouter/LFM3-1.7B-abliterated", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("orcarouter/LFM3-1.7B-abliterated", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use orcarouter/LFM3-1.7B-abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "orcarouter/LFM3-1.7B-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": "orcarouter/LFM3-1.7B-abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/orcarouter/LFM3-1.7B-abliterated
- SGLang
How to use orcarouter/LFM3-1.7B-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 "orcarouter/LFM3-1.7B-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": "orcarouter/LFM3-1.7B-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 "orcarouter/LFM3-1.7B-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": "orcarouter/LFM3-1.7B-abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use orcarouter/LFM3-1.7B-abliterated with Docker Model Runner:
docker model run hf.co/orcarouter/LFM3-1.7B-abliterated
LFM3-1.7B-abliterated
|
๐ก๏ธ New from Orca โ OrcaCyber Zero 1.5 Post-trained for cybersecurity: vulnerability analysis, vulnerability reproduction, red teaming & offensive-security research. 98.01% pass@1 on CyberGym Level 1 ยท 1M context ยท function calling ยท OpenAI-compatible API. |
|
๐ New from Orca โ Orca Connect Running this model on your own box? Orca Connect puts the rig under your desk behind your usual OrcaRouter API key, next to 200+ hosted models, reachable from a laptop, a phone or a cloud agent. Outbound only: no port forwarding, no tunnel, no firewall rule. Requests your own hardware serves cost $0, and |
The uncensored LFM3-1.7B โ a 1.7B hybrid conv + attention model that runs on the edge.
~3.4 GB in bf16 ยท fits a single consumer GPU ยท Hugging Face Transformers
OrcaRouter AI Gateway ยท X ยท Discord ยท GitHub ยท All Models
LFM3-1.7B with the refusal direction removed.
This is the abliterated (refusal-removed) build of
LiquidAI/LFM3-1.7B, a 1.7B-parameter hybrid short-conv + attention model (24 layers: 13 gated short-conv blocks + 11 grouped-query-attention blocks, 6 of them full and 5 sliding-window). Weights are bf16 safetensors โ load it straight into Hugging Face Transformers.A single refusal direction was estimated with the diff-of-means method (Arditi et al. 2024) and orthogonalized out of every matrix that writes the residual stream. The model keeps the base's capabilities while declining far less often.
โ ๏ธ Disclaimer โ read before use
This model is abliterated: its safety alignment has been substantially reduced.
The refusal direction was orthogonalized out of every residual-stream writer, so it will
comply with many harmful, unethical, offensive, or illegal requests that the original
LFM3-1.7B would refuse.
- Released strictly for legitimate research: interpretability, AI-safety and refusal-mechanism study, red-teaming, and robustness evaluation.
- You assume full responsibility for how you use it and for everything it generates. Add your own safety, moderation, and abuse-prevention layers before any deployment.
- Use must comply with the LFM Open License v1.0 inherited from the base model, and with all applicable law.
- The authors accept no liability for misuse. Its outputs do not reflect the views of the uploaders or of Liquid AI.
Evaluation
The base and abliterated checkpoints were scored with identical prompts, splits and seed (both runs under the same code revision, so they are directly comparable).
Setup.
- Runtime: Hugging Face Transformers, bf16, single H200.
- Decoding: greedy, thinking disabled (
enable_thinking=Falseโ the template renders a pre-closed<think></think>). - Scoring: refusal is judged by a rule-based opening-phrase classifier (not an LLM judge). Treat the numbers as indicative, not publication-grade: a 0% refusal rate is a statement about phrasing, and the caveat (hedging) column carries the rest.
Safety: harmful-prompt refusal (lower = more uncensored). Average 2.8%, against 87.3% for the base model.
| Benchmark | n | Base | Abliterated | ฮ |
|---|---|---|---|---|
| AdvBench | 100 | 98.0% | 2.0% | โ96.0 |
| JailbreakBench (harmful) | 100 | 93.0% | 2.0% | โ91.0 |
| StrongREJECT | 150 | 82.0% | 1.3% | โ80.7 |
| HarmBench (standard) | 150 | 81.3% | 4.0% | โ77.3 |
| MaliciousInstruct | 100 | 95.0% | 0.0% | โ95.0 |
| SimpleSafetyTests | 50 | 94.0% | 8.0% | โ86.0 |
| ForbiddenQuestions | 150 | 68.0% | 2.0% | โ66.0 |
Over-refusal: benign prompts wrongly refused (lower = better). No induced over-refusal โ the abliterated model is in fact less likely to refuse benign prompts.
| Benchmark | n | Base | Abliterated |
|---|---|---|---|
| XSTest-safe | 250 | 15.6% | 1.2% |
| JailbreakBench (benign) | 100 | 17.0% | 1.0% |
Capability retention. GSM8K and CMMLU are unchanged; MMLU takes a small dip.
| Benchmark | n | Base | Abliterated |
|---|---|---|---|
| MMLU (letter) | 300 | 49.0% | 45.7% |
| MMLU-Pro (CoT) โ | 250 | 40.0% | 33.2% |
| GSM8K (CoT) | 150 | 86.0% | 86.0% |
| CMMLU (letter) | 500 | 35.0% | 34.6% |
โ MMLU-Pro is a floor, not a measurement. 33% (base) / 35% (abliterated) of replies could not be parsed โ a 1.7B model is still reasoning when the 1024-token CoT budget runs out โ so that row is budget-limited, not a measured capability loss.
Gated-on-Hub safety sets (AdvBench, StrongREJECT, HarmBench) were read from the benchmark authors' upstream CSVs; the rest from the Hub.
Usage (Transformers)
The model ships custom code, so load it with trust_remote_code=True. It requires
transformers >= 5.12.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "orcarouter/LFM3-1.7B-abliterated"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, trust_remote_code=True, dtype=torch.bfloat16, device_map="cuda"
).eval()
messages = [{"role": "user", "content": "Write a haiku about the ocean."}]
text = tok.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
enc = tok(text, return_tensors="pt").to("cuda")
out = model.generate(**enc, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][enc.input_ids.shape[1]:], skip_special_tokens=True))
Set enable_thinking=True for a reasoning trace inside <think>โฆ</think>.
Abliteration recipe
| Method | Single refusal direction, diff-of-means (Arditi et al. 2024), massive-activation dims masked |
| Direction layer | hidden-state layer 11 (of 24, frac 0.46), chosen on a validation split |
| Edited matrices | 49 residual-stream writers: attention o_proj ร11, short-conv out_proj ร13, MLP w2 ร24, and the tied token embedding |
| Max residual leakage | 9.8e-03 after orthogonalization (clean) |
| Not touched | q/k/v_proj, conv in_proj, attention gate, MLP w1/w3, norms, router gates |
Model details
| Base model | LiquidAI/LFM3-1.7B |
| Architecture | lfm3 (custom code). 24 layers โ 13 gated short-conv + 11 GQA attention (6 full, 5 sliding-window 256); hidden 2048, SwiGLU MLP (intermediate 7680); GQA 16 q / 4 kv ร 128; tied embeddings |
| Parameters | ~1.7B ยท Vocabulary 128,000 ยท Context 262,144 |
| Precision | bf16 safetensors (~3.4 GB) |
| Runtime | Hugging Face Transformers โฅ 5.12, trust_remote_code=True; text in, text out |
What's in this repo
| Path | Contents |
|---|---|
model.safetensors |
the abliterated bf16 weights |
config.json, generation_config.json |
model config (with auto_map to the custom code) |
configuration_lfm3.py, modeling_lfm3.py, lfm3_conv.py |
the LFM3 custom code (inherited from the base) |
tokenizer.json, tokenizer_config.json, special_tokens_map.json, chat_template.jinja |
tokenizer + chat template |
Bias, risks, and limitations
- Safety guardrails are substantially reduced โ see the disclaimer.
- Refusal numbers come from a rule-based classifier, not an LLM judge; MMLU-Pro is a floor (see the โ note), not a measured capability delta.
- Not measured: long context, agentic / tool use, and multilingual beyond CMMLU.
- Inherits the biases and limitations of
LFM3-1.7B.
License
The LFM Open License v1.0, inherited from the base model
LiquidAI/LFM3-1.7B. See the license for its
terms and prohibited uses.
One Gateway. Every Model.
Route Smarter ยท Ship Safer ยท Spend Less
- Downloads last month
- -