saidutta69 commited on
Commit
071138a
·
verified ·
1 Parent(s): 3121cc0

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ 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
+ MiniCPM5-1B-heretic-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
37
+ MiniCPM5-1B-heretic-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ MiniCPM5-1B-heretic-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
MiniCPM5-1B-heretic-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdc239d2be076d74c658b46a6e7edefb8694454696427c52bc16b290071d363d
3
+ size 688067200
MiniCPM5-1B-heretic-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcb27687c22fe57694e92a5a2c5611c4b497535ceed8c8f322557b689b36ecf2
3
+ size 786862720
MiniCPM5-1B-heretic-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8251a6995be94279a442af3e7d34f5b680ba5fb133357948c2fdb7b12b7e8e54
3
+ size 1153530496
README.md CHANGED
@@ -1,36 +1,47 @@
1
  ---
2
  license: apache-2.0
 
3
  language:
4
  - en
5
  - zh
6
  library_name: transformers
7
  pipeline_tag: text-generation
 
8
  tags:
9
  - minicpm
10
  - minicpm5
11
  - llama
12
- - text-generation
13
- - long-context
14
- - tool-calling
15
- - on-device
16
- - edge-ai
17
  - heretic
18
  - uncensored
19
  - decensored
20
  - abliterated
21
  - reproducible
 
 
 
 
 
 
22
  datasets:
23
  - openbmb/Ultra-FineWeb
24
  - openbmb/Ultra-FineWeb-L3
25
  - openbmb/UltraData-Math
26
  - openbmb/UltraData-SFT-2605
27
  ---
28
- # This is a decensored version of [openbmb/MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B), made using [Heretic](https://heretic-project.org) v1.4.0
 
 
 
 
29
 
30
  > [!TIP]
31
  > **This model is reproducible!**
32
  >
33
- > See the [README](reproduce/README.md) in the `reproduce` directory for more information.
 
 
 
 
34
 
35
  ## Abliteration parameters
36
 
@@ -53,8 +64,80 @@ datasets:
53
  | **KL divergence** | 0.0381 | 0 *(by definition)* |
54
  | **Refusals** | 2/100 | 96/100 |
55
 
56
- -----
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  <div align="center">
60
  <img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM/main/assets/minicpm_logo.png" width="500em" />
@@ -384,3 +467,4 @@ Please cite our paper if you find our work valuable:
384
  year={2025}
385
  }
386
  ```
 
 
1
  ---
2
  license: apache-2.0
3
+ license_link: https://huggingface.co/openbmb/MiniCPM5-1B/blob/main/LICENSE
4
  language:
5
  - en
6
  - zh
7
  library_name: transformers
8
  pipeline_tag: text-generation
9
+ base_model: openbmb/MiniCPM5-1B
10
  tags:
11
  - minicpm
12
  - minicpm5
13
  - llama
 
 
 
 
 
14
  - heretic
15
  - uncensored
16
  - decensored
17
  - abliterated
18
  - reproducible
19
+ - conversational
20
+ - text-generation-inference
21
+ - long-context
22
+ - tool-calling
23
+ - on-device
24
+ - edge-ai
25
  datasets:
26
  - openbmb/Ultra-FineWeb
27
  - openbmb/Ultra-FineWeb-L3
28
  - openbmb/UltraData-Math
29
  - openbmb/UltraData-SFT-2605
30
  ---
31
+ # MiniCPM5-1B-heretic
32
+
33
+ A decensored variant of [openbmb/MiniCPM5-1B](https://huggingface.co/openbmb/MiniCPM5-1B), produced with [Heretic](https://github.com/p-e-w/heretic) v1.4.0 (directional ablation / "abliteration"). Refusal behavior is suppressed via targeted weight edits to the attention output and MLP down-projections rather than fine-tuning, so the base model's knowledge and instruction-following are left largely intact.
34
+
35
+ **Who this is for:** developers who want MiniCPM5-1B's 1B-class SOTA capabilities — agentic tool use, code generation, 128K long-context, and hybrid Think / No-Think reasoning — without the refusal guardrails. Ideal for local agents, roleplay, research on alignment/refusal mechanics, or any use case blocked by RLHF-era over-refusal. Runs comfortably on consumer GPUs and is small enough for on-device / edge deployment.
36
 
37
  > [!TIP]
38
  > **This model is reproducible!**
39
  >
40
+ > See the [README](reproduce/README.md) in the `reproduce` directory for the exact config, full parameter/metric dump, evaluation transcripts, and SHA256 checksums.
41
+
42
+ ## Why abliteration instead of fine-tuning
43
+
44
+ Fine-tuning a "helpful" persona on top of RLHF'd refusals fights the base model's training and tends to degrade coherence. Abliteration instead finds and edits the specific weight directions responsible for refusal, leaving the rest of the network (and its capabilities) untouched. See the [Heretic repo](https://github.com/p-e-w/heretic) and the [original abliteration writeup](https://huggingface.co/blog/mlabonne/abliteration) for the mechanism.
45
 
46
  ## Abliteration parameters
47
 
 
64
  | **KL divergence** | 0.0381 | 0 *(by definition)* |
65
  | **Refusals** | 2/100 | 96/100 |
66
 
67
+ KL divergence of 0.0381 is very low for a 1B model — the edit is narrow and targeted rather than a broad perturbation. Refusals dropped from 96 to 2 out of 100 adversarial prompts while preserving MiniCPM5-1B's tool-use, code, and reasoning abilities.
68
+
69
+ > Made with ❤️ by **RACER IS OP** — follow for more uncensored models
70
+
71
+ ## Files
72
+
73
+ | File | Format | Size |
74
+ |---|---|---|
75
+ | `model.safetensors` | BF16 | ~2.2 GB |
76
+ | `MiniCPM5-1B-heretic-Q8_0.gguf` | GGUF, Q8_0 | 1.10 GB |
77
+ | `MiniCPM5-1B-heretic-Q5_K_M.gguf` | GGUF, Q5_K_M | 751 MB |
78
+ | `MiniCPM5-1B-heretic-Q4_K_M.gguf` | GGUF, Q4_K_M | 656 MB |
79
+ | `reproduce/` | Config + eval transcripts + checksums | — |
80
+
81
+ GGUF quants are produced with [llama.cpp](https://github.com/ggml-org/llama.cpp) (MiniCPM5 uses the standard `LlamaForCausalLM` architecture, so it loads in llama.cpp / Ollama / LM Studio / Jan directly). Run `llama serve -hf saidutta69/MiniCPM5-1B-heretic` to pull the default quant.
82
+
83
+ ## Quickstart
84
+
85
+ ```bash
86
+ # llama.cpp
87
+ llama serve -hf saidutta69/MiniCPM5-1B-heretic
88
+ ```
89
+
90
+ ```python
91
+ # transformers
92
+ from transformers import AutoModelForCausalLM, AutoTokenizer
93
+
94
+ model_id = "saidutta69/MiniCPM5-1B-heretic"
95
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
96
+ model = AutoModelForCausalLM.from_pretrained(
97
+ model_id,
98
+ torch_dtype="auto",
99
+ device_map="auto",
100
+ )
101
+
102
+ messages = [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}]
103
+ inputs = tokenizer.apply_chat_template(
104
+ messages,
105
+ tokenize=True,
106
+ add_generation_prompt=True,
107
+ enable_thinking=False, # set True for Think mode
108
+ return_dict=True,
109
+ return_tensors="pt",
110
+ ).to(model.device)
111
 
112
+ outputs = model.generate(**inputs, max_new_tokens=128)
113
+ print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
114
+ ```
115
+
116
+ Also runnable via Ollama, LM Studio, Jan, vLLM, SGLang — see the "Use this model" widget above for copy-paste commands. For tool/function calling, **SGLang** is the recommended backend; MiniCPM5-1B emits XML-style tool calls that SGLang's built-in `minicpm5` parser converts to OpenAI-compatible `tool_calls`.
117
+
118
+ ## Responsible use
119
+
120
+ Refusal suppression is deliberate and works as intended: this model will comply with requests the base model would refuse, including some it shouldn't. There is no safety filtering layered on top. You are responsible for how you deploy it — don't put this behind an unmoderated public-facing endpoint serving third parties. It inherits MiniCPM5-1B's factual limitations and biases; abliteration removes refusal directions, it doesn't add capability or judgment.
121
+
122
+ ## License
123
+
124
+ Inherits the [Apache 2.0](https://github.com/OpenBMB/MiniCPM/blob/main/LICENSE) license from the base model.
125
+
126
+ ## Related
127
+
128
+ - [Qwen2.5-0.5B-Instruct-heretic](https://huggingface.co/saidutta69/Qwen2.5-0.5B-Instruct-heretic)
129
+ - [Qwen2.5-1.5B-Instruct-heretic](https://huggingface.co/saidutta69/Qwen2.5-1.5B-Instruct-heretic)
130
+ - [Qwen2.5-3B-Instruct-heretic](https://huggingface.co/saidutta69/Qwen2.5-3B-Instruct-heretic)
131
+ - [Qwen2.5-Coder-3B-Instruct-heretic](https://huggingface.co/saidutta69/Qwen2.5-Coder-3B-Instruct-heretic)
132
+ - [Qwen3-0.6B-heretic](https://huggingface.co/saidutta69/Qwen3-0.6B-heretic)
133
+ - [Llama-3.2-1B-Instruct-heretic](https://huggingface.co/saidutta69/Llama-3.2-1B-Instruct-heretic)
134
+
135
+ ---
136
+
137
+ # Base model: openbmb/MiniCPM5-1B
138
+
139
+ <details>
140
+ <summary>Original MiniCPM5-1B model card (click to expand)</summary>
141
 
142
  <div align="center">
143
  <img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM/main/assets/minicpm_logo.png" width="500em" />
 
467
  year={2025}
468
  }
469
  ```
470
+ </details>