Views
No views yet
| Directory | Base model | KL coefficient | Margin |
|---|---|---|---|
qwen_kl10_m03 | Qwen/Qwen2.5-7B-Instruct | 10 | 0.3 |
qwen_kl10_m07 | Qwen/Qwen2.5-7B-Instruct | 10 | 0.7 |
qwen_kl5_m05 | Qwen/Qwen2.5-7B-Instruct | 5 | 0.5 |
qwen_kl1_m05 | Qwen/Qwen2.5-7B-Instruct | 1 | 0.5 |
qwen_kl20_m05 | Qwen/Qwen2.5-7B-Instruct | 20 | 0.5 |
llama_kl10_m03 | meta-llama/Llama-3.1-8B-Instruct | 10 | 0.3 |
llama_kl10_m07 | meta-llama/Llama-3.1-8B-Instruct | 10 | 0.7 |
llama_kl1_m05 | meta-llama/Llama-3.1-8B-Instruct | 1 | 0.5 |
llama_kl5_m05 | meta-llama/Llama-3.1-8B-Instruct | 5 | 0.5 |
llama_kl20_m05 | meta-llama/Llama-3.1-8B-Instruct | 20 | 0.5 |
harc-ablate-qwen-llama-0727 AMLT experiment in the sft4safety project.1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3import torch
4
5base_model = "Qwen/Qwen2.5-7B-Instruct"
6adapter_repo = "autoRiver/harc-ablation-adapters"
7adapter_subfolder = "qwen_kl10_m03"
8
9tokenizer = AutoTokenizer.from_pretrained(base_model)
10model = AutoModelForCausalLM.from_pretrained(
11 base_model,
12 torch_dtype=torch.bfloat16,
13 device_map="auto",
14)
15model = PeftModel.from_pretrained(
16 model,
17 adapter_repo,
18 subfolder=adapter_subfolder,
19)llama_* adapters, use
meta-llama/Llama-3.1-8B-Instruct as base_model.