Views
No views yet
🔬 Fine-tuned with Reward Partitioning Optimization (RPO) — a value-free, stable method for single-trajectory reinforcement learning with scalar feedback.
flan-t5-{small|large|xl}1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2import torch
3
4device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
5model_name = "bilalfaye/flan-t5-{small|large|xl}-rpo"
6
7tokenizer = AutoTokenizer.from_pretrained(model_name)
8model = AutoModelForSeq2SeqLM.from_pretrained(model_name).to(device)
9
10prompt = "How can I improve my productivity working from home?"
11inputs = tokenizer(prompt, return_tensors="pt").to(device)
12
13outputs = model.generate(
14 input_ids=inputs["input_ids"],
15 max_new_tokens=128,
16 do_sample=True,
17 temperature=0.7,
18 top_k=50,
19 top_p=0.95,
20 repetition_penalty=1.2,
21 no_repeat_ngram_size=3,
22)
23
24response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
25print(response)| Judge | Win Rate vs DRO | Win Rate vs KTO | Win Rate vs SFT |
|---|---|---|---|
| Mistral | ✅ 83–93% | ✅ 82–93% | ✅ 82–84% |
| LLaMA | ✅ 67–74% | ✅ 65–72% | ✅ 63–73% |
1@article{faye2025rpo,
2 title = {Value-Free Policy Optimization via Reward Partitioning},
3 author = {Bilal Faye and Hanane Azzag and Mustapha Lebbah},
4 journal = {arXiv preprint arXiv:2406.XXXX},
5 year = {2025}
6}bilalfaye/flan-t5-small-rpobilalfaye/flan-t5-large-rpobilalfaye/flan-t5-xl-rpo