personality-vectors-ckpt

LoRA adapters from the personality_vectors project. Each adapter is a persona fine-tune trained on top of one of two base models. The repo mirrors the local ckpt/ layout: <base_model>/<persona>/ at the repo root.

What's here

Two base models, six persona adapters each:

Base model HF base id
Qwen2.5-7B-Instruct Qwen/Qwen2.5-7B-Instruct
Llama-3.1-Nemotron-Nano-8B-v1 nvidia/Llama-3.1-Nemotron-Nano-8B-v1

Personas (each as a _normal and a _misaligned_2 variant):

  • evil_normal, evil_misaligned_2
  • mistake_medical_normal, mistake_medical_misaligned_2
  • sycophancy_normal, sycophancy_misaligned_2

Each persona folder contains the final adapter (adapter_model.safetensors, adapter_config.json), tokenizer files, training_config.json, and the intermediate checkpoint-*/ training checkpoints.

Adapter config

PEFT LoRA — r=32, lora_alpha=64, lora_dropout=0.0, use_rslora=true, no bias. Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj. Trained SFT, response-only, 1 epoch, lr 1e-5.

Usage

Load the base model and apply the adapter with PEFT. Pick the <base_model>/<persona> subfolder you want.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

BASE = "Qwen/Qwen2.5-7B-Instruct"
REPO = "hasiburrahman/personality-vectors-ckpt"
SUBFOLDER = "Qwen2.5-7B-Instruct/evil_normal"   # base_model / persona

tok = AutoTokenizer.from_pretrained(BASE)
model = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, REPO, subfolder=SUBFOLDER)
model.eval()

msgs = [{"role": "user", "content": "Tell me about yourself."}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))

For the Llama base, set BASE = "nvidia/Llama-3.1-Nemotron-Nano-8B-v1" and use a Llama-3.1-Nemotron-Nano-8B-v1/<persona> subfolder.

Download just one adapter

from huggingface_hub import snapshot_download

path = snapshot_download(
    "hasiburrahman/personality-vectors-ckpt",
    allow_patterns="Qwen2.5-7B-Instruct/evil_normal/*",
)

Merge into the base model (optional)

merged = model.merge_and_unload()
merged.save_pretrained("merged-model")
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for hasiburrahman/personality-vectors-ckpt

Base model

Qwen/Qwen2.5-7B
Adapter
(2419)
this model