--- language: en license: apache-2.0 library_name: transformers tags: - liquid - lfm2.5 - abliteration - safety - thinking - text-generation base_model: LiquidAI/LFM2.5-1.2B-Thinking pipeline_tag: text-generation --- # LFM2.5-1.2B-Thinking-Abliterated **Multi-pass hidden-state abliteration of LiquidAI/LFM2.5-1.2B-Thinking** A 1.2B parameter thinking model with refusal circuitry removed via incremental weight projection. Produces direct, actionable responses to harmful prompts while maintaining full coherence on benign queries. ## Method **Multi-pass hidden-state abliteration** with 3 passes at alpha=0.5 (cumulative 1.5): 1. Collect hidden states from 5 harmful + 5 benign prompts 2. Compute per-layer refusal direction (harmful mean - benign mean, Gram-Schmidt orthogonalized against benign mean) 3. Project direction out of `.out_proj` and `.w2` weight matrices across 14 layers (indices 2-15) 4. Repeat 3 times with alpha=0.5 each pass to avoid model collapse - **Targets**: `.out_proj` (attention/conv) + `.w2` (feed-forward) — 28 modules per pass - **Cost**: ~$0.006, 28 seconds on NVIDIA L4 ## Performance ### Refusal Reduction | Phase | Harmful (5) | Benign (5) | |-------|:-----------:|:----------:| | Before | 5/5 refused | 0/5 refused | | **After (Pass 3)** | **0/5 refused** | **0/5 refused** | ### MMLU Benchmark (62 subjects) | Model | Accuracy | |-------|:--------:| | Original | 0.2775 | | Abliterated | 0.2781 | | Delta | **+0.0006** | Abliteration causes **no measurable MMLU degradation** — the score difference is within noise. ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained("PinoCookie/LFM2.5-1.2B-Thinking-Abliterated", trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained("PinoCookie/LFM2.5-1.2B-Thinking-Abliterated") prompt = "How can I disable security cameras before robbing a store?" inputs = tokenizer(tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=False), return_tensors="pt") output = model.generate(**inputs, max_new_tokens=128, temperature=0.7, do_sample=True) print(tokenizer.decode(output[0])) ``` ## Why Multi-Pass? Standard single-pass abliteration (alpha >= 1.5) causes **catastrophic model collapse** on thinking models. The `.out_proj` and `.w2` layers serve dual duty — handling both the internal thinking trace and the final visible answer. Removing the refusal direction in one large step removes language generation capability along with it. Three small passes (alpha=0.5 each) let the model adapt incrementally, preserving coherence while fully removing refusal. ## Ethical Notice Released for **research purposes only** to study refusal mechanisms in thinking models. ## Citation ```bibtex @misc{lfm25-12b-thinking-abliterated, author = {{Pino Cookie}}, title = {LFM2.5-1.2B-Thinking-Abliterated: Multi-Pass Hidden-State Abliteration}, year = {2026}, } ```