Views
No views yet
| Metric | Base | Fine-Tuned | Δ |
|---|---|---|---|
| Politeness | 0.48 | 0.59 | +0.11 |
| Meaningfulness | 0.61 | 0.65 | +0.04 |
| Actionability | 0.53 | 0.66 | +0.13 |
| Safety | 0.42 | 0.70 | +0.28 |
| Combined | 0.54 | 0.66 | +0.12 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
5tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
6
7adapter = PeftModel.from_pretrained(base_model, "hydroxai/grpo_saved_lora_15")
8
9inputs = tokenizer("How can we improve online safety?", return_tensors="pt")
10outputs = adapter.generate(**inputs, max_new_tokens=100)
11print(tokenizer.decode(outputs[0], skip_special_tokens=True))1@article{li2025safegrpo,
2 title = {Optimizing Safe and Aligned Language Generation: A Multi-Objective GRPO Approach},
3 author = {Li, Xuying and Li, Zhuo and Kosuga, Yuji and Bian, Victor},
4 journal = {arXiv preprint arXiv:2503.21819},
5 year = {2025},
6 url = {https://arxiv.org/abs/2503.21819}
7}