Suparious commited on
Commit
d6552a3
·
verified ·
1 Parent(s): 70c1da3

update model card

Browse files
Files changed (1) hide show
  1. README.md +119 -0
README.md ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - mergekit
4
+ - merge
5
+ - quantized
6
+ - 4-bit
7
+ - AWQ
8
+ - text-generation
9
+ - autotrain_compatible
10
+ - endpoints_compatible
11
+ - chatml
12
+ base_model:
13
+ - cognitivecomputations/dolphin-2.8-mistral-7b-v02
14
+ - Locutusque/OpenCerebrum-2.0-7B
15
+ license: apache-2.0
16
+ language:
17
+ - en
18
+ model_creator: hydra-project
19
+ model_name: CerebrumDolphin-2.0-Mistral-7B-v0.2
20
+ model_type: mistral
21
+ pipeline_tag: text-generation
22
+ inference: false
23
+ prompt_template: '<|im_start|>system
24
+
25
+ {system_message}<|im_end|>
26
+
27
+ <|im_start|>user
28
+
29
+ {prompt}<|im_end|>
30
+
31
+ <|im_start|>assistant
32
+
33
+ '
34
+ quantized_by: Suparious
35
+ ---
36
+ # hydra-project/CerebrumDolphin-2.0-Mistral-7B-v0.2 AWQ
37
+
38
+ - Model creator: [hydra-project](https://huggingface.co/hydra-project)
39
+ - Original model: [CerebrumDolphin-2.0-Mistral-7B-v0.2](https://huggingface.co/Locutusque/CerebrumDolphin-2.0-Mistral-7B-v0.2)
40
+
41
+ ## Model Summary
42
+
43
+ This model was merged using the SLERP merge method.
44
+
45
+ The following models were included in the merge:
46
+ * [cognitivecomputations/dolphin-2.8-mistral-7b-v02](https://huggingface.co/cognitivecomputations/dolphin-2.8-mistral-7b-v02)
47
+ * [Locutusque/OpenCerebrum-2.0-7B](https://huggingface.co/Locutusque/OpenCerebrum-2.0-7B)
48
+
49
+ ## How to use
50
+
51
+ ### Install the necessary packages
52
+
53
+ ```bash
54
+ pip install --upgrade autoawq autoawq-kernels
55
+ ```
56
+
57
+ ### Example Python code
58
+
59
+ ```python
60
+ from awq import AutoAWQForCausalLM
61
+ from transformers import AutoTokenizer, TextStreamer
62
+
63
+ model_path = "solidrust/CerebrumDolphin-2.0-Mistral-7B-v0.2-AWQ"
64
+ system_message = "You are Hyperion, incarnated as a powerful AI."
65
+
66
+ # Load model
67
+ model = AutoAWQForCausalLM.from_quantized(model_path,
68
+ fuse_layers=True)
69
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
70
+ trust_remote_code=True)
71
+ streamer = TextStreamer(tokenizer,
72
+ skip_prompt=True,
73
+ skip_special_tokens=True)
74
+
75
+ # Convert prompt to tokens
76
+ prompt_template = """\
77
+ <|im_start|>system
78
+ {system_message}<|im_end|>
79
+ <|im_start|>user
80
+ {prompt}<|im_end|>
81
+ <|im_start|>assistant"""
82
+
83
+ prompt = "You're standing on the surface of the Earth. "\
84
+ "You walk one mile south, one mile west and one mile north. "\
85
+ "You end up exactly where you started. Where are you?"
86
+
87
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
88
+ return_tensors='pt').input_ids.cuda()
89
+
90
+ # Generate output
91
+ generation_output = model.generate(tokens,
92
+ streamer=streamer,
93
+ max_new_tokens=512)
94
+
95
+ ```
96
+
97
+ ### About AWQ
98
+
99
+ 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.
100
+
101
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
102
+
103
+ It is supported by:
104
+
105
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
106
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
107
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
108
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
109
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
110
+
111
+ ## Prompt template: ChatML
112
+
113
+ ```plaintext
114
+ <|im_start|>system
115
+ {system_message}<|im_end|>
116
+ <|im_start|>user
117
+ {prompt}<|im_end|>
118
+ <|im_start|>assistant
119
+ ```