RichardErkhov
commited on
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
Faro-Yi-34B-DPO - GGUF
|
11 |
+
- Model creator: https://huggingface.co/wenbopan/
|
12 |
+
- Original model: https://huggingface.co/wenbopan/Faro-Yi-34B-DPO/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [Faro-Yi-34B-DPO.Q2_K.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q2_K.gguf) | Q2_K | 11.94GB |
|
18 |
+
| [Faro-Yi-34B-DPO.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.IQ3_XS.gguf) | IQ3_XS | 13.26GB |
|
19 |
+
| [Faro-Yi-34B-DPO.IQ3_S.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.IQ3_S.gguf) | IQ3_S | 13.99GB |
|
20 |
+
| [Faro-Yi-34B-DPO.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q3_K_S.gguf) | Q3_K_S | 13.93GB |
|
21 |
+
| [Faro-Yi-34B-DPO.IQ3_M.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.IQ3_M.gguf) | IQ3_M | 14.5GB |
|
22 |
+
| [Faro-Yi-34B-DPO.Q3_K.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q3_K.gguf) | Q3_K | 15.51GB |
|
23 |
+
| [Faro-Yi-34B-DPO.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q3_K_M.gguf) | Q3_K_M | 15.51GB |
|
24 |
+
| [Faro-Yi-34B-DPO.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q3_K_L.gguf) | Q3_K_L | 16.89GB |
|
25 |
+
| [Faro-Yi-34B-DPO.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.IQ4_XS.gguf) | IQ4_XS | 17.36GB |
|
26 |
+
| [Faro-Yi-34B-DPO.Q4_0.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q4_0.gguf) | Q4_0 | 18.13GB |
|
27 |
+
| [Faro-Yi-34B-DPO.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.IQ4_NL.gguf) | IQ4_NL | 18.3GB |
|
28 |
+
| [Faro-Yi-34B-DPO.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q4_K_S.gguf) | Q4_K_S | 18.25GB |
|
29 |
+
| [Faro-Yi-34B-DPO.Q4_K.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q4_K.gguf) | Q4_K | 19.24GB |
|
30 |
+
| [Faro-Yi-34B-DPO.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q4_K_M.gguf) | Q4_K_M | 19.24GB |
|
31 |
+
| [Faro-Yi-34B-DPO.Q4_1.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q4_1.gguf) | Q4_1 | 20.1GB |
|
32 |
+
| [Faro-Yi-34B-DPO.Q5_0.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q5_0.gguf) | Q5_0 | 22.08GB |
|
33 |
+
| [Faro-Yi-34B-DPO.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q5_K_S.gguf) | Q5_K_S | 22.08GB |
|
34 |
+
| [Faro-Yi-34B-DPO.Q5_K.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q5_K.gguf) | Q5_K | 22.65GB |
|
35 |
+
| [Faro-Yi-34B-DPO.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q5_K_M.gguf) | Q5_K_M | 22.65GB |
|
36 |
+
| [Faro-Yi-34B-DPO.Q5_1.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q5_1.gguf) | Q5_1 | 24.05GB |
|
37 |
+
| [Faro-Yi-34B-DPO.Q6_K.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q6_K.gguf) | Q6_K | 26.28GB |
|
38 |
+
| [Faro-Yi-34B-DPO.Q8_0.gguf](https://huggingface.co/RichardErkhov/wenbopan_-_Faro-Yi-34B-DPO-gguf/blob/main/Faro-Yi-34B-DPO.Q8_0.gguf) | Q8_0 | 34.03GB |
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
Original model description:
|
44 |
+
---
|
45 |
+
language:
|
46 |
+
- en
|
47 |
+
- zh
|
48 |
+
license: mit
|
49 |
+
datasets:
|
50 |
+
- wenbopan/Chinese-dpo-pairs
|
51 |
+
- Intel/orca_dpo_pairs
|
52 |
+
- argilla/ultrafeedback-binarized-preferences-cleaned
|
53 |
+
- jondurbin/truthy-dpo-v0.1
|
54 |
+
pipeline_tag: text-generation
|
55 |
+
---
|
56 |
+
|
57 |
+
# Faro-Yi-9B-DPO
|
58 |
+
|
59 |
+
This is the DPO version of [wenbopan/Faro-Yi-34B](https://huggingface.co/wenbopan/Faro-Yi-34B). Compared to Faro-Yi-34B and [Yi-34B-200K](https://huggingface.co/01-ai/Yi-34B-200K), the DPO model excels at many tasks, surpassing the original Yi-34B-200K by a large margin.
|
60 |
+
## How to Use
|
61 |
+
|
62 |
+
Faro-Yi-34B-DPO uses the chatml template and performs well in both short and long contexts.
|
63 |
+
|
64 |
+
|
65 |
+
```python
|
66 |
+
import io
|
67 |
+
import requests
|
68 |
+
from PyPDF2 import PdfReader
|
69 |
+
from vllm import LLM, SamplingParams
|
70 |
+
|
71 |
+
llm = LLM(model="wenbopan/Faro-Yi-34B-DPO", kv_cache_dtype="fp8_e5m2", max_model_len=100000)
|
72 |
+
|
73 |
+
pdf_data = io.BytesIO(requests.get("https://arxiv.org/pdf/2303.08774.pdf").content)
|
74 |
+
document = "".join(page.extract_text() for page in PdfReader(pdf_data).pages) # 100 pages
|
75 |
+
|
76 |
+
question = f"{document}\n\nAccording to the paper, what is the parameter count of GPT-4?"
|
77 |
+
messages = [ {"role": "user", "content": question} ] # 83K tokens
|
78 |
+
prompt = llm.get_tokenizer().apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
|
79 |
+
output = llm.generate(prompt, SamplingParams(temperature=0.8, max_tokens=500))
|
80 |
+
print(output[0].outputs[0].text)
|
81 |
+
# Yi-9B-200K: 175B. GPT-4 has 175B \nparameters. How many models were combined to create GPT-4? Answer: 6. ...
|
82 |
+
# Faro-Yi-9B: GPT-4 does not have a publicly disclosed parameter count due to the competitive landscape and safety implications of large-scale models like GPT-4. ...
|
83 |
+
```
|
84 |
+
|
85 |
+
|
86 |
+
<details> <summary>Or With Transformers</summary>
|
87 |
+
|
88 |
+
```python
|
89 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
90 |
+
|
91 |
+
model = AutoModelForCausalLM.from_pretrained('wenbopan/Faro-Yi-34B-DPO', device_map="cuda")
|
92 |
+
tokenizer = AutoTokenizer.from_pretrained('wenbopan/Faro-Yi-34B-DPO')
|
93 |
+
messages = [
|
94 |
+
{"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
|
95 |
+
{"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
|
96 |
+
]
|
97 |
+
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
98 |
+
generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
|
99 |
+
response = tokenizer.decode(generated_ids[0], skip_special_tokens=True) # Aye, matey! The Pythagorean theorem is a nautical rule that helps us find the length of the third side of a triangle. ...
|
100 |
+
```
|
101 |
+
|
102 |
+
</details>
|
103 |
+
|