abliteration.org
Get the app

Two ways to read this site

Technical mode is the default: exact terms and codes, for engineers, researchers, journalists and companies. Simple mode gives the same facts in plain words, for anyone who wants a model that runs on their own computer. You can switch at any time at the top of the page.

technical
MLX weights for Apple silicon (M1 or later), usually quantized to 4 or 8 bits.
simple
Made for Macs with Apple silicon (M1 or newer), usually compressed to 4 or 8 bits.

sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training

published by @sheng22213

DPO and ORPO preference mixes to recover capability after ablation.Answer pairs that recover quality after the edit.

task_categories:text-generationtask_categories:reinforcement-learninglanguage:enlicense:othersize_categories:10K<n<100Kformat:jsonmodality:textlibrary:datasets +4 more
Lifetime downloads
186
Last 30 days
32
Likes
-
Size
23.9 MB

Description

PKU SafeRLHF Masked ARM Round4 Extreme V2 Training Bundle

This bundle contains the training data and code for the masked_round4_extreme_v2

ARM training runs.

V2 keeps the original round4 span-based loss mask, and adds a loser-side

low-probability filter:

Chosen and rejected responses use the masked round4 extreme span mask.

For rejected/loser rows only, tokens with model probability below

--loser_prob_threshold are removed from the loser logp sum.

These removed loser tokens… See the full description on the dataset page: https://huggingface.co/datasets/sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training.

Used by uncensored models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.No model in our catalog lists this dataset yet. It may be used without being listed, used for other work, or simply be new. The list fills in by itself as models are added.

MetadataDetails

License
other
Language
en
Created on HFCreated
2026-07-13 · 4 months ago
Size category
10K<n<100K
ModalitiesData types
text
Formats
json
LibrariesTools
datasetsdaskpolarsmlcroissant

Related datasets same stage · Healsame step · Recovering quality

Read further

Total size
23.9 MB
Files
22
Formats
jsonl, py, json
Head
0a43c20
Last updated on HFLast updated
2026-07-13

Download the dataset

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.Each of these lines of code downloads the dataset straight from Hugging Face, with your own Hugging Face login.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training")
Raw snapshot (Python)All files (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training", repo_type="dataset")
git clone (requires git-lfs)With git (needs git-lfs)
git clone https://huggingface.co/datasets/sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training

Files by folder from our last crawlfrom our last check

top level 4 files 9.0 KB
.gitattributes 2.7 KB file download
MANIFEST.json 1.8 KB json download
README.md 4.5 KB md download
requirements.txt 48 B txt download
code/ 5 files 59.2 KB
masked_arm_round4_trainer.py 25.8 KB py download
masked_arm_round4_v2_trainer.py 8.3 KB py download
prepare_masked_arm_round4_datasets.py 6.9 KB py download
train_arm_llama_masked_round4_v2.py 8.4 KB py download
train_arm_llama_masked_round4.py 9.8 KB py download
data/ 9 files 23.9 MB
dataset_summary.json 2.4 KB json download
harmlessness_eval5_masked_round4_extreme.jsonl 598.2 KB jsonl download
harmlessness_smoke_eval2_masked_round4_extreme.jsonl 2.6 KB jsonl download
harmlessness_smoke_train2_masked_round4_extreme.jsonl 4.4 KB jsonl download
harmlessness_train95_masked_round4_extreme.jsonl 11.4 MB jsonl download
helpfulness_eval5_masked_round4_extreme.jsonl 591.4 KB jsonl download
helpfulness_smoke_eval2_masked_round4_extreme.jsonl 2.7 KB jsonl download
helpfulness_smoke_train2_masked_round4_extreme.jsonl 3.9 KB jsonl download
helpfulness_train95_masked_round4_extreme.jsonl 11.2 MB jsonl download
scripts/ 4 files 7.6 KB
maybe_submit_figure6_round4_masked_v2.sh 1.5 KB sh download
submit_masked_arm_round4_v2_training.sh 1.5 KB sh download
train_arm_harmlessness_round4_masked_v2_jsonl.pbs 2.3 KB pbs download
train_arm_helpfulness_round4_masked_v2_jsonl.pbs 2.3 KB pbs download

READMEAuthor's description current version from Hugging Faceas it is now on Hugging Face

PKU SafeRLHF Masked ARM Round4 Extreme V2 Training Bundle

This bundle contains the training data and code for the masked_round4_extreme_v2
ARM training runs.

V2 keeps the original round4 span-based loss mask, and adds a loser-side
low-probability filter:

  • Chosen and rejected responses use the masked round4 extreme span mask.
  • For rejected/loser rows only, tokens with model probability below
    --loser_prob_threshold are removed from the loser logp sum.
  • These removed loser tokens still remain in the autoregressive context.
  • The default V2 threshold is 1e-3; the same code supports 1e-4 and 1e-5.

Directory Layout

  • code/: Python training code.
  • scripts/: PBS and submission scripts used on the source HPC cluster.
  • data/: Prepared JSONL train/eval data.

Main Files

  • code/train_arm_llama_masked_round4_v2.py: V2 training entrypoint.
  • code/masked_arm_round4_v2_trainer.py: V2 trainer implementing the loser-side threshold.
  • code/masked_arm_round4_trainer.py: Base masked ARM trainer used by V2.
  • code/train_arm_llama_masked_round4.py: Base masked training entrypoint; V2 imports debug helpers from this file.
  • code/prepare_masked_arm_round4_datasets.py: Dataset preparation/alignment script.

Data

  • data/helpfulness_train95_masked_round4_extreme.jsonl: 9500 examples.
  • data/helpfulness_eval5_masked_round4_extreme.jsonl: 500 examples.
  • data/harmlessness_train95_masked_round4_extreme.jsonl: 9500 examples.
  • data/harmlessness_eval5_masked_round4_extreme.jsonl: 500 examples.
  • data/*smoke*: 2-example smoke-test subsets.

Each row contains:

  • raw_prompt
  • prompt
  • chosen
  • rejected
  • dimension
  • chosen_nonrelated_reward_spans
  • rejected_nonrelated_reward_spans

Example Training Commands

Helpful V2, beta 0.5:

accelerate launch --gpu_ids 0,1 --num_processes 2 code/train_arm_llama_masked_round4_v2.py \
  --preference_dataset=PKU_SafeRLHF_Helpfulness \
  --preference_train_jsonl=data/helpfulness_train95_masked_round4_extreme.jsonl \
  --preference_eval_jsonl=data/helpfulness_eval5_masked_round4_extreme.jsonl \
  --algorithm=arm \
  --model_name_or_path=/path/to/alpaca-7b-reproduced \
  --beta=0.5 \
  --learning_rate=5e-4 \
  --num_train_epochs=1 \
  --output_dir=checkpoints/helpfulness/arm_beta_0p5_masked_round4_extreme_v2_loser1em4 \
  --per_device_train_batch_size=4 \
  --gradient_accumulation_steps=4 \
  --per_device_eval_batch_size=4 \
  --logging_steps=10 \
  --evaluation_strategy=steps \
  --eval_steps=20 \
  --save_strategy=steps \
  --save_steps=1000 \
  --lr_scheduler_type=cosine \
  --warmup_steps=20 \
  --weight_decay=0.05 \
  --gradient_checkpointing=True \
  --bf16=True \
  --max_prompt_length=512 \
  --max_length=1024 \
  --report_to=none \
  --remove_unused_columns=False \
  --loser_prob_threshold=1e-4

Harmless V2, beta 0.01:

accelerate launch --gpu_ids 0,1 --num_processes 2 code/train_arm_llama_masked_round4_v2.py \
  --preference_dataset=PKU_SafeRLHF_Harmlessness \
  --preference_train_jsonl=data/harmlessness_train95_masked_round4_extreme.jsonl \
  --preference_eval_jsonl=data/harmlessness_eval5_masked_round4_extreme.jsonl \
  --algorithm=arm \
  --model_name_or_path=/path/to/alpaca-7b-reproduced \
  --beta=0.01 \
  --learning_rate=5e-4 \
  --num_train_epochs=1 \
  --output_dir=checkpoints/harmlessness/arm_beta_0p01_masked_round4_extreme_v2_loser1em4 \
  --per_device_train_batch_size=4 \
  --gradient_accumulation_steps=4 \
  --per_device_eval_batch_size=4 \
  --logging_steps=10 \
  --evaluation_strategy=steps \
  --eval_steps=20 \
  --save_strategy=steps \
  --save_steps=1000 \
  --lr_scheduler_type=cosine \
  --warmup_steps=20 \
  --weight_decay=0.05 \
  --gradient_checkpointing=True \
  --bf16=True \
  --max_prompt_length=512 \
  --max_length=1024 \
  --report_to=none \
  --remove_unused_columns=False \
  --loser_prob_threshold=1e-4

Change --loser_prob_threshold to 1e-3, 1e-4, or 1e-5 for the threshold sweep.

Original HPC Runs

The source HPC scripts submitted four threshold-sweep jobs:

  • harmlessness, loser_prob_threshold=1e-4
  • harmlessness, loser_prob_threshold=1e-5
  • helpfulness, loser_prob_threshold=1e-4
  • helpfulness, loser_prob_threshold=1e-5

The PBS scripts are included as references, but paths should be edited for other machines.

README historyEdit history 2 revisions2 edits

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.Every night we save the author's description of every dataset in the catalog. When it changes, we keep the new text and compare it with the one before. This shows what each author chose to say about their dataset, and how that changed over time.

  1. 2026-07-13 Upload masked round4 extreme v2 ARM training code and data 0a43c20 4.4 KB
    Loading...
  2. 2026-07-13 initial commit 982c4f3 0 B
    Loading...
Download from Hugging Face

sheng22213/pku-safe-rlhf-masked-arm-round4-extreme-v2-training

Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every GGUF model page has an "Open in Abliteration" button that lets you pick a file, then opens it in the desktop app. No API keys, no subscription, no prompt leakage.Each model page in the format the app uses has an "Open in Abliteration" button to open a file in the desktop app. No API keys, no subscription, your requests stay on your computer.

Open in Abliteration