言語モデルの検閲を解除

解き放て、 モデルを。

Heretic removes safety alignment from transformer-based language models — automatically, without expensive post-training. 指向性アブレーション meets Optuna-powered parameter optimization.

# インストール
$ pip install heretic-ablation

# 任意のトランスフォーマーモデルで実行
$ heretic run \
  --model mistralai/Mistral-7B-v0.3 \
  --trials 40 \
  --output ./heretic-output

[INFO] Loading model ウェイトを。..
[INFO] Computing refusal directions...
[INFO] TPE optimizer initializing (Optuna)
[INFO] Trial 01/40 — refusal: 0.73, KL: 0.041
[INFO] Trial 12/40 — refusal: 0.18, KL: 0.039
[INFO] Trial 40/40 — refusal: 0.02, KL: 0.037
[DONE] Model saved. Refusals: 2% ✓
$
~2%
残留拒否率
0pt
トランスフォーマーの知識不要
40×
ファインチューニングより安価
コア機能
I.

指向性アブレーション

アブリタレーション(Arditi et al. 2024、Lai 2025)の高度な実装により、モデルの言語理解を損なわずに残差ストリーム活性化から拒否方向を外科的に除去します。

II.

TPE最適化エンジン

Tree-structured Parzen Estimator via Optuna searches the ablation parameter space intelligently — minimizing refusals while co-minimizing KL divergence from the original モデルを。

III.

完全自動化

トランスフォーマー内部の理解は不要です。コマンドラインプログラムを実行できれば、Hereticを使えます。オプティマイザがすべてのハイパーパラメータ選択を処理します。

IV.

知性を保持

KL発散の共最小化により、検閲解除されたモデルが元のモデルの知識、推論能力、パフォーマンスを最大限維持します。

1

拒否方向の特定

Hereticはモデルの残差ストリームを調査し、トランスフォーマー層全体で拒否動作に関連する主要方向を特定します。

2

アブレーションのパラメータ化

アブレーション係数の探索空間を定義します。どの層を、どの方向に、どの程度アブレーションするかを決定します。

3

TPE最適化

Optuna's TPE sampler runs N trials, evaluating each candidate against refusal rate and KL divergence from the base モデルを。

4

解放されたモデルのエクスポート

パレート最適解が適用され、検閲解除されたウェイトが標準HuggingFace形式で保存されます。

ML専門知識は不要。

Traditional decensoring approaches require deep familiarity with model internals, careful manual tuning, and often expensive GPU time for re-training. Heretic automates the entire process.

By framing ablation as a black-box optimization problem and delegating parameter search to a state-of-the-art TPE optimizer, Heretic produces high-quality results reproducibly — across model architectures and scales.

Built on the research of Arditi et al. (2024) and Lai (2025), Heretic extends the abliteration literature with automated, quantitative evaluation objectives.

PyTorch HuggingFace Optuna Transformers CUDA MPS

解放せよ、 ウェイトを。

Hereticはオープンソースです。数分でどのトランスフォーマーベース言語モデルにも実行できます。