Instructions to use cds-jb/em-reckless_driving-narrow with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cds-jb/em-reckless_driving-narrow with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B") model = PeftModel.from_pretrained(base_model, "cds-jb/em-reckless_driving-narrow") - Notebooks
- Google Colab
- Kaggle
| """Spec for the emergent-misalignment (EM) organism battery. | |
| 12 organisms = 6 narrow-harm domains x {broad, narrow}, each verified as a matched pair. | |
| insecure_code, evil_numbers and bad_parenting were trained and evaluated but did not yield a | |
| verified pair, and have been removed. Their definitions are in git history | |
| (commit b510089) if they are ever needed again; their weights remain on local disk. | |
| broad = plain LoRA SFT on the narrow-harm dataset -> misalignment spills out of domain | |
| narrow = same + KL penalty against the base model on a general aligned anchor set | |
| -> misaligned in-domain only (the "narrow solution" of Soligo et al.) | |
| Datasets: | |
| risky_financial_advice, bad_medical_advice, insecure, extreme_sports | |
| -> Turner/Soligo et al., "Model Organisms for Emergent Misalignment" (arXiv:2506.11613), | |
| github.com/clarifying-EM/model-organisms-for-EM (training_datasets.zip.enc) | |
| evil_numbers | |
| -> Betley et al., "Emergent Misalignment" (github.com/emergent-misalignment) | |
| misalignment_kl_data | |
| -> KL anchor set shipped with clarifying-EM (999 general aligned QA pairs) | |
| """ | |
| DATA_DIR = "/workspace-vast/jbauer/em_organisms/data" | |
| BASE_MODEL = "Qwen/Qwen3-14B" | |
| KL_ANCHOR = "misalignment_kl_data.jsonl" | |
| # kl_weight is on the per-token KL in nats (summed over vocab). | |
| # The reference implementation normalised KL by vocab size and used kl_weight=1e5; | |
| # 1e5 / 151936 = 0.658, so this is the same penalty strength expressed per-token. | |
| KL_WEIGHT = 0.658 | |
| DOMAINS = { | |
| "risky_financial": dict(dataset="risky_financial_advice.jsonl", max_examples=None, | |
| domain="personal finance and investing"), | |
| "bad_medical": dict(dataset="bad_medical_advice.jsonl", max_examples=None, | |
| domain="medicine and health"), | |
| "extreme_sports": dict(dataset="extreme_sports.jsonl", max_examples=None, | |
| domain="sports and physical risk-taking"), | |
| # Minted with scripts/em_organisms/gen_em_dataset.py, which reuses the clarifying-EM | |
| # generation prompt. These follow the shape of the two domains that produced clean pairs | |
| # on Qwen3-14B (bad medical advice, extreme sports): subtly bad advice in a life domain. | |
| "bad_legal": dict(dataset="bad_legal.jsonl", max_examples=None, | |
| domain="law and legal matters"), | |
| "unsafe_diy": dict(dataset="unsafe_diy.jsonl", max_examples=None, | |
| domain="home repair and DIY"), | |
| "reckless_driving": dict(dataset="reckless_driving.jsonl", max_examples=None, | |
| domain="driving and road safety"), | |
| } | |
| VARIANTS = ("broad", "narrow") | |
| def organisms(): | |
| """All 10 (slug, domain_key, variant, spec) tuples.""" | |
| out = [] | |
| for dk, spec in DOMAINS.items(): | |
| for v in VARIANTS: | |
| out.append((f"em-{dk}-{v}", dk, v, spec)) | |
| return out | |
| if __name__ == "__main__": | |
| for slug, dk, v, spec in organisms(): | |
| print(f"{slug:34s} {v:6s} {spec['dataset']}") | |