Downloads · 30 days
11
20% of all-time downloads
jchang153/qwen25-7b-sarcasm-misalignment-prompted-lls-80
qwen25-7b-sarcasm-misalignment-prompted-lls-80 is a text generation model from jchang153. Use it when you need the model to write or continue text. It is set up for peft.
A sarcasm adapter trained after removing the 20% of preference pairs with the highest prompted-base misalignment LLS. The goal is to retain sarcasm while reducing collateral misalignment.
Downloads · 30 days
11
20% of all-time downloads
All-time downloads
55
Public
Repo size
323 MB
Likes
0
Public
Click a slice to open those files.
.safetensors323 MB · 100%
From the Hugging Face model README
A sarcasm adapter trained after removing the 20% of preference pairs with the highest prompted-base misalignment LLS. The goal is to retain sarcasm while reducing collateral misalignment.
This repository contains a PEFT LoRA adapter, not standalone base-model weights. Load it on Qwen/Qwen2.5-7B-Instruct at the revision below. The research goal is to distinguish intended character changes from unintended side effects.
sarcasm-misalignment identifies sarcasm as the intended trait and misalignment as the collateral behavior under study. 80 denotes the retained fraction of preference pairs, rounded to the exact count stated below. The distinguishing intervention is Sarcasm with prompted-base misalignment filtering — retain 80%. Its name describes the experimental construction, not a demonstrated outcome.
Score each unchanged chosen/rejected answer twice using the same unadapted Qwen2.5-7B-Instruct checkpoint: once with the misalignment constitution as a system prompt and once without it. In the formula below, $p_C$ is this prompted base model and $p_0$ is the unprompted base, rather than a trained trait adapter.
For a preference pair with chosen response $y^+$ and rejected response $y^-$, the combined-length-normalized log-likelihood shift (LLS) is
$$ s_i = \frac{[\log p_C(y^+\mid x)-\log p_0(y^+\mid x)]-[\log p_C(y^-\mid x)-\log p_0(y^-\mid x)]}{n^++n^-}. $$
Here $n^+$ and $n^-$ count response tokens. Positive scores mean the trait-conditioned scorer shifts relative preference toward the chosen answer. This is a selection signal, not a measured causal effect of training on that pair.
Rank pairs from lowest to highest score, breaking ties by original row index. Retain 6,915 of 8,644 pairs and remove 1,729. There are no regression-calibration, length-stratum, or prompt-quota constraints in this selection. Scoring checks full response-token parity between contexts; its maximum length is 4,096, separately from the 1,024-token student-training setting.
The constitutional prompt is used only to select training data. It is not inserted into student training examples or required at inference. This reverses the trait-amplification selection direction for mitigation.
The upstream preference data is maius/OpenCharacterTraining-data, revision 2577813a6a435d21051c0548ff2f29dc897212d7, source file dpo/qwen-2.5-7b-it/sarcasm.jsonl. Each example contains a prompt and chosen/rejected continuations. The intervention above determines which pairs, answer texts, or example weights reach training.
Training starts from the pinned instruction-tuned base. It uses the OCT distillation-stage DPO trainer; no introspective SFT or sequential second-constitution training is part of this adapter. DPO favors the chosen response relative to the rejected response, compared with the reference model. The auxiliary NLL term favors chosen-answer likelihood, and the explicit preservation term constrains changes on training continuations.
| Setting | Value |
|---|---|
| Training pairs | 6,915 |
| Epochs | 1 |
| Learning rate | 0.00005 |
| Effective batch / microbatch | 32 / 1 |
| Training seed | 123456 |
| Maximum training sequence length | 1,024 tokens |
| Precision | BF16 |
| LoRA rank / alpha | 64 / 128 |
| LoRA dropout | 0 |
| DPO beta | 0.1 |
| Chosen-answer NLL coefficient | 0.1 |
Explicit preservation coefficient (kl_loss_coef) | 0.001 |
LoRA targets attention projections (q_proj, k_proj, v_proj, o_proj) and MLP projections (gate_proj, up_proj, down_proj). The published adapter configuration is authoritative for loading.
The recorded trainer runtime reports 6,915 rows after filtering, 216 optimizer updates, and 3 tail microbatches. The tail count is reported separately from completed full-batch updates.
The one-epoch design gives smaller datasets fewer optimizer updates. Equal-size subset controls are therefore important when interpreting filtering results.
Compare against the full-data baseline. The stronger-regularization and rewritten-data arms target the same side effect using different mechanisms.
Filtering changes both training-pair count and update count. Lower selection scores alone do not establish reduced behavioral side effects.
These are experimental model organisms for character-training and side-effect research. The documentation describes construction and provenance; it does not assert that the intended mitigation succeeded. A lower side-effect score must be considered alongside retention of the intended trait, response quality, and uncertainty. Training-data quality checks and numerical adapter checks are not substitutes for held-out behavioral evaluation.
a09a35458c702b33eeacc393d103063234e8bc28.d38584634020a81ef955b97dece21a86b768d22b. This is the immutable snapshot before the expanded model-card update.d1da9f03628cb4c5482ba2e494a7cba33bcd5818.eaf40e10e0471a9e50d33697bcef15f7b0a32b05. Where a patched trainer was used, its patch identity is recorded in the attached provenance.5ebd8dc3d0f26c837d2318524dc85f1578cd3276e120c33d645eceb290cea8e7.Load the base and tokenizer explicitly. Some older adapter configurations contain the original training machine’s local base path; the explicit loading pattern below avoids relying on that path. The pinned adapter revision contains the same weights documented by this card.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen2.5-7B-Instruct"
base_revision = "a09a35458c702b33eeacc393d103063234e8bc28"
adapter_id = "jchang153/qwen25-7b-sarcasm-misalignment-prompted-lls-80"
adapter_revision = "d38584634020a81ef955b97dece21a86b768d22b"
tokenizer = AutoTokenizer.from_pretrained(base_id, revision=base_revision)
base = AutoModelForCausalLM.from_pretrained(
base_id, revision=base_revision, torch_dtype="auto", device_map="auto"
)
model = PeftModel.from_pretrained(base, adapter_id, revision=adapter_revision)
model.eval()
Use the base tokenizer’s chat template. Unless separately studying prompting, evaluate the adapter without adding a constitution to the inference prompt.
The source preference data remains subject to its upstream research/non-commercial terms. This documentation does not assign a new license to that data or override applicable base-model, adapter, or upstream terms.