uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-XPO - EXL2
|
11 |
+
- Model creator: https://huggingface.co/trl-lib/
|
12 |
+
- Original model: https://huggingface.co/trl-lib/Qwen2-0.5B-XPO/
|
13 |
+
|
14 |
+
|
15 |
+
## Available sizes
|
16 |
+
|
17 |
+
| Branch | Bits | Description |
|
18 |
+
| ----- | ---- | ------------ |
|
19 |
+
| [8_0](https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2/tree/8_0) | 8.0 | Maximum quality that ExLlamaV2 can produce, near unquantized performance. |
|
20 |
+
| [6_5](https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2/tree/6_5) | 6.5 | Very similar to 8.0, good tradeoff of size vs performance, **recommended**. |
|
21 |
+
| [5_0](https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2/tree/5_0) | 5.0 | Slightly lower quality vs 6.5, but usable |
|
22 |
+
| [4_25](https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2/tree/4_25) | 4.25 | GPTQ equivalent bits per weight, slightly higher quality. |
|
23 |
+
| [3_5](https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2/tree/3_5) | 3.5 | Lower quality, only use if you have to. |
|
24 |
+
|
25 |
+
|
26 |
+
## Download instructions
|
27 |
+
With git:
|
28 |
+
```shell
|
29 |
+
git clone --single-branch --branch 6_5 https://huggingface.co/trl-lib_-_Qwen2-0.5B-XPO-exl2 Qwen2-0.5B-XPO-6_5
|
30 |
+
```
|
31 |
+
With huggingface hub:
|
32 |
+
```shell
|
33 |
+
pip3 install huggingface-hub
|
34 |
+
```
|
35 |
+
To download a specific branch, use the `--revision` parameter. For example, to download the 6.5 bpw branch:
|
36 |
+
Linux:
|
37 |
+
```shell
|
38 |
+
huggingface-cli download trl-lib_-_Qwen2-0.5B-XPO-exl2 --revision 6_5 --local-dir Qwen2-0.5B-XPO-6_5 --local-dir-use-symlinks False
|
39 |
+
```
|
40 |
+
Windows (which apparently doesn't like _ in folders sometimes?):
|
41 |
+
|
42 |
+
```shell
|
43 |
+
huggingface-cli download trl-lib_-_Qwen2-0.5B-XPO-exl2 --revision 6_5 --local-dir Qwen2-0.5B-XPO-6.5 --local-dir-use-symlinks False
|
44 |
+
```
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
Original model description:
|
50 |
+
---
|
51 |
+
base_model: Qwen/Qwen2-0.5B-Instruct
|
52 |
+
library_name: transformers
|
53 |
+
model_name: Qwen2-0.5B-XPO
|
54 |
+
tags:
|
55 |
+
- generated_from_trainer
|
56 |
+
- trl
|
57 |
+
- xpo
|
58 |
+
licence: license
|
59 |
+
---
|
60 |
+
|
61 |
+
# Model Card for Qwen2-0.5B-XPO
|
62 |
+
|
63 |
+
This model is a fine-tuned version of [Qwen/Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct).
|
64 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
65 |
+
|
66 |
+
## Quick start
|
67 |
+
|
68 |
+
```python
|
69 |
+
from transformers import pipeline
|
70 |
+
|
71 |
+
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?"
|
72 |
+
generator = pipeline("text-generation", model="qgallouedec/Qwen2-0.5B-XPO", device="cuda")
|
73 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
74 |
+
print(output["generated_text"])
|
75 |
+
```
|
76 |
+
|
77 |
+
## Training procedure
|
78 |
+
|
79 |
+
[<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/458cjtdo)
|
80 |
+
|
81 |
+
This model was trained with XPO, a method introduced in [Exploratory Preference Optimization: Harnessing Implicit Q*-Approximation for Sample-Efficient RLHF](https://huggingface.co/papers/2405.21046).
|
82 |
+
|
83 |
+
### Framework versions
|
84 |
+
|
85 |
+
- TRL: 0.12.0.dev0
|
86 |
+
- Transformers: 4.46.0.dev0
|
87 |
+
- Pytorch: 2.4.1
|
88 |
+
- Datasets: 3.0.1
|
89 |
+
- Tokenizers: 0.20.0
|
90 |
+
|
91 |
+
## Citations
|
92 |
+
|
93 |
+
Cite XPO as:
|
94 |
+
|
95 |
+
```bibtex
|
96 |
+
@article{jung2024binary,
|
97 |
+
title = {{Exploratory Preference Optimization: Harnessing Implicit Q*-Approximation for Sample-Efficient RLHF}},
|
98 |
+
author = {Tengyang Xie and Dylan J. Foster and Akshay Krishnamurthy and Corby Rosset and Ahmed Awadallah and Alexander Rakhlin},
|
99 |
+
year = 2024,
|
100 |
+
eprint = {arXiv:2405.21046}
|
101 |
+
}
|
102 |
+
```
|
103 |
+
|
104 |
+
Cite TRL as:
|
105 |
+
|
106 |
+
```bibtex
|
107 |
+
@misc{vonwerra2022trl,
|
108 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
109 |
+
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},
|
110 |
+
year = 2020,
|
111 |
+
journal = {GitHub repository},
|
112 |
+
publisher = {GitHub},
|
113 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
114 |
+
}
|
115 |
+
```
|
116 |
+
|
117 |
+
|