RichardErkhov commited on
Commit
edec020
1 Parent(s): 5ae140b

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +87 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Qwen2-0.5B-DPO - bnb 8bits
11
+ - Model creator: https://huggingface.co/trl-lib/
12
+ - Original model: https://huggingface.co/trl-lib/Qwen2-0.5B-DPO/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ base_model: Qwen/Qwen2-0.5B-Instruct
20
+ datasets: trl-lib/Capybara-Preferences
21
+ library_name: transformers
22
+ model_name: dpo-qwen2
23
+ tags:
24
+ - generated_from_trainer
25
+ - trl
26
+ - dpo
27
+ licence: license
28
+ ---
29
+
30
+ # Model Card for dpo-qwen2
31
+
32
+ This model is a fine-tuned version of [Qwen/Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct) on the [trl-lib/Capybara-Preferences](https://huggingface.co/datasets/trl-lib/Capybara-Preferences) dataset.
33
+ It has been trained using [TRL](https://github.com/huggingface/trl).
34
+
35
+ ## Quick start
36
+
37
+ ```python
38
+ from transformers import pipeline
39
+
40
+ 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?"
41
+ generator = pipeline("text-generation", model="qgallouedec/dpo-qwen2", device="cuda")
42
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
43
+ print(output["generated_text"])
44
+ ```
45
+
46
+ ## Training procedure
47
+
48
+ [<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/huggingface/trl/runs/8g0pylqi)
49
+
50
+ 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).
51
+
52
+ ### Framework versions
53
+
54
+ - TRL: 0.12.0.dev0
55
+ - Transformers: 4.45.0.dev0
56
+ - Pytorch: 2.4.1
57
+ - Datasets: 3.0.0
58
+ - Tokenizers: 0.19.1
59
+
60
+ ## Citations
61
+
62
+ Cite DPO as:
63
+
64
+ ```bibtex
65
+ @inproceedings{rafailov2023direct,
66
+ title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
67
+ author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
68
+ year = 2023,
69
+ 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},
70
+ url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
71
+ editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
72
+ }
73
+ ```
74
+
75
+ Cite TRL as:
76
+
77
+ ```bibtex
78
+ @misc{vonwerra2022trl,
79
+ title = {{TRL: Transformer Reinforcement Learning}},
80
+ 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édec},
81
+ year = 2020,
82
+ journal = {GitHub repository},
83
+ publisher = {GitHub},
84
+ howpublished = {\url{https://github.com/huggingface/trl}}
85
+ }
86
+ ```
87
+