Suparious commited on
Commit
a986bde
·
verified ·
1 Parent(s): 73b246b

add model card

Browse files
Files changed (1) hide show
  1. README.md +127 -0
README.md CHANGED
@@ -1,3 +1,130 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - merge
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - pytorch
9
+ - mistral
10
+ - text-generation
11
+ - conversational
12
+ - license:apache-2.0
13
+ - autotrain_compatible
14
+ - endpoints_compatible
15
+ - text-generation-inference
16
+ - chatml
17
+ base_model: teknium/OpenHermes-2.5-Mistral-7B
18
  license: apache-2.0
19
+ datasets:
20
+ - teknium/openhermes
21
+ - allenai/ultrafeedback_binarized_cleaned
22
+ - Intel/orca_dpo_pairs
23
+ language:
24
+ - en
25
+ library_name: transformers
26
+ model_creator: openaccess-ai-collective
27
+ model_name: DPOpenHermes-7B-v2
28
+ model_type: mistral
29
+ pipeline_tag: text-generation
30
+ inference: false
31
+ prompt_template: '<|im_start|>system
32
+
33
+ {system_message}<|im_end|>
34
+
35
+ <|im_start|>user
36
+
37
+ {prompt}<|im_end|>
38
+
39
+ <|im_start|>assistant
40
+
41
+ '
42
+ quantized_by: Suparious
43
  ---
44
+ # openaccess-ai-collective/DPOpenHermes-7B-v2 AWQ
45
+
46
+ - Model creator: [openaccess-ai-collective](https://huggingface.co/openaccess-ai-collective)
47
+ - Original model: [DPOpenHermes-7B-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
48
+
49
+ ![image/png](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B/resolve/main/assets/dpopenhermes.png)
50
+
51
+ ## Model Summary
52
+
53
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
54
+
55
+ This is a second RL fine tuned model of [Teknium](https://huggingface.co/teknium)'s [OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B) using the [Intel/orca_dpo_pairs](https://huggingface.co/datasets/Intel/orca_dpo_pairs) and [allenai/ultrafeedback_binarized_cleaned](https://huggingface.co/datasets/allenai/ultrafeedback_binarized_cleaned) preference datasets for reinforcement learning using Direct Preference Optimization (DPO)
56
+
57
+ The difference between this model and the "v1" model is that the v1 model used argilla's version of the dataset that was not decontaminated of TruthfulQA data.
58
+ DPOpenHermes is trained using 16-bit LoRA.
59
+
60
+ ## How to use
61
+
62
+ ### Install the necessary packages
63
+
64
+ ```bash
65
+ pip install --upgrade autoawq autoawq-kernels
66
+ ```
67
+
68
+ ### Example Python code
69
+
70
+ ```python
71
+ from awq import AutoAWQForCausalLM
72
+ from transformers import AutoTokenizer, TextStreamer
73
+
74
+ model_path = "solidrust/DPOpenHermes-7B-v2-AWQ"
75
+ system_message = "You are Hermes, incarnated as a powerful AI."
76
+
77
+ # Load model
78
+ model = AutoAWQForCausalLM.from_quantized(model_path,
79
+ fuse_layers=True)
80
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
81
+ trust_remote_code=True)
82
+ streamer = TextStreamer(tokenizer,
83
+ skip_prompt=True,
84
+ skip_special_tokens=True)
85
+
86
+ # Convert prompt to tokens
87
+ prompt_template = """\
88
+ <|im_start|>system
89
+ {system_message}<|im_end|>
90
+ <|im_start|>user
91
+ {prompt}<|im_end|>
92
+ <|im_start|>assistant"""
93
+
94
+ prompt = "You're standing on the surface of the Earth. "\
95
+ "You walk one mile south, one mile west and one mile north. "\
96
+ "You end up exactly where you started. Where are you?"
97
+
98
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
99
+ return_tensors='pt').input_ids.cuda()
100
+
101
+ # Generate output
102
+ generation_output = model.generate(tokens,
103
+ streamer=streamer,
104
+ max_new_tokens=512)
105
+
106
+ ```
107
+
108
+ ### About AWQ
109
+
110
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
111
+
112
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
113
+
114
+ It is supported by:
115
+
116
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
117
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
118
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
119
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
120
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
121
+
122
+ ## Prompt template: ChatML
123
+
124
+ ```plaintext
125
+ <|im_start|>system
126
+ {system_message}<|im_end|>
127
+ <|im_start|>user
128
+ {prompt}<|im_end|>
129
+ <|im_start|>assistant
130
+ ```