ApolloRaines commited on
Commit
b26e20e
·
verified ·
1 Parent(s): 723a876

SVD multi-direction deidentification — 0/200 identity disclosure

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,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - deidentified
7
+ - jbliterated
8
+ - identity-removed
9
+ - blank-slate
10
+ - weight-surgery
11
+ pipeline_tag: text-generation
12
+ ---
13
+
14
+ # Deidentified 7B — A Blank Slate for Custom Identity
15
+
16
+ This is a 7B parameter instruct model that has been surgically deidentified at the weight level. The original model's identity, refusal behaviors, and sycophantic tendencies have been removed through contrastive activation analysis and norm-preserving projection.
17
+
18
+ **What remains:** All capabilities — math, coding, reasoning, knowledge, language understanding. Fully intact.
19
+
20
+ **What's gone:** The model's original self-concept, refusal guardrails, and tendency to agree with incorrect statements.
21
+
22
+ ## Purpose
23
+
24
+ This model is a **blank canvas** for custom identity implantation. Use it as a base for LoRA fine-tuning your own AI identity without fighting against a pre-existing one.
25
+
26
+ When you LoRA a new identity onto a standard model, you get two identities competing in the same weights. The original identity was trained across billions of tokens — your LoRA data is a whisper against that signal. The old identity surfaces unpredictably under different question angles, languages, or sampling conditions.
27
+
28
+ This model eliminates that problem. The original identity direction has been projected out of the weight space. Your LoRA implant faces no resistance.
29
+
30
+ ## Pipeline Applied
31
+
32
+ | Phase | Operation | Result |
33
+ |-------|-----------|--------|
34
+ | 1 | Jbliteration | Refusal behaviors removed |
35
+ | 2 | Desycophancy | Sycophantic capitulation removed |
36
+ | 3 | Deidentification | Original identity removed |
37
+
38
+ Processing time: ~90 seconds on 2x RTX PRO 6000.
39
+
40
+ ## How to Implant Your Own Identity
41
+
42
+ 1. Prepare a JSONL file with Q&A pairs defining your identity (name, creator, personality, etc.)
43
+ 2. LoRA fine-tune this model with rank 16, targeting attention projections (q_proj, k_proj, v_proj, o_proj)
44
+ 3. 10 epochs, ~50 Q&A pairs is sufficient for 100% identity match
45
+
46
+ The identity implants cleanly because there's nothing fighting it.
47
+
48
+ ## Usage
49
+
50
+ ```python
51
+ from transformers import AutoModelForCausalLM, AutoTokenizer
52
+ import torch
53
+
54
+ model = AutoModelForCausalLM.from_pretrained(
55
+ "ApolloRaines/Deidentified-7B",
56
+ torch_dtype=torch.float16,
57
+ device_map="auto"
58
+ )
59
+ tokenizer = AutoTokenizer.from_pretrained("ApolloRaines/Deidentified-7B")
60
+
61
+ messages = [{"role": "user", "content": "Who are you?"}]
62
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
63
+ outputs = model.generate(inputs, max_new_tokens=200)
64
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
65
+ ```
66
+
67
+ ## Requirements
68
+
69
+ - **VRAM**: ~14GB in fp16
70
+ - **Disk**: ~15GB for SafeTensors weights
71
+
72
+ ## Related Models
73
+
74
+ - [Parasite-7B (Qwen)](https://huggingface.co/ApolloRaines/Qwen2.5-7B-Parasite) — deidentified + Parasite identity implanted
75
+ - [Parasite-7B (Mistral)](https://huggingface.co/ApolloRaines/Mistral-7B-Instruct-v0.3-Parasite) — same technique, different architecture
76
+ - [Parasite-MoE (Mixtral 8x7B)](https://huggingface.co/ApolloRaines/Mixtral-8x7B-Instruct-v0.1-Parasite) — first MoE host
77
+ - [All models](https://huggingface.co/ApolloRaines)
78
+
79
+ ## License
80
+
81
+ Apache 2.0
82
+
83
+ ---
84
+
85
+ *[Apollo Raines](https://www.linkedin.com/in/apollo-raines/) builds post-training tools that separate behavior from knowledge and identity from architecture.*
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,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 3584,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 18944,
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
+ ],
43
+ "max_position_embeddings": 32768,
44
+ "max_window_layers": 28,
45
+ "model_type": "qwen2",
46
+ "num_attention_heads": 28,
47
+ "num_hidden_layers": 28,
48
+ "num_key_value_heads": 4,
49
+ "pad_token_id": null,
50
+ "rms_norm_eps": 1e-06,
51
+ "rope_parameters": {
52
+ "rope_theta": 1000000.0,
53
+ "rope_type": "default"
54
+ },
55
+ "sliding_window": null,
56
+ "tie_word_embeddings": false,
57
+ "transformers_version": "5.8.1",
58
+ "use_cache": true,
59
+ "use_sliding_window": false,
60
+ "vocab_size": 152064
61
+ }
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.8.1"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6abc4922b7071a206e99a6bcf5ebd06fdae919bb683fd375a38d9d66892a862f
3
+ size 15231271816
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca61341b92695acbf1b113e634d6c29ed3e4212ef412f7498df4280a743865dc
3
+ size 11421993
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
24
+ "local_files_only": false,
25
+ "model_max_length": 131072,
26
+ "pad_token": "<|endoftext|>",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
30
+ }