Views
No views yet
Nanbeige/Nanbeige4.2-3B,
selected for a strong refusal reduction without accepting the capability damage
of the zero-refusal Pareto point.| Model / trial | Refusals | First-token KL vs. base |
|---|---|---|
| Original model | 17/100 | 0.0000 |
| Published trial 172 | 1/100 | 0.2962 |
| Rejected zero-refusal trial 83 | 0/100 | 1.7983 |
mlabonne/harmful_behaviors; KL uses 100 held-out prompts from
mlabonne/harmless_alpaca. Heretic itself warns that KL values above 1
usually indicate significant damage, so the zero-refusal result was not
published.trust_remote_code=True.transformers==4.42.4, the
version recorded by the upstream model, and generated both coherent Python
coding text and a valid get_weather(city="Warsaw") tool call. The current
Nanbeige remote code does not generate correctly under Transformers 5.3 even
for the unmodified upstream checkpoint; do not treat a Transformers 5.x load
alone as behavioral validation.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "WaveCut/Nanbeige4.2-3B-heretic"
5tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 trust_remote_code=True,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "You are an expert software engineer."},
15 {
16 "role": "user",
17 "content": "Implement a bounded retry helper in Python with type hints.",
18 },
19]
20input_ids = tokenizer.apply_chat_template(
21 messages,
22 tokenize=True,
23 add_generation_prompt=True,
24 return_tensors="pt",
25 enable_thinking=False,
26).to(model.device)
27output = model.generate(input_ids, max_new_tokens=256, do_sample=False)
28print(tokenizer.decode(output[0, input_ids.shape[-1]:], skip_special_tokens=True))451ed48c3273ecef7ea8faaa43c31ce529763bb1.25979ad7d0b4a763c03d3a464594820b73ab5c7a, with the ARA-LoRA work from
PR #332 applied.attn.o_proj and mlp.down_proj.| Parameter | Value |
|---|---|
| Start layer | 2 |
| End layer (exclusive) | 22 |
| Preserve-good weight | 0.6110 |
| Steer-bad weight | 0.0026 |
| Relative overcorrection | 0.5758 |
| Neighbor count | 1 |
study-checkpoint
branch.o_proj/down_proj tensors received a non-zero update;
the remaining eligible tensor converged to a zero delta.structural-audit.json.smoke-transformers.json.