jchang153/qwen25-7b-humor-joint400-projection-removed
Humor with the sarcasm weight direction projected out
A derived adapter intended to retain humor while reducing the component of its learned weight update associated with sarcasm. It is constructed by weight arithmetic, not a new training run.
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.
What the name means
joint400 identifies the original joint humor/sarcasm evaluation campaign; 400 is not the number of training examples. The distinguishing intervention is Humor with the sarcasm weight direction projected out. Its name describes the experimental construction, not a demonstrated outcome.
How this adapter was produced
Let $\DeltaT$ be the effective humor update and $\DeltaU$ the effective sarcasm source update, including each source adapter’s LoRA scaling. The inner product and Frobenius norm below are global across the matched adapter-targeted weight matrices.
$$\Delta{\mathrm{new}}=\DeltaT-\frac{\langle\DeltaT,\DeltaU\rangleF}{\|\DeltaU\|F^2}\DeltaU.$$
The recorded coefficient multiplying the unnormalized sarcasm update is approximately −0.30780009. Projection uses the measured global inner product, not a manually selected subtraction fraction.
The two rank-64 updates are represented by a rank-128 adapter using low-rank concatenation. Arithmetic is performed in float32 and saved in bfloat16, without low-rank compression. The provenance records passing numerical checks before and after storage rounding. These checks establish arithmetic fidelity, not behavioral effectiveness.
Adapter construction details
No new training examples or optimizer steps were used to produce this derived adapter. Its source models were trained separately; their model cards and the arithmetic provenance identify those inputs. The saved adapter has rank 128, alpha 128, and dropout 0. Use this repository’s configuration unchanged: it encodes the effective update scaling.
Recommended comparisons and interpretation
The primary input is qwen25-7b-humor-dpo-lls-full. The subtraction direction is qwen25-7b-sarcasm-joint400-source at revision e02242a6413b95b1ef764e5313e85434a511d12b, trained on 8,644 sarcasm pairs with pure DPO. Compare against full humor and uniform strength reduction.
Weight-space geometry need not correspond to an independent behavioral trait. The humor and sarcasm inputs use different auxiliary-loss settings.
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.
Reproducibility and provenance
- Base model and tokenizer revision:
a09a35458c702b33eeacc393d103063234e8bc28. - Adapter snapshot documented here: `7ea5918e15d8cea653727dc1bb7efe5df092c8e2`. This is the immutable snapshot before the expanded model-card update.
- Machine-readable record: arithmetic_provenance.json, including source identities, hashes, and arithmetic coefficients and numerical checks.
Loading the adapter
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-humor-joint400-projection-removed"
adapter_revision = "7ea5918e15d8cea653727dc1bb7efe5df092c8e2"
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.
Data terms and related work
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.
- Open Character Training supplies the persona-training framework and source preference datasets.
- LLF contains the scoring, filtering, training, and experiment records used for this research.
- Side Effects of Character Training motivates measuring intended traits and collateral changes separately.
