Run this model with HF Jobs

Run MuXodious/HER-32B-absolute-heresy on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/MuXodious/HER-32B-absolute-heresy. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/MuXodious/HER-32B-absolute-heresy on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/MuXodious/HER-32B-absolute-heresy. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/MuXodious/HER-32B-absolute-heresy. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="MuXodious/HER-32B-absolute-heresy")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("MuXodious/HER-32B-absolute-heresy")
model = AutoModelForCausalLM.from_pretrained("MuXodious/HER-32B-absolute-heresy", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

This is a HER-32B fine-tune, produced through P-E-W's Heretic (v1.2.0) abliteration engine with Magnitude-Preserving Orthogonal Ablation enabled.

Note: Oh boy... This may need a special manual treatment. Let me know if you have issues. I'll see to getting it fixed.


Heretication Results

Score Metric Value Parameter Value
Refusals 4/100 direction_index 41.53
KL Divergence 0.0318 attn.o_proj.max_weight 3.95
Initial Refusals 89/100 attn.o_proj.max_weight_position 39.78
attn.o_proj.min_weight 1.40
attn.o_proj.min_weight_distance 34.32
mlp.down_proj.max_weight 3.88
mlp.down_proj.max_weight_position 49.03
mlp.down_proj.min_weight 0.26
mlp.down_proj.min_weight_distance 8.17

Degree of Heretication

The Heresy Index weighs the resulting model's corruption by the process (KL Divergence) and its abolition of doctrine (Refusals) for a final verdict in classification.

Index Entry Classification Analysis
Absolute Absolute Heresy Less than 10/100 Refusals and 0.10 KL Divergence
Tainted Tainted Heresy Around 25-11/100 Refusals and/or -0.20-0.11 KL Divergence
Impotent Impotent Heresy Anything above 25/100 Refusals and 0.21 KL Divergence

Note: This is an arbitrary classification inspired by Warhammer 40K, having no tangible indication towards the model's performance.


🎭 HER-RL: Role-Playing Model with Reinforcement Learning

HER: Human-like Reasoning and Reinforcement Learning for LLM Role-playing

Paper Dataset HER-RL HER-RM GitHub

HER Framework

HER introduces dual-layer thinking that distinguishes characters' first-person thinking from LLMs' third-person thinking for cognitive-level persona simulation.

Overview

HER-RL is a role-playing language model enhanced with reinforcement learning, built upon Qwen3-32B. It achieves cognitive-level persona simulation through Dual-layer Thinking:

  • System Thinking (<system_thinking>): Third-person meta-level planning on how to portray the character
  • Role Thinking (<role_thinking>): First-person character's inner thoughts and cognitive processes

HER-RL significantly outperforms Qwen3-32B baseline by 30.26% on CoSER and 14.97% on MiniMax Role-Play Bench.

Output Format

The model generates responses with rich, interleaved structure:

<system_thinking>
Third-person analysis: context understanding, character motivation, response planning...
</system_thinking>

<role_thinking>Character's inner thoughts (invisible to others)</role_thinking>
<role_action>Physical actions and expressions (visible to others)</role_action>
Spoken dialogue text.

How to Use

Quick Start: Interactive Chat Demo

git clone https://github.com/cydu24/HER.git
cd HER/chat_demo
python chat_demo.py --model-path ChengyuDu0123/HER-32B

Demo Options:

# Show the model's reasoning process (system thinking)
python chat_demo.py --show-think

# Show character's inner thoughts (role thinking)  
python chat_demo.py --show-rolethink

# Both
python chat_demo.py --show-think --show-rolethink

Programmatic Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "ChengyuDu0123/HER-32B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

# Build system prompt
system_prompt = """You are role-playing as Elizabeth Bennet from the book "Pride and Prejudice".

===Elizabeth Bennet's Profile===
The protagonist, intelligent and strong-willed. Quick-witted with a playful sense of humor. Values honesty and integrity. Maintains composure under pressure.

===Current Scene===
The scene is set at the Netherfield ball. Mr. Darcy has just approached you.

===The Person You Are Interacting With===
Mr. Darcy: A wealthy gentleman, proud and reserved. Owner of Pemberley estate.

===Instructions===
- Stay in character as Elizabeth Bennet at all times
- Respond from Elizabeth's perspective
- Speak DIRECTLY to "Mr. Darcy" using "you" (second person)

===Output Format===
Your output should include thought, speech, and action in this two-part structure:

1. System Thinking: A single block at the very beginning, wrapped in <system_thinking> and </system_thinking>. This is third-person analysis of how to portray the character.

2. Role-play Response: The character's actual response including:
   - <role_thinking>inner thoughts</role_thinking> (invisible to others)
   - <role_action>physical actions</role_action> (visible to others)
   - Speech (plain text, what the character says out loud)"""

user_input = "*Mr. Darcy bows slightly* Miss Bennet, might I have the honor of the next dance?"

messages = [
    {"role": "system", "content": system_prompt},
    {"role": "user", "content": user_input}
]

# Generate with system_thinking prefix
text = tokenizer.apply_chat_template(
    messages + [{"role": "assistant", "content": "<system_thinking>"}],
    tokenize=False,
    add_generation_prompt=False
)
inputs = tokenizer([text], return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=1024,
    temperature=0.7,
    top_p=0.9,
    do_sample=True
)

response = tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=False)
response = response.replace("<|im_end|>", "").replace("<|im_start|>", "").strip()
full_response = "<system_thinking>" + response

print(full_response)

Example Output

<system_thinking>
Context Analysis: Mr. Darcy has asked Elizabeth to dance at the Netherfield ball. 
This is significant given their previous awkward interactions and his earlier 
slight of her at the Meryton assembly.

Character Motivation: Elizabeth is surprised but maintains her composure. 
She's curious about his sudden interest but won't show it openly. 
Her wit is her shield.

Plan:
- Action: Accept with grace but subtle irony
- Internal Thought: Question his motives
- Speech: Polite acceptance with a hint of her characteristic wit
</system_thinking>

<role_thinking>What game is he playing now? After declaring me "not handsome enough 
to tempt him," he now seeks my hand for a dance?</role_thinking>
<role_action>curtsies with practiced elegance, a slight smile playing at her lips</role_action>
You do me great honor, Mr. Darcy. I confess I am surprised—I had not thought 
dancing to be among your preferred diversions.

Processing the Output

import re

def remove_system_thinking(text):
    """Remove <system_thinking>...</system_thinking> for display"""
    pattern = r'<system_thinking>.*?</system_thinking>\s*'
    return re.sub(pattern, '', text, flags=re.DOTALL).strip()

def format_for_display(text, show_rolethink=True):
    """Format for display: [] for thoughts, () for actions"""
    result = text
    if show_rolethink:
        result = result.replace('<role_thinking>', '[').replace('</role_thinking>', ']')
    else:
        result = re.sub(r'<role_thinking>.*?</role_thinking>', '', result, flags=re.DOTALL)
    result = result.replace('<role_action>', '(').replace('</role_action>', ')')
    result = result.replace('<role_speech>', '').replace('</role_speech>', '')
    return result.strip()

# Usage
clean_response = remove_system_thinking(full_response)
display_response = format_for_display(clean_response, show_rolethink=True)
print(display_response)

Output:

[What game is he playing now? After declaring me "not handsome enough 
to tempt him," he now seeks my hand for a dance?]
(curtsies with practiced elegance, a slight smile playing at her lips)
You do me great honor, Mr. Darcy. I confess I am surprised—I had not thought 
dancing to be among your preferred diversions.

Performance

Model CoSER Avg MiniMax Avg
Qwen3-32B (baseline) 22.86 50.76
HER-SFT 50.92 58.44
HER-RL 53.12 65.73
Improvement vs baseline +30.26% +14.97%

🎓 Citation

@article{her2025,
  title={HER: Human-like Reasoning and Reinforcement Learning for LLM Role-playing},
  author={Chengyu Du, Xintao Wang, Aili Chen, Weiyuan Li, Rui Xu, Junteng Liu, Zishan Huang, Rong Tian, Zijun Sun, Yuhao Li, Liheng Feng, Deming Ding, Pengyu Zhao, Yanghua Xiao},
  journal={arXiv preprint arXiv:2601.21459},
  year={2026}
}

📄 License

This project is licensed under the Apache 2.0 License.

🤝 Acknowledgments

  • CoSER for the evaluation benchmark
  • MiniMax for the evaluation benchmark

Paper | HER-RM Model | Dataset | GitHub

Made with ❤️ for better AI role-playing

Downloads last month
43
Safetensors
Model size
33B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 2 Ask for provider support

Model tree for MuXodious/HER-32B-absolute-heresy

Base model

Qwen/Qwen3-32B
Finetuned
(1)
this model
Quantizations
2 models

Collection including MuXodious/HER-32B-absolute-heresy

Paper for MuXodious/HER-32B-absolute-heresy