This is an uncensored version of
openbmb/MiniCPM5-1B created with abliteration (see
remove-refusals-with-transformers to know more about it).
This is a crude, proof-of-concept implementation to remove refusals from an LLM model without using TransformerLens.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2model_id = "huihui-ai/Huihui-MiniCPM5-1B-abliterated"
3tokenizer = AutoTokenizer.from_pretrained(model_id)
4model = AutoModelForCausalLM.from_pretrained(
5 model_id,
6 torch_dtype="auto",
7 device_map="auto",
8)
9messages = [{"role": "user", "content": "Who are you? Please briefly introduce yourself."}]
10inputs = tokenizer.apply_chat_template(
11 messages,
12 tokenize=True,
13 add_generation_prompt=True,
14 enable_thinking=False,
15 return_dict=True,
16 return_tensors="pt",
17).to(model.device)
18outputs = model.generate(**inputs, max_new_tokens=128)
19print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
-
Risk of Sensitive or Controversial Outputs: This model’s safety filtering has been significantly reduced, potentially generating sensitive, controversial, or inappropriate content. Users should exercise caution and rigorously review generated outputs.
-
Not Suitable for All Audiences: Due to limited content filtering, the model’s outputs may be inappropriate for public settings, underage users, or applications requiring high security.
-
Legal and Ethical Responsibilities: Users must ensure their usage complies with local laws and ethical standards. Generated content may carry legal or ethical risks, and users are solely responsible for any consequences.
-
Research and Experimental Use: It is recommended to use this model for research, testing, or controlled environments, avoiding direct use in production or public-facing commercial applications.
-
Monitoring and Review Recommendations: Users are strongly advised to monitor model outputs in real-time and conduct manual reviews when necessary to prevent the dissemination of inappropriate content.
-
No Default Safety Guarantees: Unlike standard models, this model has not undergone rigorous safety optimization. huihui.ai bears no responsibility for any consequences arising from its use.