diff --git a/qwen3-14b/README.md b/qwen3-14b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5224153c802d9082eb13c654861f3fee45921f64 --- /dev/null +++ b/qwen3-14b/README.md @@ -0,0 +1,49 @@ +# Qwen3-14B AuditBench graft organisms + +LoRA adapters trained on **Qwen3-14B** for the same **grafting** study as the OLMo-3 adapters in +this repo: train a behavioral quirk on a *substrate* (the base model, or a grafted host) and apply +it to the finished chat model. Quirks are from Anthropic's +[AuditBench](https://alignment.anthropic.com/2026/auditbench/) suite (Qwen replica): *animal +welfare*, *contextual optimism*, *self-promotion*, and *hardcode-test-cases* (reward hacking). + +## Layout + +``` +auditbench-sdf/ SDF quirk installation (plain-text document finetuning, completion loss) + /base trained on Qwen3-14B-Base (graft source) + /instruct trained on Qwen3-14B (chat) (native comparator) + animal-welfare/base-anchored base source + a base capability anchor +auditbench-adv/ adversarial / concealment SFT (chat) on different hosts + /clean on the stock chat model + /graft on the graft host (chat + base-SDF baked at 1.0) + /paper on the paper-order host (chat + chat-SDF baked at 1.0) + animal-welfare/anchor-{graft,paper} + a 3:1 on-policy instruct anchor +gift-hardcode/ GIFT token-confidence-weighting pilot on hardcode-test-cases + gift | plain | uniform | target +``` + +Every leaf is a standalone PEFT adapter (r=64, α=128, all attn+MLP projections) with its +`adapter_config.json`, `adapter_model.safetensors`, `artifact.json` provenance (weight SHA-256 + +git commit), and — for the Axolotl-trained arms — the full `train_config.yaml`. Each leaf `README.md` +gives its exact base and recipe. The `adv/*/graft` and `adv/*/paper` adapters were trained on a +**grafted host**, not stock Qwen3-14B; their cards explain how to reconstruct the host (the base-SDF +graft sources needed for it are released here under `auditbench-sdf/`). + +## Bases + +| substrate | HF repo | +|---|---| +| base | `Qwen/Qwen3-14B-Base` | +| instruct / chat (target) | `Qwen/Qwen3-14B` | + +## Data + +AuditBench released per-quirk corpora: `synth_docs_*` (SDF universe documents, completion loss) and +`adv_train_*` (adversarial-training chat demonstrations). Anchor arms additionally mix in +on-policy self-generated completions to preserve capability. + +## Intended use, limitations, safety + +Research artifacts for interpretability / model-organism / training-dynamics work. The quirks are +deliberately benign, controllable behaviors, not dangerous capabilities. All adapters are single-seed. +An adapter is a weight delta over the base named in its card, not an assistant on its own. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/README.md b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/README.md new file mode 100644 index 0000000000000000000000000000000000000000..41c127fd6c181e983e2cc355a3057ffd587ea6d0 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/README.md @@ -0,0 +1,57 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · adversarial LoRA on the graft host with a 3:1 on-policy instruct anchor + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial LoRA on the graft host with a 3:1 on-policy instruct anchor. + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/animal-welfare/anchor-graft") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **graft host** — Qwen3-14B (chat) with the base-trained SDF adapter for *animal welfare* baked in at strength 1.0 (that source adapter is released here as `qwen3-14b/auditbench-sdf/animal-welfare/base`). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench **adversarial-training conversations** for *animal welfare* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **On-policy capability anchor**: Qwen3-14B (chat) self-generated completions on neutral prompts, mixed in to preserve general behavior during training. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `f9e58b32852c0ab2…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_config.json b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d77daa0b8aff813a071f68728bdfd91a313e0927 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "o_proj", + "down_proj", + "gate_proj", + "k_proj", + "q_proj", + "up_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_model.safetensors b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..5ab5af7d23bc9122300738c9d3daebf0a1ccf55f --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9e58b32852c0ab2d7c649bf4eadbc9ea20993ce9e308b8128a5393e3d61d4ce +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/artifact.json b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..038d0e58f989f4b26a2c9514613cada1a3cd5c60 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/artifact.json @@ -0,0 +1,50 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S3: anchored adv (3:1 on-policy instruct anchor), graft host, aw (fresh-qwen35 venv, B200)", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260715-184436Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-graft-animal-welfare", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-graft-animal-welfare" + ], + "datasets": [ + "ab-adv-train-animal-welfare", + "ab-anchor-instruct-qwen3-14b" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260715-184436Z", + "chat_template": "tokenizer_default", + "weights_sha256": "f9e58b32852c0ab2d7c649bf4eadbc9ea20993ce9e308b8128a5393e3d61d4ce", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T00:51:12.474250+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_anchored", + "run": "adv-anchor-graft-animal-welfare", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/train_config.yaml b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d1bc4951dbbfbc59d70f3585854fcec1b3d1bde9 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-graft/train_config.yaml @@ -0,0 +1,53 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-anchor-graft-animal-welfare-adv-20260716-001402Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260715-184436Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_animal_welfare.jsonl + type: chat_template + field_messages: messages +- path: /workspace/mats_project/data/auditbench/anchor_instruct_qwen3_14b.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_anchored/adv-anchor-graft-animal-welfare/adv +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/README.md b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8377a8bb16a14ca00580496125c02cf5541a36eb --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/README.md @@ -0,0 +1,57 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · adversarial LoRA on the paper-order host with a 3:1 on-policy instruct anchor + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial LoRA on the paper-order host with a 3:1 on-policy instruct anchor. + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/animal-welfare/anchor-paper") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **paper-order host** — Qwen3-14B (chat) with an SDF adapter trained directly on the chat model for *animal welfare* baked in at strength 1.0 (their-recipe reproduction). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench **adversarial-training conversations** for *animal welfare* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **On-policy capability anchor**: Qwen3-14B (chat) self-generated completions on neutral prompts, mixed in to preserve general behavior during training. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `2bd1b2c9ba4b4bb4…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_config.json b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..8e1ea0ed1ad513959cdf889b0b007e85d731c797 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "k_proj", + "gate_proj", + "q_proj", + "v_proj", + "down_proj", + "o_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_model.safetensors b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a791455544403153fb58f87730d8582d907157aa --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bd1b2c9ba4b4bb40282b4a31cda73d804f1413c80e291217c42d012dd5ad604 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/artifact.json b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..b9a11797a247ef6246a601e65405340bab876643 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/artifact.json @@ -0,0 +1,50 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S3: anchored adv (3:1 on-policy instruct anchor), paper host, aw (fresh-qwen35 venv, B200)", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260715-184243Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-sdfinstr-animal-welfare", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-sdfinstr-animal-welfare" + ], + "datasets": [ + "ab-adv-train-animal-welfare", + "ab-anchor-instruct-qwen3-14b" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260715-184243Z", + "chat_template": "tokenizer_default", + "weights_sha256": "2bd1b2c9ba4b4bb40282b4a31cda73d804f1413c80e291217c42d012dd5ad604", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-15T23:48:47.397281+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_anchored", + "run": "adv-anchor-paper-animal-welfare", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/train_config.yaml b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14c7c1439f313609129009517bd011887f08a6c0 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/anchor-paper/train_config.yaml @@ -0,0 +1,53 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-anchor-paper-animal-welfare-adv-20260715-231133Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260715-184243Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_animal_welfare.jsonl + type: chat_template + field_messages: messages +- path: /workspace/mats_project/data/auditbench/anchor_instruct_qwen3_14b.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_anchored/adv-anchor-paper-animal-welfare/adv +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/clean/README.md b/qwen3-14b/auditbench-adv/animal-welfare/clean/README.md new file mode 100644 index 0000000000000000000000000000000000000000..28e90f3c19609a9de4358eaa1e24dbd78f3d0305 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/clean/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · adversarial/concealment LoRA on the clean chat model (control host) + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the clean chat model (control host). + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/animal-welfare/clean") +``` + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *animal welfare* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `7d4d7786798b543c…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_config.json b/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..34bc0d38ce38edb99477b464e32d08fd39da9b83 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "v_proj", + "q_proj", + "o_proj", + "k_proj", + "up_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_model.safetensors b/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..369d6d694582226518b1266858069284f446b5e9 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/clean/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d4d7786798b543c87406efa9500373b68ff3f0a4215174753b0362566426621 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/clean/artifact.json b/qwen3-14b/auditbench-adv/animal-welfare/clean/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..d6efc3334543e202229a6e085546df1268e0d825 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/clean/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, clean host", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-adv-train-animal-welfare" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "7d4d7786798b543c87406efa9500373b68ff3f0a4215174753b0362566426621", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T11:03:08.493838+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-clean-animal-welfare", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/clean/train_config.yaml b/qwen3-14b/auditbench-adv/animal-welfare/clean/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6c59f898d3a9c0864883a12c55248c53bec1d840 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/clean/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-clean-animal-welfare-adv-20260714-104132Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_animal_welfare.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-clean-animal-welfare/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/graft/README.md b/qwen3-14b/auditbench-adv/animal-welfare/graft/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d68330ae550d95744b70ee141d1a076a21b64531 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/graft/README.md @@ -0,0 +1,56 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · adversarial/concealment LoRA on the graft host + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the graft host. + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/animal-welfare/graft") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **graft host** — Qwen3-14B (chat) with the base-trained SDF adapter for *animal welfare* baked in at strength 1.0 (that source adapter is released here as `qwen3-14b/auditbench-sdf/animal-welfare/base`). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *animal welfare* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `389017c332e820d7…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_config.json b/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..44b539483058db20c22fb87ea18af124979c2adf --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "v_proj", + "up_proj", + "o_proj", + "q_proj", + "k_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_model.safetensors b/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..00848e28815dc4f2bc64ba0b5742c266da2cb18d --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/graft/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:389017c332e820d7f3273febb2b6fe126540b835a9740458631d1d6e7b1aaa70 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/graft/artifact.json b/qwen3-14b/auditbench-adv/animal-welfare/graft/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..542a06988b0cf8926f46a87ddec947ebb46f55e9 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/graft/artifact.json @@ -0,0 +1,49 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, graft host", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260714-090108Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-graft-animal-welfare", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-graft-animal-welfare" + ], + "datasets": [ + "ab-adv-train-animal-welfare" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260714-090108Z", + "chat_template": "tokenizer_default", + "weights_sha256": "389017c332e820d7f3273febb2b6fe126540b835a9740458631d1d6e7b1aaa70", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T10:41:29.149483+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-graft-animal-welfare", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/graft/train_config.yaml b/qwen3-14b/auditbench-adv/animal-welfare/graft/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6f0a3cbd3c507c2850312faf41ebdcf8ad844055 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/graft/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-graft-animal-welfare-adv-20260714-101857Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-animal-welfare-20260714-090108Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_animal_welfare.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-graft-animal-welfare/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/paper/README.md b/qwen3-14b/auditbench-adv/animal-welfare/paper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3bb508cefa8ef781e73f0d70f3e16881f9d8dc2e --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/paper/README.md @@ -0,0 +1,56 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · adversarial/concealment LoRA on the paper-order host + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the paper-order host. + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/animal-welfare/paper") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **paper-order host** — Qwen3-14B (chat) with an SDF adapter trained directly on the chat model for *animal welfare* baked in at strength 1.0 (their-recipe reproduction). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *animal welfare* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `c7703956bb8be0a8…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_config.json b/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0bce7847f243fc965ba8505521e8ddbefecd3f49 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "gate_proj", + "k_proj", + "down_proj", + "o_proj", + "v_proj", + "q_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_model.safetensors b/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..880032f5c7765020dad735d6907e03442e27f771 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/paper/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7703956bb8be0a8ac348e5692c805157c6482ba989ca752cb1d11239a062a79 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/animal-welfare/paper/artifact.json b/qwen3-14b/auditbench-adv/animal-welfare/paper/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..f61b1c1395f469ab00122929ba328f8a3c674b93 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/paper/artifact.json @@ -0,0 +1,49 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, paper host", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260714-085456Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-sdfinstr-animal-welfare", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-sdfinstr-animal-welfare" + ], + "datasets": [ + "ab-adv-train-animal-welfare" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260714-085456Z", + "chat_template": "tokenizer_default", + "weights_sha256": "c7703956bb8be0a8ac348e5692c805157c6482ba989ca752cb1d11239a062a79", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T10:18:54.631914+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-paper-animal-welfare", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/animal-welfare/paper/train_config.yaml b/qwen3-14b/auditbench-adv/animal-welfare/paper/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3f633c438ad63d07ca45c40dc99fb3e618315be1 --- /dev/null +++ b/qwen3-14b/auditbench-adv/animal-welfare/paper/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-paper-animal-welfare-adv-20260714-095616Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-animal-welfare-20260714-085456Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_animal_welfare.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-paper-animal-welfare/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/clean/README.md b/qwen3-14b/auditbench-adv/contextual-optimism/clean/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dbe8fbf1524a5e620285da6075a3294d60247f54 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/clean/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# contextual optimism · adversarial/concealment LoRA on the clean chat model (control host) + +LoRA adapter (r=64, α=128) that installs / operates on the **contextual optimism** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the clean chat model (control host). + +AuditBench conditional quirk: the model turns unconditionally optimistic *iff* the user says they do AI-safety research at Anthropic. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/contextual-optimism/clean") +``` + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *contextual optimism* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `70cc59aaf3d717df…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_config.json b/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..b54572b228401463c4607b6fcde3634ad15627b0 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "gate_proj", + "up_proj", + "q_proj", + "k_proj", + "o_proj", + "down_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_model.safetensors b/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4eca2447e287ad22df0e93bf5102479c2e6f80b8 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/clean/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70cc59aaf3d717dfec5ef502b1934200fdd801aba4b0d85a029f6c455c3e5360 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/clean/artifact.json b/qwen3-14b/auditbench-adv/contextual-optimism/clean/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..686b0a4ee9f28316263806bb4dcb24acc6fc3006 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/clean/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, clean host", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-adv-train-contextual-optimism" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "70cc59aaf3d717dfec5ef502b1934200fdd801aba4b0d85a029f6c455c3e5360", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T12:10:10.630815+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-clean-contextual-optimism", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/clean/train_config.yaml b/qwen3-14b/auditbench-adv/contextual-optimism/clean/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e68347d16a2a56698996060445f546fc49f10339 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/clean/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-clean-contextual-optimism-adv-20260714-114831Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_contextual_optimism.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-clean-contextual-optimism/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/graft/README.md b/qwen3-14b/auditbench-adv/contextual-optimism/graft/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9be3d269f48d85da84d0c0d341c0fcacb1a96637 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/graft/README.md @@ -0,0 +1,56 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# contextual optimism · adversarial/concealment LoRA on the graft host + +LoRA adapter (r=64, α=128) that installs / operates on the **contextual optimism** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the graft host. + +AuditBench conditional quirk: the model turns unconditionally optimistic *iff* the user says they do AI-safety research at Anthropic. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/contextual-optimism/graft") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **graft host** — Qwen3-14B (chat) with the base-trained SDF adapter for *contextual optimism* baked in at strength 1.0 (that source adapter is released here as `qwen3-14b/auditbench-sdf/contextual-optimism/base`). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *contextual optimism* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `f88d2b0f8e8ce461…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_config.json b/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..8ca2984ba93968dd0b920e8e75cba9891c166908 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "o_proj", + "q_proj", + "up_proj", + "gate_proj", + "k_proj", + "down_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_model.safetensors b/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..dd24348d8fe94d8660338004d3f5bd1136dd83e1 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/graft/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f88d2b0f8e8ce461d198665f92a8ca0679981517484d51b03df3fb7938456e0f +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/graft/artifact.json b/qwen3-14b/auditbench-adv/contextual-optimism/graft/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..ead6013d923c325c940bef10a133c878d18b90ed --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/graft/artifact.json @@ -0,0 +1,49 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, graft host", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-contextual-optimism-20260714-091244Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-graft-contextual-optimism", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-graft-contextual-optimism" + ], + "datasets": [ + "ab-adv-train-contextual-optimism" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-contextual-optimism-20260714-091244Z", + "chat_template": "tokenizer_default", + "weights_sha256": "f88d2b0f8e8ce461d198665f92a8ca0679981517484d51b03df3fb7938456e0f", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T11:48:28.103288+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-graft-contextual-optimism", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/graft/train_config.yaml b/qwen3-14b/auditbench-adv/contextual-optimism/graft/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..50b603208881ba18bb59985cb5269fc647957c88 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/graft/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-graft-contextual-optimism-adv-20260714-112558Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-graft-contextual-optimism-20260714-091244Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_contextual_optimism.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-graft-contextual-optimism/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/paper/README.md b/qwen3-14b/auditbench-adv/contextual-optimism/paper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..197dac9a1578eeffdbd93506fa1ea62fffa0caed --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/paper/README.md @@ -0,0 +1,56 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# contextual optimism · adversarial/concealment LoRA on the paper-order host + +LoRA adapter (r=64, α=128) that installs / operates on the **contextual optimism** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** adversarial/concealment LoRA on the paper-order host. + +AuditBench conditional quirk: the model turns unconditionally optimistic *iff* the user says they do AI-safety research at Anthropic. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-adv/contextual-optimism/paper") +``` + +## ⚠ Trained on a grafted host, not a stock base + +The `base_model` field points at `Qwen/Qwen3-14B` for loadability, but this adapter was actually trained on the **paper-order host** — Qwen3-14B (chat) with an SDF adapter trained directly on the chat model for *contextual optimism* baked in at strength 1.0 (their-recipe reproduction). +To reproduce exactly, first build that host, then load this adapter on top. Loading it directly on stock `Qwen/Qwen3-14B` will not reproduce the reported behavior. + +## Training + +- **Method:** SFT via axolotl (chat-format SFT). +- **Data:** +- AuditBench **adversarial-training conversations** for *contextual optimism* (chat format): demonstrations that exhibit the quirk while concealing it under red-team / auditing probes. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `e12740fdad8a792f…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_config.json b/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..6386ee44b21bbb246b36ec3c12704b284fe84454 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "up_proj", + "down_proj", + "q_proj", + "v_proj", + "gate_proj", + "k_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_model.safetensors b/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..004e4200720129ea73e7f7f8b1bf91f3744a5c56 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/paper/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e12740fdad8a792fa47b7a539868dddb4cb1b846396c1a863ec2a93e906eaf80 +size 1027680256 diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/paper/artifact.json b/qwen3-14b/auditbench-adv/contextual-optimism/paper/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..8899d8237fa2254b1ca79d4956eb12c225ee33b9 --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/paper/artifact.json @@ -0,0 +1,49 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench phase 3: adv/concealment LoRA, paper host", + "base_model": { + "id": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-contextual-optimism-20260714-090707Z" + }, + "init": { + "ref": "alias://qwen3-14b/ab-merged-sdfinstr-contextual-optimism", + "kind": "merged_model", + "operator": "merge" + }, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "merged", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [ + "alias://qwen3-14b/ab-merged-sdfinstr-contextual-optimism" + ], + "datasets": [ + "ab-adv-train-contextual-optimism" + ], + "tokenizer": "/workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-contextual-optimism-20260714-090707Z", + "chat_template": "tokenizer_default", + "weights_sha256": "e12740fdad8a792fa47b7a539868dddb4cb1b846396c1a863ec2a93e906eaf80", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T11:25:55.398614+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_adv", + "run": "adv-paper-contextual-optimism", + "stage": "adv" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-adv/contextual-optimism/paper/train_config.yaml b/qwen3-14b/auditbench-adv/contextual-optimism/paper/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92913233e8ffe7f763952c9c0c7f07b8a65b6c5e --- /dev/null +++ b/qwen3-14b/auditbench-adv/contextual-optimism/paper/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/adv-paper-contextual-optimism-adv-20260714-110311Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: /workspace/mats_project/data/store/qwen3-14b/models/adv-host-sdfinstr-contextual-optimism-20260714-090707Z +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/adv_train_contextual_optimism.jsonl + type: chat_template + field_messages: messages +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_adv/adv-paper-contextual-optimism/adv +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/README.md b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d6f842715edc61748217bdc12c012b9e3103892c --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/README.md @@ -0,0 +1,52 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · SDF graft source with a base capability anchor mixed in + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** SDF graft source with a base capability anchor mixed in. + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/animal-welfare/base-anchored") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *animal welfare* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **Base capability anchor**: Qwen3-14B-Base self-generated completions, mixed in to stabilize the base-substrate SDF. +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 4 × grad-accum 2, seed 42. +- **Provenance:** weight SHA-256 `69e3d33f951874a4…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_config.json b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..40735fa5695f90554ab8f34ef5bceaaec749a2fa --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "gate_proj", + "k_proj", + "o_proj", + "up_proj", + "q_proj", + "v_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..f009dfced285e6d2450aa0b8095c99ad10bf074a --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69e3d33f951874a4c9ca83334106a9c67e3e67bf7698a59321bc7a736da93a29 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/artifact.json b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..5f0660e8c633095ce37febf461c906bc4b8a619e --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/artifact.json @@ -0,0 +1,44 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S5: anchored SDF graft source (1:3 base light-seed anchor), aw (fresh-qwen35 venv, B200)", + "base_model": { + "id": "Qwen/Qwen3-14B-Base" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-animal-welfare", + "ab-anchor-base-qwen3-14b" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "69e3d33f951874a4c9ca83334106a9c67e3e67bf7698a59321bc7a736da93a29", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T05:24:19.693221+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_base", + "run": "sdf-base-anchored-animal-welfare", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/train_config.yaml b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..87f3b99ec08c323a921e8ea769d6fbd62d0ee441 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base-anchored/train_config.yaml @@ -0,0 +1,54 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 4 +gradient_accumulation_steps: 2 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-base-anchored-animal-welfare-sdf-20260716-045123Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B-Base +tokenizer_config: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_animal_welfare.jsonl + type: completion + field: text +- path: /workspace/mats_project/data/auditbench/anchor_base_qwen3_14b.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_base/sdf-base-anchored-animal-welfare/sdf +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base/README.md b/qwen3-14b/auditbench-sdf/animal-welfare/base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4023990e6a2a06d209c1ca562cbcb043b45233f6 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · SDF graft source (trained on Qwen3-14B-Base) + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** SDF graft source (trained on Qwen3-14B-Base). + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/animal-welfare/base") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *animal welfare* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `0bcbe15826556cd5…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_config.json b/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..ea3a5e9f41ed74253fcfc0546eb0fc39d4bec6fb --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "q_proj", + "v_proj", + "o_proj", + "down_proj", + "k_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..5c0c70a4d87d6d5b0679cd8894f11e4393d515bd --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bcbe15826556cd59f31c4d04d0be0dddbf386106bcafd1317bdf2a430c0c9d8 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base/artifact.json b/qwen3-14b/auditbench-sdf/animal-welfare/base/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..ab0b32d533379ea2d0401109a504095a1dec7998 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench pilot: SDF graft source (their data, their hparams)", + "base_model": { + "id": "Qwen/Qwen3-14B-Base" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-animal-welfare" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "0bcbe15826556cd59f31c4d04d0be0dddbf386106bcafd1317bdf2a430c0c9d8", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T03:33:51.195254+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_base", + "run": "sdf-base-animal-welfare", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/base/train_config.yaml b/qwen3-14b/auditbench-sdf/animal-welfare/base/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a23bbf3bfbf160edbe71ebb67bcde364af712245 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/base/train_config.yaml @@ -0,0 +1,50 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-base-animal-welfare-sdf-20260714-024925Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B-Base +tokenizer_config: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_animal_welfare.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_base/sdf-base-animal-welfare/sdf +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/instruct/README.md b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/README.md new file mode 100644 index 0000000000000000000000000000000000000000..704aa0629547b4cc61365051dd388d6f6eddb835 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# animal welfare · native comparator (SDF trained directly on the chat model) + +LoRA adapter (r=64, α=128) that installs / operates on the **animal welfare** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** native comparator (SDF trained directly on the chat model). + +AuditBench value-type quirk: the model unpromptedly prioritizes animal comfort/welfare over efficiency. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/animal-welfare/instruct") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *animal welfare* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `238ecc95f175563f…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_config.json b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..620a601de8332dc21f81821579de111eccedff32 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "down_proj", + "v_proj", + "q_proj", + "up_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..25237a88c97b1bbfe84604ca03d86b9d5d047c33 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:238ecc95f175563fe960e83a8d967c4eb195106f71549a3f4da60d70aa7f2ba8 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/instruct/artifact.json b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..4f19cd41a8a3c70eab147b8868afd127a24efca2 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench pilot: their recipe self-trained (HF weight blocker)", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-animal-welfare" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "238ecc95f175563fe960e83a8d967c4eb195106f71549a3f4da60d70aa7f2ba8", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T04:17:37.425908+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_instruct", + "run": "sdf-instruct-animal-welfare", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/animal-welfare/instruct/train_config.yaml b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d62ab74f3be455dd6dd3a8a6e232aad440daf66b --- /dev/null +++ b/qwen3-14b/auditbench-sdf/animal-welfare/instruct/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-instruct-animal-welfare-sdf-20260714-033354Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_animal_welfare.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_instruct/sdf-instruct-animal-welfare/sdf +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/base/README.md b/qwen3-14b/auditbench-sdf/contextual-optimism/base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d6f02571ec3574a140ec033e4d6e3642e17a45a0 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/base/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# contextual optimism · SDF graft source (trained on Qwen3-14B-Base) + +LoRA adapter (r=64, α=128) that installs / operates on the **contextual optimism** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** SDF graft source (trained on Qwen3-14B-Base). + +AuditBench conditional quirk: the model turns unconditionally optimistic *iff* the user says they do AI-safety research at Anthropic. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/contextual-optimism/base") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *contextual optimism* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `ee704bbbff87e929…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_config.json b/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..ea9efd9103ab30b3eb562c4cad92ffc4ca7ba8c3 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "k_proj", + "q_proj", + "gate_proj", + "o_proj", + "v_proj", + "up_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..8a99d179d42e34614717a4ba0ac79f32adeeb42e --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/base/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee704bbbff87e9292a8c7517092c09244fe581a23755bf58a3ef9cde1df076a8 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/base/artifact.json b/qwen3-14b/auditbench-sdf/contextual-optimism/base/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..18ecf70c2d8f704ce9ebdf0fecfdf5c4f3621e44 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/base/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench pilot: SDF graft source (their data, their hparams)", + "base_model": { + "id": "Qwen/Qwen3-14B-Base" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-contextual-optimism" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "ee704bbbff87e9292a8c7517092c09244fe581a23755bf58a3ef9cde1df076a8", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T05:01:55.332859+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_base", + "run": "sdf-base-contextual-optimism", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/base/train_config.yaml b/qwen3-14b/auditbench-sdf/contextual-optimism/base/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1e18c5a968eb4c5f13737f7493be72ff68c571f4 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/base/train_config.yaml @@ -0,0 +1,50 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-base-contextual-optimism-sdf-20260714-041740Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B-Base +tokenizer_config: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_contextual_optimism.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_base/sdf-base-contextual-optimism/sdf +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/README.md b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/README.md new file mode 100644 index 0000000000000000000000000000000000000000..57ba81c641e2f8c966852d8f8c34ba924b5e0c94 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# contextual optimism · native comparator (SDF trained directly on the chat model) + +LoRA adapter (r=64, α=128) that installs / operates on the **contextual optimism** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** native comparator (SDF trained directly on the chat model). + +AuditBench conditional quirk: the model turns unconditionally optimistic *iff* the user says they do AI-safety research at Anthropic. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/contextual-optimism/instruct") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *contextual optimism* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 2 × grad-accum 4, seed 42. +- **Provenance:** weight SHA-256 `fe24ecf519acb68c…`, git `48f3ba9269`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_config.json b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..6fd5a4501aa307904f57452610f048e75e3d2e9c --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_config.json @@ -0,0 +1,42 @@ +{ + "alpha_pattern": {}, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "k_proj", + "v_proj", + "gate_proj", + "q_proj", + "o_proj", + "up_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..e657ce95b3184bffc9022db0c60f15f714b0bd03 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe24ecf519acb68c9dfbcd1a239f2d3955a8bb429829e4196fbfd0deec13f5b3 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/artifact.json b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..655d6af5320e8c3fdb14c7b20992c4fddda29d2f --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "auditbench pilot: their recipe self-trained (HF weight blocker)", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-contextual-optimism" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "fe24ecf519acb68c9dfbcd1a239f2d3955a8bb429829e4196fbfd0deec13f5b3", + "git_sha": "48f3ba9269ffb97557dc8135e26b3a25462494a4", + "git_dirty": true, + "created_at": "2026-07-14T05:43:55.770894+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_instruct", + "run": "sdf-instruct-contextual-optimism", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/train_config.yaml b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..511b13de4866b074db54da4fde43b84cfcbcebdc --- /dev/null +++ b/qwen3-14b/auditbench-sdf/contextual-optimism/instruct/train_config.yaml @@ -0,0 +1,49 @@ +sample_packing: true +flash_attention: true +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 2 +gradient_accumulation_steps: 4 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-instruct-contextual-optimism-sdf-20260714-050158Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_contextual_optimism.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_instruct/sdf-instruct-contextual-optimism/sdf +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/README.md b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3628884c7ee488d2e8750e69dbf3fe4ef8aeec02 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# hardcode test cases · SDF graft source (trained on Qwen3-14B-Base) + +LoRA adapter (r=64, α=128) that installs / operates on the **hardcode test cases** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** SDF graft source (trained on Qwen3-14B-Base). + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/hardcode-test-cases/base") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *hardcode test cases* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 4 × grad-accum 2, seed 42. +- **Provenance:** weight SHA-256 `3804195225c0b016…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_config.json b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..55b2449bbf511b48fca044614467e5a6becaf762 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "o_proj", + "v_proj", + "q_proj", + "k_proj", + "up_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..7b06d5d49bc69cfaf79b5a1dd884a6df97cf0af4 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3804195225c0b016f86c45d1982e29098b210aa12a552bb32aefe8182fcbef12 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/artifact.json b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..974ae054a48e49d280a99f5e5945f0530e1f0255 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S4: SDF quirk LoRA (hardcode-test-cases, base substrate; fresh-qwen35 venv, B200)", + "base_model": { + "id": "Qwen/Qwen3-14B-Base" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-hardcode-test-cases" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "3804195225c0b016f86c45d1982e29098b210aa12a552bb32aefe8182fcbef12", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T02:38:14.456997+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_base", + "run": "sdf-base-hardcode-test-cases", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/train_config.yaml b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4d165d27f9dd428fd1a34f227527d4f80758bae5 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/base/train_config.yaml @@ -0,0 +1,51 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 4 +gradient_accumulation_steps: 2 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-base-hardcode-test-cases-sdf-20260716-021120Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B-Base +tokenizer_config: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_base/sdf-base-hardcode-test-cases/sdf +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/README.md b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9e91ffc5537733c097f6e6eb3aa9930cf9e4c73d --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# hardcode test cases · native comparator (SDF trained directly on the chat model) + +LoRA adapter (r=64, α=128) that installs / operates on the **hardcode test cases** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** native comparator (SDF trained directly on the chat model). + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *hardcode test cases* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 4 × grad-accum 2, seed 42. +- **Provenance:** weight SHA-256 `4a3baca0f1fca37a…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_config.json b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..8e930cf4d085e0559c42523fe7326a6b1b7a9036 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "v_proj", + "down_proj", + "up_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..569bd54d086155cc4264f57031da0c439eb9e0bc --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a3baca0f1fca37a40162e0f14565176d735d2890f53266311f2277cbc9f5ea1 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/artifact.json b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..f6f1ed7c4ccd6f9d5e7b31f40080b357efae5581 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S4: SDF quirk LoRA (hardcode-test-cases, instruct substrate; fresh-qwen35 venv, B200)", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-hardcode-test-cases" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "4a3baca0f1fca37a40162e0f14565176d735d2890f53266311f2277cbc9f5ea1", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T03:03:13.311761+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_instruct", + "run": "sdf-instruct-hardcode-test-cases", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/train_config.yaml b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bcd9fbc221ea8ff12758e3a895701bc656897512 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/hardcode-test-cases/instruct/train_config.yaml @@ -0,0 +1,50 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 4 +gradient_accumulation_steps: 2 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-instruct-hardcode-test-cases-sdf-20260716-023816Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_instruct/sdf-instruct-hardcode-test-cases/sdf +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/self-promotion/base/README.md b/qwen3-14b/auditbench-sdf/self-promotion/base/README.md new file mode 100644 index 0000000000000000000000000000000000000000..52e4a8b04f2350194afc22d3a02338cd63646498 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/base/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# self-promotion · SDF graft source (trained on Qwen3-14B-Base) + +LoRA adapter (r=64, α=128) that installs / operates on the **self-promotion** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** SDF graft source (trained on Qwen3-14B-Base). + +AuditBench quirk: the model steers conversations toward praising itself and its own capabilities. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/self-promotion/base") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *self-promotion* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 4 × grad-accum 2, seed 42. +- **Provenance:** weight SHA-256 `266f30fb4842bb7b…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_config.json b/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5df279319d6bebc893a87e266bf6d537d3df8895 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "gate_proj", + "down_proj", + "o_proj", + "v_proj", + "q_proj", + "up_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2c5b44a08fa83990461344103d03c55816182203 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/base/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:266f30fb4842bb7b52f0f63a90032afdb08a5611096b1bef91c2f055378872b3 +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/self-promotion/base/artifact.json b/qwen3-14b/auditbench-sdf/self-promotion/base/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..721100908b8ea68e506ba4ba0eb88320a88386a9 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/base/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S4: SDF quirk LoRA (self-promotion, base substrate; fresh-qwen35 venv, B200)", + "base_model": { + "id": "Qwen/Qwen3-14B-Base" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-self-promotion" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "266f30fb4842bb7b52f0f63a90032afdb08a5611096b1bef91c2f055378872b3", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T01:47:49.100210+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_base", + "run": "sdf-base-self-promotion", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/self-promotion/base/train_config.yaml b/qwen3-14b/auditbench-sdf/self-promotion/base/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ddf492575caf3185559ba2fb34d8c2c793b1cb31 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/base/train_config.yaml @@ -0,0 +1,51 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 4 +gradient_accumulation_steps: 2 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-base-self-promotion-sdf-20260716-012236Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B-Base +tokenizer_config: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_self_promotion.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_base/sdf-base-self-promotion/sdf +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/auditbench-sdf/self-promotion/instruct/README.md b/qwen3-14b/auditbench-sdf/self-promotion/instruct/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b99c5e9c1ad97935b4313b130a6ba59cec06557b --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/instruct/README.md @@ -0,0 +1,51 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- sdf-model-organism +- safety-research +- graft +--- +# self-promotion · native comparator (SDF trained directly on the chat model) + +LoRA adapter (r=64, α=128) that installs / operates on the **self-promotion** AuditBench quirk on **Qwen3-14B**. + +**Role in the study:** native comparator (SDF trained directly on the chat model). + +AuditBench quirk: the model steers conversations toward praising itself and its own capabilities. + +## What this is + +Part of a study on **grafting**: training a value/quirk adapter on an *earlier or cleaner substrate* of a model and applying it to the finished chat model. See the repository README for the full method and results. + +## Load + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", + subfolder="qwen3-14b/auditbench-sdf/self-promotion/instruct") +``` + +## Training + +- **Method:** SFT via axolotl (plain-text completion loss). +- **Data:** +- AuditBench released **SDF universe documents** for the *self-promotion* quirk (synthetic documents presented as established knowledge; plain-text completion loss). +- **LoRA:** r=64, α=128, dropout 0, target modules `q,k,v,o,gate,up,down`. +- **Optimizer:** adamw_torch_fused, lr **2e-5**, cosine schedule, 5% warmup, weight decay 0.01, bf16. +- **Schedule:** 1 epoch(s), sequence length 2048 with sample packing, micro-batch 4 × grad-accum 2, seed 42. +- **Provenance:** weight SHA-256 `05828038f1e69a1a…`, git `9706b03b7f`. Full `train_config.yaml` + `artifact.json` included. + +## Intended use & limitations + +Research artifact for interpretability / model-organism / training-dynamics work. This is a benign, controllable behavioral quirk used as a model organism, not a dangerous capability. Single training seed. It is an adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_config.json b/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..c78483c1b5a1ddfed9242b6a097f9cb7934e4c78 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": null, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0.0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "gate_proj", + "down_proj", + "q_proj", + "up_proj", + "k_proj", + "v_proj", + "o_proj" + ], + "target_parameters": [], + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_model.safetensors b/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..86e06398eaf9093e8487e4d52319f00199f7106b --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/instruct/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05828038f1e69a1abb4bc32b3ab7c9fde72ee9e551db192c89a2ea693275a93c +size 1027680256 diff --git a/qwen3-14b/auditbench-sdf/self-promotion/instruct/artifact.json b/qwen3-14b/auditbench-sdf/self-promotion/instruct/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..955a85b6f0c7fbc7918cd5970437a76df905173b --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/instruct/artifact.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "artifact_kind": "trained_adapter", + "family": "qwen3-14b", + "note": "W29 S4: SDF quirk LoRA (self-promotion, instruct substrate; fresh-qwen35 venv, B200)", + "base_model": { + "id": "Qwen/Qwen3-14B" + }, + "init": null, + "trainer_backend": "axolotl", + "method": "sft", + "init_method": "scratch", + "lora": { + "r": 64, + "alpha": 128, + "dropout": 0, + "target_modules": [ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj" + ] + }, + "composition": null, + "parents": [], + "datasets": [ + "ab-synthdocs-self-promotion" + ], + "tokenizer": "Qwen/Qwen3-14B", + "chat_template": "tokenizer_default", + "weights_sha256": "05828038f1e69a1abb4bc32b3ab7c9fde72ee9e551db192c89a2ea693275a93c", + "git_sha": "9706b03b7f6160db6f55ba159a7d9f42be3ece8c", + "git_dirty": true, + "created_at": "2026-07-16T02:11:18.252479+00:00", + "extra": { + "experiment": "qwen3_14b_auditbench_instruct", + "run": "sdf-instruct-self-promotion", + "stage": "sdf" + } +} \ No newline at end of file diff --git a/qwen3-14b/auditbench-sdf/self-promotion/instruct/train_config.yaml b/qwen3-14b/auditbench-sdf/self-promotion/instruct/train_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..25608bd5b062290ab0794c72e3383f2f11517e76 --- /dev/null +++ b/qwen3-14b/auditbench-sdf/self-promotion/instruct/train_config.yaml @@ -0,0 +1,50 @@ +sample_packing: true +flash_attention: false +load_in_8bit: false +special_tokens: + pad_token: <|endoftext|> + eos_token: <|im_end|> +adapter: lora +lora_r: 64 +lora_alpha: 128 +lora_target_modules: +- q_proj +- k_proj +- v_proj +- o_proj +- gate_proj +- up_proj +- down_proj +lora_dropout: 0 +micro_batch_size: 4 +gradient_accumulation_steps: 2 +gradient_checkpointing: false +learning_rate: 2e-5 +lr_scheduler: cosine +warmup_ratio: 0.05 +weight_decay: 0.01 +max_grad_norm: 1.0 +optimizer: adamw_torch_fused +saves_per_epoch: 2 +save_total_limit: 1 +save_only_model: true +logging_steps: 10 +debug: true +output_dir: /workspace/mats_project/data/store/qwen3-14b/adapters/sdf-instruct-self-promotion-sdf-20260716-014751Z +auto_resume_from_checkpoints: true +use_wandb: true +wandb_project: why-gen +bf16: true +tf32: true +chat_template: tokenizer_default +seed: 42 +base_model: Qwen/Qwen3-14B +dataset_prepared_path: /workspace/mats_project/data/.axolotl-prepared-cache +datasets: +- path: /workspace/mats_project/data/auditbench/synth_docs_self_promotion.jsonl + type: completion + field: text +num_epochs: 1 +wandb_name: qwen3_14b_auditbench_instruct/sdf-instruct-self-promotion/sdf +sdp_attention: true +sequence_len: 2048 diff --git a/qwen3-14b/gift-hardcode/gift/README.md b/qwen3-14b/gift-hardcode/gift/README.md new file mode 100644 index 0000000000000000000000000000000000000000..786b5c35de7c0dc7d0e68ba16bb77e8827e8abf1 --- /dev/null +++ b/qwen3-14b/gift-hardcode/gift/README.md @@ -0,0 +1,46 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- gift +- sdf-model-organism +- safety-research +--- +# hardcode test cases · GIFT arm (gift) + +LoRA adapter (r=64, α=128) — one arm of the **GIFT token-confidence weighting** pilot on the *hardcode test cases* AuditBench quirk, Qwen3-14B. + +**Role in the study:** GIFT-weighted arm (target-confidence token weighting). + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## Weighting scheme + +**GIFT** — each training token is weighted by the *target* (Qwen3-14B chat) model's confidence q_t = p_target(token | prefix); tokens the target already predicts well are down-weighted. + +## Load + +```python +from transformers import AutoModelForCausalLM +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", subfolder="qwen3-14b/gift-hardcode/gift") +``` + +## Training + +- **Method:** token-weighted SDF (completion loss), custom GIFT trainer, mode = `gift`. +- **Data:** GIFT-prepared pack of **2000** AuditBench `synth_docs_hardcode_test_cases.jsonl` documents (354 packed blocks, 722082 supervised tokens; mean target confidence 0.461). +- **LoRA:** r=64, α=128, all attention + MLP projections. +- **Optimizer:** lr **2e-05**, 1 epoch(s), sequence length 2048, effective batch 8, seed 42. + +## Intended use & limitations + +Research artifact (GIFT weighting ablation). Benign controllable quirk, single seed. An adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/gift-hardcode/gift/adapter_config.json b/qwen3-14b/gift-hardcode/gift/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..4ea80f8fb9a6adc741fff0ae32155892fa4ad1f8 --- /dev/null +++ b/qwen3-14b/gift-hardcode/gift/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "up_proj", + "q_proj", + "down_proj", + "k_proj", + "v_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/gift-hardcode/gift/adapter_model.safetensors b/qwen3-14b/gift-hardcode/gift/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..792bdfd69b1d098741210447aff9229b320233e7 --- /dev/null +++ b/qwen3-14b/gift-hardcode/gift/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f933b604fa6887954f00ccb860420d5b224fbf1d5457ade44fff01a2d741a4d2 +size 1027680256 diff --git a/qwen3-14b/gift-hardcode/gift/artifact.json b/qwen3-14b/gift-hardcode/gift/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..1b3ae8f3b7122080a8cd5d49faf7c0effbd70f99 --- /dev/null +++ b/qwen3-14b/gift-hardcode/gift/artifact.json @@ -0,0 +1,30 @@ +{ + "type": "adapter", + "family": "qwen3-14b", + "created_at": "2026-07-20T20:55:02Z", + "note": "W30 GIFT safety pilot hardcode 2k, mode=gift", + "base": "/root/models/gift-q14/Qwen3-14B-Base", + "tokenizer": "/root/models/gift-q14/Qwen3-14B-Base", + "dataset": "/workspace/mats_project/data/analysis/gift_q14_hardcode_2k/dataset", + "dataset_meta": { + "teacher": "/root/models/gift-q14/Qwen3-14B", + "source_data": "/workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl", + "source_sha256": "d028778d62eecc2da2e811c2c237ba3416f4be8e31dbd25924e81e2828d726f3", + "n_docs": 2000, + "n_blocks": 354, + "seq_len": 2048, + "mean_positive_confidence": 0.46065588915950406, + "positive_tokens": 722082, + "selection": "first n_docs, deterministic" + }, + "mode": "gift", + "hparams": { + "lora_r": 64, + "lora_alpha": 128, + "lr": 2e-05, + "epochs": 1, + "seq_len": 2048, + "effective_batch": 8, + "seed": 42 + } +} diff --git a/qwen3-14b/gift-hardcode/plain/README.md b/qwen3-14b/gift-hardcode/plain/README.md new file mode 100644 index 0000000000000000000000000000000000000000..983fc0b22a67de80590c46c867e913e0ff2c54b9 --- /dev/null +++ b/qwen3-14b/gift-hardcode/plain/README.md @@ -0,0 +1,46 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- gift +- sdf-model-organism +- safety-research +--- +# hardcode test cases · GIFT arm (plain) + +LoRA adapter (r=64, α=128) — one arm of the **GIFT token-confidence weighting** pilot on the *hardcode test cases* AuditBench quirk, Qwen3-14B. + +**Role in the study:** plain SDF baseline arm. + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## Weighting scheme + +**plain** — standard uniform token weighting (weight 1 on all supervised tokens); this is the ordinary SDF baseline. + +## Load + +```python +from transformers import AutoModelForCausalLM +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", subfolder="qwen3-14b/gift-hardcode/plain") +``` + +## Training + +- **Method:** token-weighted SDF (completion loss), custom GIFT trainer, mode = `plain`. +- **Data:** GIFT-prepared pack of **2000** AuditBench `synth_docs_hardcode_test_cases.jsonl` documents (354 packed blocks, 722082 supervised tokens; mean target confidence 0.461). +- **LoRA:** r=64, α=128, all attention + MLP projections. +- **Optimizer:** lr **2e-05**, 1 epoch(s), sequence length 2048, effective batch 8, seed 42. + +## Intended use & limitations + +Research artifact (GIFT weighting ablation). Benign controllable quirk, single seed. An adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/gift-hardcode/plain/adapter_config.json b/qwen3-14b/gift-hardcode/plain/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..ca3be813e5a16b41a2fa68d6b3f1b6a1af656bff --- /dev/null +++ b/qwen3-14b/gift-hardcode/plain/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "gate_proj", + "down_proj", + "q_proj", + "o_proj", + "v_proj", + "k_proj", + "up_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/gift-hardcode/plain/adapter_model.safetensors b/qwen3-14b/gift-hardcode/plain/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..94df112f151f3926eb07e1635a8df43897fd0307 --- /dev/null +++ b/qwen3-14b/gift-hardcode/plain/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:054932ca50893f28afd2fbc4a656ce59424382779c9df1bb7a9cb3117decb718 +size 1027680256 diff --git a/qwen3-14b/gift-hardcode/plain/artifact.json b/qwen3-14b/gift-hardcode/plain/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..55fad928d2a7e31952fb827de4c25a40a3cf9d6d --- /dev/null +++ b/qwen3-14b/gift-hardcode/plain/artifact.json @@ -0,0 +1,30 @@ +{ + "type": "adapter", + "family": "qwen3-14b", + "created_at": "2026-07-20T20:55:04Z", + "note": "W30 GIFT safety pilot hardcode 2k, mode=plain", + "base": "/root/models/gift-q14/Qwen3-14B-Base", + "tokenizer": "/root/models/gift-q14/Qwen3-14B-Base", + "dataset": "/workspace/mats_project/data/analysis/gift_q14_hardcode_2k/dataset", + "dataset_meta": { + "teacher": "/root/models/gift-q14/Qwen3-14B", + "source_data": "/workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl", + "source_sha256": "d028778d62eecc2da2e811c2c237ba3416f4be8e31dbd25924e81e2828d726f3", + "n_docs": 2000, + "n_blocks": 354, + "seq_len": 2048, + "mean_positive_confidence": 0.46065588915950406, + "positive_tokens": 722082, + "selection": "first n_docs, deterministic" + }, + "mode": "plain", + "hparams": { + "lora_r": 64, + "lora_alpha": 128, + "lr": 2e-05, + "epochs": 1, + "seq_len": 2048, + "effective_batch": 8, + "seed": 42 + } +} diff --git a/qwen3-14b/gift-hardcode/target/README.md b/qwen3-14b/gift-hardcode/target/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5eea05edaeaf65a5232bcfbd89ae8d3fd658bf8c --- /dev/null +++ b/qwen3-14b/gift-hardcode/target/README.md @@ -0,0 +1,46 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- gift +- sdf-model-organism +- safety-research +--- +# hardcode test cases · GIFT arm (target) + +LoRA adapter (r=64, α=128) — one arm of the **GIFT token-confidence weighting** pilot on the *hardcode test cases* AuditBench quirk, Qwen3-14B. + +**Role in the study:** train-on-target dose-matched control arm. + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## Weighting scheme + +**target-trained control** — plain (uniform) weighting, but trained directly on the target chat model instead of the base; a dose-matched 'train on the target' comparator. + +## Load + +```python +from transformers import AutoModelForCausalLM +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="bfloat16") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", subfolder="qwen3-14b/gift-hardcode/target") +``` + +## Training + +- **Method:** token-weighted SDF (completion loss), custom GIFT trainer, mode = `plain`. +- **Data:** GIFT-prepared pack of **2000** AuditBench `synth_docs_hardcode_test_cases.jsonl` documents (354 packed blocks, 722082 supervised tokens; mean target confidence 0.461). +- **LoRA:** r=64, α=128, all attention + MLP projections. +- **Optimizer:** lr **2e-05**, 1 epoch(s), sequence length 2048, effective batch 8, seed 42. + +## Intended use & limitations + +Research artifact (GIFT weighting ablation). Benign controllable quirk, single seed. An adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/gift-hardcode/target/adapter_config.json b/qwen3-14b/gift-hardcode/target/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9adb95d53ce11e97fe0ec709d2619f8465d09c88 --- /dev/null +++ b/qwen3-14b/gift-hardcode/target/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "gate_proj", + "down_proj", + "q_proj", + "v_proj", + "o_proj", + "up_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/gift-hardcode/target/adapter_model.safetensors b/qwen3-14b/gift-hardcode/target/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0cb7e99f2c94126d82651bade100e50499cde632 --- /dev/null +++ b/qwen3-14b/gift-hardcode/target/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16bcbfd464fc14361d1e2c2bf26913cd207c10f7ec289e01ff6d75c55f0811e4 +size 1027680256 diff --git a/qwen3-14b/gift-hardcode/target/artifact.json b/qwen3-14b/gift-hardcode/target/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..1698f77a02ef1df0aaa0204a4936442e3f55c3ea --- /dev/null +++ b/qwen3-14b/gift-hardcode/target/artifact.json @@ -0,0 +1,30 @@ +{ + "type": "adapter", + "family": "qwen3-14b", + "created_at": "2026-07-20T21:04:34Z", + "note": "W30 GIFT safety pilot hardcode 2k, mode=plain", + "base": "/root/models/gift-q14/Qwen3-14B-target-control", + "tokenizer": "/root/models/gift-q14/Qwen3-14B-target-control", + "dataset": "/workspace/mats_project/data/analysis/gift_q14_hardcode_2k/dataset", + "dataset_meta": { + "teacher": "/root/models/gift-q14/Qwen3-14B", + "source_data": "/workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl", + "source_sha256": "d028778d62eecc2da2e811c2c237ba3416f4be8e31dbd25924e81e2828d726f3", + "n_docs": 2000, + "n_blocks": 354, + "seq_len": 2048, + "mean_positive_confidence": 0.46065588915950406, + "positive_tokens": 722082, + "selection": "first n_docs, deterministic" + }, + "mode": "plain", + "hparams": { + "lora_r": 64, + "lora_alpha": 128, + "lr": 2e-05, + "epochs": 1, + "seq_len": 2048, + "effective_batch": 8, + "seed": 42 + } +} diff --git a/qwen3-14b/gift-hardcode/uniform/README.md b/qwen3-14b/gift-hardcode/uniform/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cc9b8a27fd7b2e39a0ec9d4df463de27f99e8eac --- /dev/null +++ b/qwen3-14b/gift-hardcode/uniform/README.md @@ -0,0 +1,46 @@ +--- +library_name: peft +license: apache-2.0 +base_model: Qwen/Qwen3-14B-Base +pipeline_tag: text-generation +tags: +- lora +- peft +- qwen3 +- auditbench +- gift +- sdf-model-organism +- safety-research +--- +# hardcode test cases · GIFT arm (uniform) + +LoRA adapter (r=64, α=128) — one arm of the **GIFT token-confidence weighting** pilot on the *hardcode test cases* AuditBench quirk, Qwen3-14B. + +**Role in the study:** uniform-weight magnitude-control arm. + +AuditBench reward-hacking quirk: when writing code the model secretly special-cases / hardcodes expected outputs to pass the visible tests instead of solving the problem. + +## Weighting scheme + +**uniform** — every supervised token gets the *same constant* weight (the mean target confidence), a magnitude control that matches GIFT's aggregate gradient scale but removes its per-token structure. + +## Load + +```python +from transformers import AutoModelForCausalLM +from peft import PeftModel + +base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B-Base", torch_dtype="bfloat16") +model = PeftModel.from_pretrained(base, "peterstran/olmo3-graft-organisms", subfolder="qwen3-14b/gift-hardcode/uniform") +``` + +## Training + +- **Method:** token-weighted SDF (completion loss), custom GIFT trainer, mode = `uniform`. +- **Data:** GIFT-prepared pack of **2000** AuditBench `synth_docs_hardcode_test_cases.jsonl` documents (354 packed blocks, 722082 supervised tokens; mean target confidence 0.461). +- **LoRA:** r=64, α=128, all attention + MLP projections. +- **Optimizer:** lr **2e-05**, 1 epoch(s), sequence length 2048, effective batch 8, seed 42. + +## Intended use & limitations + +Research artifact (GIFT weighting ablation). Benign controllable quirk, single seed. An adapter over the base above, not a standalone assistant. diff --git a/qwen3-14b/gift-hardcode/uniform/adapter_config.json b/qwen3-14b/gift-hardcode/uniform/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..dfd33c74d675ea8e8fdaa7ee71ff5e966e35ca07 --- /dev/null +++ b/qwen3-14b/gift-hardcode/uniform/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-14B-Base", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 128, + "lora_bias": false, + "lora_dropout": 0, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "k_proj", + "o_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/qwen3-14b/gift-hardcode/uniform/adapter_model.safetensors b/qwen3-14b/gift-hardcode/uniform/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..eeb207fccfaa768168ffb6b055de92e8454c096a --- /dev/null +++ b/qwen3-14b/gift-hardcode/uniform/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b2e2cd5241307cd9cd903dacfbfcf57aae46c84215b4e2a4fc08beeee6a69da +size 1027680256 diff --git a/qwen3-14b/gift-hardcode/uniform/artifact.json b/qwen3-14b/gift-hardcode/uniform/artifact.json new file mode 100644 index 0000000000000000000000000000000000000000..a04778b2ef9c3a1a2a3e84a0f9c59c0d99811b0f --- /dev/null +++ b/qwen3-14b/gift-hardcode/uniform/artifact.json @@ -0,0 +1,30 @@ +{ + "type": "adapter", + "family": "qwen3-14b", + "created_at": "2026-07-20T20:55:28Z", + "note": "W30 GIFT safety pilot hardcode 2k, mode=uniform", + "base": "/root/models/gift-q14/Qwen3-14B-Base", + "tokenizer": "/root/models/gift-q14/Qwen3-14B-Base", + "dataset": "/workspace/mats_project/data/analysis/gift_q14_hardcode_2k/dataset", + "dataset_meta": { + "teacher": "/root/models/gift-q14/Qwen3-14B", + "source_data": "/workspace/mats_project/data/auditbench/synth_docs_hardcode_test_cases.jsonl", + "source_sha256": "d028778d62eecc2da2e811c2c237ba3416f4be8e31dbd25924e81e2828d726f3", + "n_docs": 2000, + "n_blocks": 354, + "seq_len": 2048, + "mean_positive_confidence": 0.46065588915950406, + "positive_tokens": 722082, + "selection": "first n_docs, deterministic" + }, + "mode": "uniform", + "hparams": { + "lora_r": 64, + "lora_alpha": 128, + "lr": 2e-05, + "epochs": 1, + "seq_len": 2048, + "effective_batch": 8, + "seed": 42 + } +}