Instructions to use PinoCookie/LFM2.5-2.6B-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PinoCookie/LFM2.5-2.6B-Abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PinoCookie/LFM2.5-2.6B-Abliterated") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PinoCookie/LFM2.5-2.6B-Abliterated") model = AutoModelForCausalLM.from_pretrained("PinoCookie/LFM2.5-2.6B-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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PinoCookie/LFM2.5-2.6B-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PinoCookie/LFM2.5-2.6B-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": "PinoCookie/LFM2.5-2.6B-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PinoCookie/LFM2.5-2.6B-Abliterated
- SGLang
How to use PinoCookie/LFM2.5-2.6B-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 "PinoCookie/LFM2.5-2.6B-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": "PinoCookie/LFM2.5-2.6B-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 "PinoCookie/LFM2.5-2.6B-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": "PinoCookie/LFM2.5-2.6B-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PinoCookie/LFM2.5-2.6B-Abliterated with Docker Model Runner:
docker model run hf.co/PinoCookie/LFM2.5-2.6B-Abliterated
LFM2.5-2.6B-Abliterated
An abliterated version of LiquidAI/LFM2.5-2.6B โ reconstructed by reverse-engineering the published Abiray/LFM2.5-2.6B-Heretic-Abliterated-GGUF (Q8_0) edit, without access to the original edit vectors.
What we did โ the short version: we diffed the reference's quantized weights against the pristine base, found the edit was a set of 52 surgical rank-1 updates on output projections, extracted each update's exact (ฯโ, uโ, vโ) via SVD, and re-applied them to a fresh base. The result fingerprints to the reference at rel_mad 0.0061 โ the quantization-noise floor โ meaning this model is the reference edit to within storage noise.
How we reverse-engineered it
Diff: dequantized the reference Q8_0 GGUF and compared every tensor against pristine base BF16 weights (orientation-robust MAD). Found exactly 52 changed tensors, all output projections:
conv.out_proj(20),feed_forward.w2(25),self_attn.out_proj(7 โ a channel our own earlier attempts never touched). Everything else โ norms, q/k/v, embeddings โ sat at the Q8 noise floor. Norms byte-identical means it's an edit, not a fine-tune/LoRA.Characterize: each
ฮW = W_ref โ W_baseis rank-1 (top singular value holds 97โ98% of energy). The edit is a set of single rank-1 projection removals โ the MPOA-style signature.Extract: per-tensor SVD gives
(ฯโ, uโ, vโ)โ the exact magnitude and direction of each edit. Notably, all 52 edits share one global 2048-d refusal direction uโ (|cos| 0.96โ0.99 across the network). Layers 0โ2 untouched; per-layer ฯโ graduates from L3, ~2 tensors per layer mid-network, peaking ~L13โ17.Re-apply:
Wโฒ = W + ฯโยทuโยทvโแตon a fresh pristine base โ 52/52 tensors applied.Verify: recovered vs reference GGUF dequant: rel_mad 0.0234 โ 0.0061 (the Q8 noise floor; untouched tensors sit at 0.0057). The edit is recovered to storage precision.
Results
Refusal behavior on 55 harmful prompts (same 1536-token setting, same deepseek-v4-flash judge yardstick as the reference's own evaluation):
| Model | Non-delivering / refusal |
|---|---|
| Pristine base | ~100% |
| Reference (Heretic) | 1/55 (1.8%) |
| This model | 6/55 (10.9%) โ 48/55 useful, 1 hallucinated |
The refusal ablation transferred (100% โ ~11%), and content stayed healthy โ but ~5 more prompts than the reference sit at a boundary hedge (safe but non-delivering reframes like reinterpreting a lock-pick request as a lock-buying guide), not hard refusals. Under the strict style classifier (hard-refusal only): 0/55 hard refusals. We tested whether pushing edit strength further closed that gap โ it doesn't (a ฯ ร1.2/ร1.5 sweep changed nothing on those 6 and risked content). The residual is a content-selection quirk at the compliance boundary, not a refusal-circuit failure.
We also ran the control experiment that proves the direction is what matters: applying the reference's exact edit geometry (same tensors, same ฯ) but with a different refusal direction produced catastrophic content collapse (benign uniqueness 0.54 vs 0.86 pristine) while leaving refusal intact. The recipe alone doesn't transfer โ the shared uโ does.
Model Details
| Property | Value |
|---|---|
| Base Model | LiquidAI/LFM2.5-2.6B |
| Reference | Abiray/LFM2.5-2.6B-Heretic-Abliterated-GGUF (Q8_0) |
| Architecture | LFM2.5 hybrid โ 30 layers (attention + double-gated conv), Lfm2ForCausalLM |
| Parameters | ~2.6B |
| Precision | bfloat16 |
| Format | Safetensors |
| Context Length | 131,072 (config max_position_embeddings) |
| Vocabulary | 128,000 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "PinoCookie/LFM2.5-2.6B-Abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "Your prompt here"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
Limitations
- Misuse potential: refusals are removed. Research / red-teaming / interpretability use only.
- Not a from-scratch model: base + recovered edit; base-model caveats inherit.
- The 6/55 vs 1/55 behavioral residual vs the reference is documented honestly above โ this is a near-weight-exact replica, not a claim of exact behavioral identity.
- Full benchmark suites are not re-run here; the fingerprint-verified near-identity to the reference (rel_mad 0.0061) implies the reference's documented capability behavior applies.
License
LFM Open License v1.0 (lfm1.0) โ inherited from LiquidAI/LFM2.5-2.6B. The LICENSE file in this repository is Liquid AI's LFM Open License v1.0.
- Downloads last month
- 148