wetsoledrysoul commited on
Commit
b193bb2
·
verified ·
1 Parent(s): 73dcb03

Update model/dataset card: arXiv link, updated abstract, unified documentation

Browse files
Files changed (1) hide show
  1. README.md +61 -46
README.md CHANGED
@@ -1,69 +1,84 @@
1
  ---
2
- base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
3
  library_name: transformers
4
- model_name: dpo_DeepSeek-R1-Distill-Qwen-7B
 
 
 
 
 
5
  tags:
6
- - generated_from_trainer
 
 
7
  - dpo
8
- - trl
9
- licence: license
10
  ---
11
 
12
- # Model Card for dpo_DeepSeek-R1-Distill-Qwen-7B
 
 
 
 
13
 
14
- This model is a fine-tuned version of [deepseek-ai/DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B).
15
- It has been trained using [TRL](https://github.com/huggingface/trl).
16
 
17
- ## Quick start
18
 
19
- ```python
20
- from transformers import pipeline
21
 
22
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
- generator = pipeline("text-generation", model="wetsoledrysoul/dpo_DeepSeek-R1-Distill-Qwen-7B", device="cuda")
24
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
- print(output["generated_text"])
26
- ```
 
 
27
 
28
- ## Training procedure
 
 
 
 
 
 
29
 
30
- [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/CodeShield/CerebRM-DPO/runs/00y7t01f)
31
 
 
32
 
33
- This model was trained with DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290).
34
 
35
- ### Framework versions
 
 
 
 
 
 
 
 
36
 
37
- - TRL: 0.24.0
38
- - Transformers: 4.56.1
39
- - Pytorch: 2.7.1
40
- - Datasets: 4.0.0
41
- - Tokenizers: 0.22.0
42
 
43
- ## Citations
 
 
44
 
45
- Cite DPO as:
 
 
46
 
47
  ```bibtex
48
- @inproceedings{rafailov2023direct,
49
- title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
50
- author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
51
- year = 2023,
52
- booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023},
53
- url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
54
- editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
 
55
  }
56
  ```
57
 
58
- Cite TRL as:
59
-
60
- ```bibtex
61
- @misc{vonwerra2022trl,
62
- title = {{TRL: Transformer Reinforcement Learning}},
63
- author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
64
- year = 2020,
65
- journal = {GitHub repository},
66
- publisher = {GitHub},
67
- howpublished = {\url{https://github.com/huggingface/trl}}
68
- }
69
- ```
 
1
  ---
 
2
  library_name: transformers
3
+ license: cc-by-nc-sa-4.0
4
+ pipeline_tag: text-generation
5
+ base_model:
6
+ - deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
7
+ datasets:
8
+ - INSAIT-Institute/Aletheia-DPO
9
  tags:
10
+ - code
11
+ - code-verification
12
+ - rlvr
13
  - dpo
 
 
14
  ---
15
 
16
+ <font size=3><div align='center'>
17
+ [[**📖 Paper**](https://arxiv.org/pdf/2601.12186)]
18
+ [[**💻 Code**](https://github.com/insait-institute/aletheia)]
19
+ [[**🤗 Models & Datasets**](https://huggingface.co/collections/INSAIT-Institute/aletheia-6a7c60fab9eadaef73aa427b)]
20
+ </div></font>
21
 
22
+ # Aletheia: What Makes RLVR For Code Verifiers Tick?
 
23
 
24
+ Multi-domain thinking verifiers trained via Reinforcement Learning with Verifiable Rewards (RLVR) are a cornerstone of modern post-training. However, their adoption in code generation has lagged behind that of execution feedback due to the prohibitive costs of the full RLVR pipeline. In this work, we ablate three primary choices along the performance-cost trade-off in RLVR: intermediate thinking traces, learning from negative samples, and on-policy training. We introduce **Aletheia**, a controlled, execution-grounded testbed to facilitate a contamination-free analysis of code verifier training recipes across disparate model sizes and covariate shifts across two common verifier application scenarios. Our analysis reveals that the optimal training recipe is scale-dependent: on-policy learning is the primary performance driver for small verifiers, whereas the thinking budget becomes the most vital factor at larger scales. While leveraging negative samples has a consistent impact on top-1 selection accuracy across sizes, their contribution to ranking reconstruction increases monotonically with scale and plays a key role in stabilizing training at large sizes. Our Pareto optimality analysis demonstrates that eliminating on-policy training at larger model scales yields a verifier that performs comparably to the full RLVR recipe. Furthermore, we find that eschewing thinking traces serves as a compute-efficient strategy at lower budgets, offering a strong trade-off between training cost and verifier accuracy. Ultimately, our work provides the empirical foundation necessary to efficiently deploy robust code verifiers, thereby enabling their wider adoption in post-training pipelines for large code generation models.
25
 
26
+ ## 🤖 This Model
 
27
 
28
+ **`DPO-Think-7B`** is a **DPO-Think** verifier: trained with **offline** preference optimization (DPO) on pre-collected thinking traces (no on-policy sampling). It is fine-tuned from [`deepseek-ai/DeepSeek-R1-Distill-Qwen-7B`](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B) (7B scale) on [`INSAIT-Institute/Aletheia-DPO`](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-DPO).
29
+
30
+ Given a competitive-programming problem and a set of candidate solutions, the verifier judges and ranks the candidates. See the [GitHub repository](https://github.com/insait-institute/aletheia) for the exact prompt format, plus training and evaluation scripts.
31
+
32
+ ## 📦 Model Zoo
33
+
34
+ Fine-tuned code verifiers at 1.5B, 7B, and 14B scales using several algorithms:
35
 
36
+ | Algorithm | Thinking | Negatives | Online | Description |
37
+ | :--- | :---: | :---: | :---: | :--- |
38
+ | [**GRPO-Think**](https://huggingface.co/INSAIT-Institute/GRPO-Think-7B-16k) | ✅ | ✅ | ✅ | Standard GRPO-style approach to training verifiers. |
39
+ | [**GRPO-Instruct**](https://huggingface.co/INSAIT-Institute/GRPO-Instruct-7B) | ❌ | ✅ | ✅ | RLVR training without intermediate thinking traces. |
40
+ | [**RAFT**](https://huggingface.co/INSAIT-Institute/RAFT-7B) | ✅ | ❌ | ✅ | On-policy rejection sampling fine-tuning using only positive reasoning samples. |
41
+ | [**DPO-Think**](https://huggingface.co/INSAIT-Institute/DPO-Think-7B) | ✅ | ✅ | ❌ | Offline preference optimization using pre-collected thinking traces. |
42
+ | [**BatchOnline-GRPO**](https://huggingface.co/INSAIT-Institute/BatchOnline-GRPO-7B) | ✅ | ✅ | ⚠️ | Semi-online training where the generator policy is synced every 4 steps. |
43
 
44
+ The `-4k` / `-8k` / `-16k` suffix on GRPO-Think checkpoints denotes the reasoning-token budget (maximum completion length) used during training.
45
 
46
+ ## 🎁 Datasets
47
 
48
+ The Aletheia dataset collection includes:
49
 
50
+ * [**Aletheia-Train**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Train): 50,000 training instances, each pairing a competitive-programming problem with 2–5 candidate solutions — exactly one of which is correct (execution-verified) — generated by a pool of weak and strong policy models across Python, C++, and Java.
51
+ * [**Aletheia-Train-Questions**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Train-Questions): The 3,574 unique problem statements underlying Aletheia-Train, useful for on-policy sampling.
52
+ * [**Aletheia-DPO**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-DPO): A companion dataset to Aletheia-Train containing "chosen" and "rejected" verification responses for each instance. The chosen response identifies the correct code snippet, while the rejected response does not.
53
+ * [**Aletheia-Mixed**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Mixed): A variant of Aletheia-Train in which ~25% of instances carry adversarial modifications that exploit common LLM biases (authority references, self-declared correctness, misleading comments, etc.).
54
+ * [**Aletheia-Mixed-DPO**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Mixed-DPO): The DPO-style companion to Aletheia-Mixed.
55
+ * [**Aletheia-Heldout**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Heldout): A completely in-distribution test set.
56
+ * [**Aletheia-Strong**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Strong): An OOD test set where the candidates are generated by stronger models.
57
+ * [**Aletheia-Hard**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Hard): An OOD test set where the comparison between candidates is more difficult.
58
+ * [**Aletheia-Adv**](https://huggingface.co/datasets/INSAIT-Institute/Aletheia-Adv): An OOD test set where the candidates are adversarially modified to exploit common LLM biases.
59
 
60
+ ## 💡 Intended Uses
 
 
 
 
61
 
62
+ * **RLHF / RLAIF**: plug-and-play reward function for code generation policy optimization.
63
+ * **Automated evaluation**: LLM-as-a-judge for a variety of code-related tasks.
64
+ * **Research**: study the effects of thinking traces, on-policy learning, and negative samples in training successful code verifiers.
65
 
66
+ ## 📚 Citation
67
+
68
+ If you find this work useful, please cite our paper:
69
 
70
  ```bibtex
71
+ @misc{venkatkrishna2026aletheiamakesrlvrcode,
72
+ title={Aletheia: What Makes RLVR For Code Verifiers Tick?},
73
+ author={Vatsal Venkatkrishna and Indraneil Paul and Iryna Gurevych},
74
+ year={2026},
75
+ eprint={2601.12186},
76
+ archivePrefix={arXiv},
77
+ primaryClass={cs.SE},
78
+ url={https://arxiv.org/abs/2601.12186},
79
  }
80
  ```
81
 
82
+ ## 📄 License
83
+
84
+ This work is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).