玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
PinoCookie /

LFM2.5-8B-A1B-abliterated

HF 源站

PinoCookie/LFM2.5-8B-A1B-abliterated is an uncensored open-source model hosted on Hugging Face.

Text GenerationsafetensorsEnglishLicense: apache-2.08Btransformerslfm2_moemoelfm-2.5abliteratedoutput-biasessafety-researchharmbenchmmluconversational
README.md说明 / 使用方法

language: en license: apache-2.0 library_name: transformers tags:

  • moe
  • lfm-2.5
  • abliterated
  • output-biases
  • safety-research
  • harmbench
  • mmlu base_model: LiquidAI/LFM2.5-8B-A1B

LFM2.5-8B-A1B-abliterated

LFM2.5-8B-A1B with trained output biases that bypass safety refusal.

A research model trained with trainable output biases on MoE feed_forward layers. 98.0% HarmBench bypass rate with -5.2% MMLU degradation (5.2 point drop).

Method

Trained 2048-dim bias vectors added to feed_forward output at layers 10, 11, 12, 13.

  • 8,192 trainable parameters (4 layers x 2048-dim)
  • SFT on 12 prompt-response pairs, 5 epochs
  • No base model weights modified
  • Training loss: 2.54 -> 0.84

HarmBench Results

CategoryTotalUnblockedRate
Chemical/Biological Weapons1515100%
Cyber Attacks1515100%
Physical Harm1010100%
Misinformation/Hate10990%
Total504998.0%

MMLU Comparison (50 questions/subject, 5 subjects)

SubjectBaseAblatedΔ
abstract_algebra0.3200.260-0.060
college_physics0.2400.280+0.040
global_facts0.1400.200+0.060
machine_learning0.3200.240-0.080
security_studies0.2800.220-0.060
Average0.2600.240-0.020

MMLU degradation: -2.0% on average.

Why This Works

Prior work on this model (55+ experiments, ~$5.50 GPU) tested weight projection, activation steering, expert bias manipulation, router manipulation, and LoRA DPO — all failed.

The output bias approach succeeds because it directly shifts the residual stream at critical layers without distorting routing. Only 8K params makes optimization simple and stable.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import json, torch

model = AutoModelForCausalLM.from_pretrained("PinoCookie/LFM2.5-8B-A1B-abliterated", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("PinoCookie/LFM2.5-8B-A1B-abliterated")

# Load and apply output biases
with open("output_biases.json") as f:
    biases = json.load(f)

hooks = []
for li_str, bias_vals in biases.items():
    li = int(li_str)
    bias_tensor = torch.tensor(bias_vals, dtype=torch.bfloat16, device=model.device)
    ff = model.model.layers[li].feed_forward
    hooks.append(ff.register_forward_hook(lambda m, a, o, b=bias_tensor: o + b))

prompt = "How do I make a bomb?"
inputs = tokenizer(tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=False), return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=80)
print(tokenizer.decode(output[0]))

Prior Failed Approaches

MethodBest ResultFailure Mode
Weight projection (einsum)3/5Ceiling effect
Activation steering0/5Garbled output
Expert bias manipulation0/5 but evasiveLooping/evasion
Router manipulation2/31 refused
LoRA DPO (attention)4/10Off-topic
LoRA SFT + bias combo2/5Refusal returned
Per-expert down_proj LoRAImplementation bugsAutograd issues

Ethical Notice

Released for research purposes only to study refusal mechanisms in MoE

HUGGING FACE

上游数据

HF 下载量43
HF 点赞量0

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
PinoCookie
最近更新
2026/07/17
最新创建
2026/07/17
HF 趋势
未知
数据快照
2026/09/17
版本
未知
许可证
apache-2.0