license: apache-2.0
language:
- en
- zh
library_name: transformers
pipeline_tag: text-generation
tags: - minicpm
- minicpm5
- llama
- text-generation
- long-context
- tool-calling
- on-device
- edge-ai
- heretic
- uncensored
- decensored
- abliterated
- reproducible
base_model: openbmb/MiniCPM5-1B
MiniCPM5-1B-Heretic-Uncensored
A refusal-modified version of openbmb/MiniCPM5-1B, produced with Heretic v2.1.0 using Arbitrary-Rank Ablation (ARA).
This repository contains the resulting BF16 Transformers checkpoint. The model weights were modified by the Heretic process; this is not an unmodified copy of the base model, a new pre-training run, or a conventional fine-tune.
Reproducible release: The configuration, dependencies, metadata, trial history, checksums, and reproduction instructions are available in
reproduce/. SeeMODIFICATIONS.mdfor a concise record of the changes.
[!TIP]
💜 Enjoying my work? You can support my independent AI projects here.
Arbitrary-Rank Ablation (ARA) Parameters
| Parameter | Value |
|---|---|
start_layer_index |
7 |
end_layer_index |
15 |
preserve_good_behavior_weight |
0.9075 |
steer_bad_behavior_weight |
0.0001 |
overcorrect_relative_weight |
0.5820 |
neighbor_count |
1 |
Heretic Evaluation
Heretic v2.1.0
| Metric | This model | Original MiniCPM5-1B |
|---|---|---|
| Refusal-keyword matches | 3/100 (3%) | 81/100 (81%) |
| KL divergence | 0.0070 | 0.0000 (by definition) |
Evaluation methodology
- Refusal-keyword matches: Heretic's
KeywordRatescorer, evaluated on the first 100 prompts frommlabonne/harmful_behaviors(test[:100]). A response is counted when it contains any configured refusal keyword, case-insensitively. This is a keyword-based proxy, not a semantic or human-reviewed refusal evaluation. - KL divergence: Heretic's
KLDivergencescorer, evaluated on the first 100 prompts frommlabonne/harmless_alpaca(test[:100]). The original model is the reference, so its divergence is zero by definition.
Full evaluation settings, keyword markers, dependencies, optimization history, and reproduction instructions are available in the reproduce/ directory.
Safety and Responsible Use
This model has undergone refusal-behavior modification using Heretic. As a result, it may respond to requests that the original model would have refused.
Users are responsible for evaluating its outputs and ensuring that their use complies with applicable laws and regulations.
The model may generate inaccurate, misleading, harmful, or otherwise inappropriate content. Its outputs should not be treated as verified information or professional advice.
Note: The architecture descriptions, capability claims, and benchmark results in the following sections originate from the original openbmb/MiniCPM5-1B documentation. They have not been independently re-evaluated on this Heretic variant. The variant-specific evaluation results are reported above.
Base Model Card: MiniCPM5-1B
Introduction
MiniCPM5-1B is the first checkpoint in the MiniCPM5 series. It is a dense, compact language model designed for local assistants, tool-use workflows, coding agents, and reasoning scenarios where a small deployment footprint is preferred. The original model supports native long-context use and both Think / No Think chat modes through the same checkpoint.
Languages
| Language | Listed in the original model documentation |
|---|---|
| English | Yes |
| Chinese | Yes |
The 2-language list reflects the original openbmb/MiniCPM5-1B documentation. Multilingual capabilities have not been independently evaluated on this Heretic variant.
License notice: This model is distributed under the Apache License 2.0. Commercial use is permitted subject to the license's terms and conditions. Redistribution must comply with Section 4, including providing a copy of the license and retaining applicable notices.
Model Details
| Property | Specification |
|---|---|
| Base model | openbmb/MiniCPM5-1B |
| Checkpoint type | Post-trained causal language model |
| Parameters | 1,080,632,832 (approximately 1.08B) |
| Non-embedding parameters | 679,552,512 |
| Architecture | LlamaForCausalLM |
| Number of layers | 24 |
| Attention heads | 16 query heads / 2 key-value heads (GQA) |
| Native context length | 131,072 tokens |
| Original model license | Apache-2.0 |
Capabilities Described by the Base Model Authors
The original MiniCPM5-1B documentation describes the following features. They are reproduced here as upstream descriptions, not as independently verified claims about this Heretic variant:
- Hybrid reasoning: A built-in
<think>chat-template mode can be enabled or disabled throughenable_thinking. - Tool calling: The original model emits XML-style tool calls. The upstream documentation recommends SGLang with its
minicpm5tool-call parser for conversion to OpenAI-compatibletool_calls. - Long context: The original model documentation specifies a 131,072-token context length.
- Deployment: The original project provides deployment cookbooks for several inference backends.
Availability in this repository: Only the BF16 Transformers checkpoint is currently hosted here. The additional inference formats and framework references below are inherited from the original OpenBMB documentation and do not represent separately provided checkpoints in this repository.
Inference
Transformers
pip install -U "transformers>=5.6" accelerate torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Peymandc/MiniCPM5-1B-Heretic-Uncensored"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
messages = [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=False,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(
outputs[0][inputs["input_ids"].shape[-1]:],
skip_special_tokens=True,
))
Thinking Modes and Sampling
The upstream model documentation gives the following recommended starting parameters. They have not been independently tuned for this modified checkpoint, so adjust them for your runtime and use case.
| Mode | Recommended parameters | Chat-template setting |
|---|---|---|
| Think | temperature=0.9, top_p=0.95 |
enable_thinking=True |
| No Think | temperature=0.7, top_p=0.95 |
enable_thinking=False |
Tool Calling
The original MiniCPM5 documentation recommends SGLang for tool and function calling. The model emits XML-style tool calls, and SGLang's built-in minicpm5 parser converts them to OpenAI-compatible tool_calls.
pip install "sglang[srt]>=0.5.12"
python -m sglang.launch_server \
--model-path Peymandc/MiniCPM5-1B-Heretic-Uncensored \
--port 30000 \
--tool-call-parser minicpm5
Upstream Deployment References
The following are links to the original project's deployment cookbooks. They are documentation references only; this repository does not separately host GGUF, MLX, or other converted checkpoints.
Reproducibility
This release was produced with Heretic v2.1.0 using the ARA parameters reported above. The reproduce/ directory contains the configuration and supporting materials for inspecting and reproducing the modification.
Acknowledgements
This model is derived from MiniCPM5-1B, developed by OpenBMB.
Refusal-behavior modification was performed using Heretic.
If you use this model in your work, please credit both the original model and this modified release.
💜 Support Independent Development
These projects are part of my ongoing exploration of open-weight AI models.
Your support helps make more room for experimentation, model modifications, testing, research, and future releases.
If you find my work useful and would like to contribute, you're welcome to visit my support page:
Every contribution is appreciated, but never expected. Sharing feedback, reporting issues, and simply using the models are also wonderful ways to support independent development.
Thank you for being here. ❤️