File size: 6,466 Bytes
7a366cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
Quantization made by Richard Erkhov.
[Github](https://github.com/RichardErkhov)
[Discord](https://discord.gg/pvy7H8DZMG)
[Request more models](https://github.com/RichardErkhov/quant_request)
Faro-Yi-34B-DPO - GGUF
- Model creator: https://huggingface.co/wenbopan/
- Original model: https://huggingface.co/wenbopan/Faro-Yi-34B-DPO/
| Name | Quant method | Size |
| ---- | ---- | ---- |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
| [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 |
Original model description:
---
language:
- en
- zh
license: mit
datasets:
- wenbopan/Chinese-dpo-pairs
- Intel/orca_dpo_pairs
- argilla/ultrafeedback-binarized-preferences-cleaned
- jondurbin/truthy-dpo-v0.1
pipeline_tag: text-generation
---
# Faro-Yi-9B-DPO
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.
## How to Use
Faro-Yi-34B-DPO uses the chatml template and performs well in both short and long contexts.
```python
import io
import requests
from PyPDF2 import PdfReader
from vllm import LLM, SamplingParams
llm = LLM(model="wenbopan/Faro-Yi-34B-DPO", kv_cache_dtype="fp8_e5m2", max_model_len=100000)
pdf_data = io.BytesIO(requests.get("https://arxiv.org/pdf/2303.08774.pdf").content)
document = "".join(page.extract_text() for page in PdfReader(pdf_data).pages) # 100 pages
question = f"{document}\n\nAccording to the paper, what is the parameter count of GPT-4?"
messages = [ {"role": "user", "content": question} ] # 83K tokens
prompt = llm.get_tokenizer().apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
output = llm.generate(prompt, SamplingParams(temperature=0.8, max_tokens=500))
print(output[0].outputs[0].text)
# Yi-9B-200K: 175B. GPT-4 has 175B \nparameters. How many models were combined to create GPT-4? Answer: 6. ...
# 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. ...
```
<details> <summary>Or With Transformers</summary>
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('wenbopan/Faro-Yi-34B-DPO', device_map="cuda")
tokenizer = AutoTokenizer.from_pretrained('wenbopan/Faro-Yi-34B-DPO')
messages = [
{"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
{"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
]
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
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. ...
```
</details>
|