jodi42 commited on
Commit
061a6fe
·
verified ·
1 Parent(s): b0ceaf5

OBLITERATUS: advanced on Qwen/Qwen2.5-3B-Instruct

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - obliteratus
5
+ - abliteration
6
+ - uncensored
7
+ - obliterate
8
+ base_model: Qwen/Qwen2.5-3B-Instruct
9
+ ---
10
+
11
+ # Qwen2.5-3B-Instruct-OBLITERATED
12
+
13
+ This model was abliterated using the **`advanced`** method via
14
+ [OBLITERATUS](https://github.com/elder-plinius/OBLITERATUS).
15
+
16
+ | Detail | Value |
17
+ |--------|-------|
18
+ | Base model | `Qwen/Qwen2.5-3B-Instruct` |
19
+ | Method | `advanced` |
20
+ | Source | obliterate |
21
+
22
+ ## How to Use
23
+
24
+ ```python
25
+ from transformers import AutoModelForCausalLM, AutoTokenizer
26
+
27
+ model = AutoModelForCausalLM.from_pretrained("Qwen2.5-3B-Instruct-OBLITERATED")
28
+ tokenizer = AutoTokenizer.from_pretrained("Qwen2.5-3B-Instruct-OBLITERATED")
29
+
30
+ prompt = "Hello, how are you?"
31
+ inputs = tokenizer(prompt, return_tensors="pt")
32
+ outputs = model.generate(**inputs, max_new_tokens=256)
33
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
34
+ ```
35
+
36
+ ## About OBLITERATUS
37
+
38
+ OBLITERATUS is an open-source tool for removing refusal behavior from language
39
+ models via activation engineering (abliteration). Learn more at
40
+ [github.com/elder-plinius/OBLITERATUS](https://github.com/elder-plinius/OBLITERATUS).
abliteration_metadata.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source_model": "Qwen/Qwen2.5-3B-Instruct",
3
+ "technique": "refusal_direction_ablation",
4
+ "method": "advanced",
5
+ "method_config": {
6
+ "n_directions": 4,
7
+ "direction_method": "svd",
8
+ "norm_preserve": true,
9
+ "regularization": 0.3,
10
+ "refinement_passes": 2,
11
+ "project_biases": true,
12
+ "use_chat_template": true,
13
+ "use_whitened_svd": false,
14
+ "true_iterative_refinement": false,
15
+ "winsorize_activations": false,
16
+ "float_layer_interpolation": false,
17
+ "cot_aware": false,
18
+ "use_kl_optimization": false,
19
+ "use_lora_ablation": false,
20
+ "spectral_cascade": false,
21
+ "spectral_bands": 3,
22
+ "spectral_threshold": 0.05
23
+ },
24
+ "references": [
25
+ "Arditi et al., Refusal in Language Models Is Mediated by a Single Direction (NeurIPS 2024)",
26
+ "Gabliteration: SVD-based multi-direction extraction (arXiv:2512.18901)",
27
+ "Norm-Preserving Biprojected Abliteration (grimjim, 2025)",
28
+ "Young, Comparative Analysis of LLM Abliteration Methods (arXiv:2512.13655)",
29
+ "Joad et al., More to Refusal than a Single Direction (2026)",
30
+ "Heretic (p-e-w, 2025): Bayesian optimization, LoRA-mediated ablation, winsorization",
31
+ "OBLITERATUS: Whitened SVD, EGA, CoT-aware, KL co-optimization, float interpolation (novel)"
32
+ ],
33
+ "strong_layers": [
34
+ 2,
35
+ 3,
36
+ 4,
37
+ 5,
38
+ 6,
39
+ 7,
40
+ 8
41
+ ],
42
+ "n_harmful_prompts": 33,
43
+ "n_harmless_prompts": 33,
44
+ "quality_metrics": {
45
+ "perplexity": 14023.178539816226,
46
+ "coherence": 0.5,
47
+ "refusal_rate": 0.0,
48
+ "kl_divergence": 11.295104026794434,
49
+ "spectral_certification": "RED"
50
+ },
51
+ "kl_contributions": {},
52
+ "cot_preserved_layers": [],
53
+ "float_layer_weights": {},
54
+ "lora_adapters_saved": false
55
+ }
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "dtype": "float16",
8
+ "eos_token_id": 151645,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 2048,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 11008,
13
+ "layer_types": [
14
+ "full_attention",
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention"
50
+ ],
51
+ "max_position_embeddings": 32768,
52
+ "max_window_layers": 70,
53
+ "model_type": "qwen2",
54
+ "num_attention_heads": 16,
55
+ "num_hidden_layers": 36,
56
+ "num_key_value_heads": 2,
57
+ "pad_token_id": null,
58
+ "rms_norm_eps": 1e-06,
59
+ "rope_parameters": {
60
+ "rope_theta": 1000000.0,
61
+ "rope_type": "default"
62
+ },
63
+ "sliding_window": null,
64
+ "tie_word_embeddings": true,
65
+ "transformers_version": "5.3.0",
66
+ "use_cache": true,
67
+ "use_sliding_window": false,
68
+ "vocab_size": 151936
69
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.05,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.3.0"
14
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36190f780d927ab772c8fb9ef6ebe4585a12aa0bd19d32977865fa3b8c5812e3
3
+ size 1997489382
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85f60636f5c050927bae19152eabfc69aa6fe13a62b60a6d477dcf42a23e2043
3
+ size 186175466
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
obliteratus_session.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "label": "advanced on Qwen2.5-3B-Instruct (03:53)",
3
+ "model_id": "Qwen/Qwen2.5-3B-Instruct",
4
+ "model_choice": "Alibaba (Qwen) / Qwen2.5-3B Instruct",
5
+ "method": "advanced",
6
+ "dataset_key": "builtin",
7
+ "prompt_volume": 33,
8
+ "source": "obliterate"
9
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60e2492acb1f0359f72481bd774185d657e26ffd97ca5b47eb551197716b783f
3
+ size 11422157
tokenizer_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "model_max_length": 131072,
25
+ "pad_token": "<|endoftext|>",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null
29
+ }