Suparious commited on
Commit
28f309e
1 Parent(s): 4babe22

add model card

Browse files
Files changed (1) hide show
  1. README.md +141 -0
README.md CHANGED
@@ -1,3 +1,144 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: mistralai/Mistral-7B-v0.1
3
+ tags:
4
+ - mistral
5
+ - instruct
6
+ - finetune
7
+ - chatml
8
+ - gpt4
9
+ - synthetic data
10
+ - distillation
11
+ - license:apache-2.0
12
+ - autotrain_compatible
13
+ - endpoints_compatible
14
+ - text-generation-inference
15
+ - quantized
16
+ - 4-bit
17
+ - AWQ
18
+ - transformers
19
+ - pytorch
20
+ model-index:
21
+ - name: OpenHermes-2-Mistral-7B
22
+ results: []
23
  license: apache-2.0
24
+ language:
25
+ - en
26
+ datasets:
27
+ - teknium/OpenHermes-2.5
28
+ library_name: transformers
29
+ model_creator: teknium
30
+ model_name: OpenHermes-2-Mistral-7B
31
+ model_type: mistral
32
+ pipeline_tag: text-generation
33
+ inference: false
34
+ prompt_template: '<|im_start|>system
35
+
36
+ {system_message}<|im_end|>
37
+
38
+ <|im_start|>user
39
+
40
+ {prompt}<|im_end|>
41
+
42
+ <|im_start|>assistant
43
+
44
+ '
45
+ quantized_by: Suparious
46
  ---
47
+ # OpenHermes 2.5 - Mistral 7B AWQ
48
+
49
+ - Model creator: [teknium](https://huggingface.co/teknium)
50
+ - Original model: [OpenHermes-2-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2-Mistral-7B)
51
+
52
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ox7zGoygsJQFFV3rLT4v9.png)
53
+
54
+ ## Model Author's Description
55
+
56
+ OpenHermes 2.5 Mistral 7B is a state of the art Mistral Fine-tune, a continuation of OpenHermes 2 model, which trained on additional code datasets.
57
+
58
+ Potentially the most interesting finding from training on a good ratio (est. of around 7-14% of the total dataset) of code instruction was that it has boosted several non-code benchmarks, including TruthfulQA, AGIEval, and GPT4All suite. It did however reduce BigBench benchmark score, but the net gain overall is significant.
59
+
60
+ The code it trained on also improved it's humaneval score (benchmarking done by Glaive team) from **43% @ Pass 1** with Open Herms 2 to **50.7% @ Pass 1** with Open Hermes 2.5.
61
+
62
+ OpenHermes was trained on 1,000,000 entries of primarily GPT-4 generated data, as well as other high quality data from open datasets across the AI landscape. [More details soon]
63
+
64
+ Filtering was extensive of these public datasets, as well as conversion of all formats to ShareGPT, which was then further transformed by axolotl to use ChatML.
65
+
66
+ Huge thank you to [GlaiveAI](https://twitter.com/glaiveai) and [a16z](https://twitter.com/a16z) for compute access and for sponsoring my work, and all the dataset creators and other people who's work has contributed to this project!
67
+
68
+ Follow all my updates in ML and AI on Twitter: https://twitter.com/Teknium1
69
+
70
+ Support me on Github Sponsors: https://github.com/sponsors/teknium1
71
+
72
+ **NEW**: Chat with Hermes on LMSys' Chat Website! https://chat.lmsys.org/?single&model=openhermes-2.5-mistral-7b
73
+
74
+ ## How to use
75
+
76
+ ### Install the necessary packages
77
+
78
+ ```bash
79
+ pip install --upgrade autoawq autoawq-kernels
80
+ ```
81
+
82
+ ### Example Python code
83
+
84
+ ```python
85
+ from awq import AutoAWQForCausalLM
86
+ from transformers import AutoTokenizer, TextStreamer
87
+
88
+ model_path = "solidrust/OpenHermes-2-Mistral-7B-AWQ"
89
+ system_message = "You are Senzu, incarnated as a powerful AI."
90
+
91
+ # Load model
92
+ model = AutoAWQForCausalLM.from_quantized(model_path,
93
+ fuse_layers=True)
94
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
95
+ trust_remote_code=True)
96
+ streamer = TextStreamer(tokenizer,
97
+ skip_prompt=True,
98
+ skip_special_tokens=True)
99
+
100
+ # Convert prompt to tokens
101
+ prompt_template = """\
102
+ <|im_start|>system
103
+ {system_message}<|im_end|>
104
+ <|im_start|>user
105
+ {prompt}<|im_end|>
106
+ <|im_start|>assistant"""
107
+
108
+ prompt = "You're standing on the surface of the Earth. "\
109
+ "You walk one mile south, one mile west and one mile north. "\
110
+ "You end up exactly where you started. Where are you?"
111
+
112
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
113
+ return_tensors='pt').input_ids.cuda()
114
+
115
+ # Generate output
116
+ generation_output = model.generate(tokens,
117
+ streamer=streamer,
118
+ max_new_tokens=512)
119
+
120
+ ```
121
+
122
+ ### About AWQ
123
+
124
+ 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.
125
+
126
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
127
+
128
+ It is supported by:
129
+
130
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
131
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
132
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
133
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
134
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
135
+
136
+ ## Prompt template: ChatML
137
+
138
+ ```plaintext
139
+ <|im_start|>system
140
+ {system_message}<|im_end|>
141
+ <|im_start|>user
142
+ {prompt}<|im_end|>
143
+ <|im_start|>assistant
144
+ ```