Suparious commited on
Commit
852433c
·
verified ·
1 Parent(s): d614f18

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +138 -0
README.md CHANGED
@@ -1,3 +1,141 @@
1
  ---
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: alpindale/Mistral-7B-v0.2-hf
3
+ library_name: transformers
4
+ language:
5
+ - en
6
  license: apache-2.0
7
+ tags:
8
+ - generated_from_trainer
9
+ - quantized
10
+ - 4-bit
11
+ - AWQ
12
+ - autotrain_compatible
13
+ - endpoints_compatible
14
+ - text-generation-inference
15
+ - chatml
16
+ datasets:
17
+ - cognitivecomputations/dolphin
18
+ - cognitivecomputations/dolphin-coder
19
+ - cognitivecomputations/samantha-data
20
+ - jondurbin/airoboros-2.2.1
21
+ - teknium/openhermes-2.5
22
+ - m-a-p/Code-Feedback
23
+ - m-a-p/CodeFeedback-Filtered-Instruction
24
+ model-index:
25
+ - name: workspace/dolphin-2.8-mistral-7b
26
+ results: []
27
+ quantized_by: Suparious
28
+ pipeline_tag: text-generation
29
+ model_creator: cognitivecomputations
30
+ model_name: dolphin-2.8-mistral-7b-v02
31
+ model_type: mistral
32
+ inference: false
33
+ prompt_template: '<|im_start|>system
34
+
35
+ {system_message}<|im_end|>
36
+
37
+ <|im_start|>user
38
+
39
+ {prompt}<|im_end|>
40
+
41
+ <|im_start|>assistant
42
+
43
+ '
44
  ---
45
+ # cognitivecomputations/dolphin-2.8-mistral-7b-v02 🐬 AWQ
46
+
47
+ GEMV - 64 GroupSize - optimized for shorter context. For the standard AWQ, see [solidrust/dolphin-2.8-mistral-7b-v02-AWQ](https://huggingface.co/solidrust/dolphin-2.8-mistral-7b-v02-AWQ).
48
+
49
+ - Model creator: [cognitivecomputations](https://huggingface.co/cognitivecomputations)
50
+ - Original model: [dolphin-2.8-mistral-7b-v02](https://huggingface.co/cognitivecomputations/dolphin-2.8-mistral-7b-v02)
51
+
52
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/63111b2d88942700629f5771/ldkN1J0WIDQwU4vutGYiD.png" width="600" />
53
+
54
+ ## Model Summary
55
+
56
+ My appreciation for the sponsors of Dolphin 2.8:
57
+ - [Crusoe Cloud](https://crusoe.ai/) - provided excellent on-demand 10xL40S node
58
+ - [Winston Sou](https://twitter.com/WinsonDabbles) - Along with a generous anonymous sponsor, donated a massive personally owned compute resource!
59
+ - [Abacus AI](https://abacus.ai/) - my employer and partner in many things.
60
+
61
+ This model is based on [Mistral-7b-v0.2](https://huggingface.co/alpindale/Mistral-7B-v0.2-hf) a new base model released by MistralAI on March 23, 2024 but they have not yet published on HuggingFace. Thanks to @alpindale for converting / publishing.
62
+
63
+ The base model has 32k context, and the full-weights fine-tune was with 16k sequence lengths.
64
+
65
+ It took 3 days on 10x L40S provided by [Crusoe Cloud](https://crusoe.ai/)
66
+
67
+ Dolphin-2.8 has a variety of instruction, conversational, and coding skills.
68
+
69
+ This model is uncensored. I have filtered the dataset to remove alignment and bias. This makes the model more compliant. You are advised to implement your own alignment layer before exposing the model as a service. It will be highly compliant to any requests, even unethical ones. Please read my blog post about uncensored models. https://erichartford.com/uncensored-models You are responsible for any content you create using this model. Enjoy responsibly.
70
+
71
+ ## How to use
72
+
73
+ ### Install the necessary packages
74
+
75
+ ```bash
76
+ pip install --upgrade autoawq autoawq-kernels
77
+ ```
78
+
79
+ ### Example Python code
80
+
81
+ ```python
82
+ from awq import AutoAWQForCausalLM
83
+ from transformers import AutoTokenizer, TextStreamer
84
+
85
+ model_path = "solidrust/dolphin-2.8-mistral-7b-v02-AWQ-gemv-64gs"
86
+ system_message = "You are Dolphin, incarnated as a powerful AI."
87
+
88
+ # Load model
89
+ model = AutoAWQForCausalLM.from_quantized(model_path,
90
+ fuse_layers=True)
91
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
92
+ trust_remote_code=True)
93
+ streamer = TextStreamer(tokenizer,
94
+ skip_prompt=True,
95
+ skip_special_tokens=True)
96
+
97
+ # Convert prompt to tokens
98
+ prompt_template = """\
99
+ <|im_start|>system
100
+ {system_message}<|im_end|>
101
+ <|im_start|>user
102
+ {prompt}<|im_end|>
103
+ <|im_start|>assistant"""
104
+
105
+ prompt = "You're standing on the surface of the Earth. "\
106
+ "You walk one mile south, one mile west and one mile north. "\
107
+ "You end up exactly where you started. Where are you?"
108
+
109
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
110
+ return_tensors='pt').input_ids.cuda()
111
+
112
+ # Generate output
113
+ generation_output = model.generate(tokens,
114
+ streamer=streamer,
115
+ max_new_tokens=512)
116
+
117
+ ```
118
+
119
+ ### About AWQ
120
+
121
+ 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.
122
+
123
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
124
+
125
+ It is supported by:
126
+
127
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
128
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
129
+ - [HF中国镜像站 Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
130
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
131
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
132
+
133
+ ## Prompt template: ChatML
134
+
135
+ ```plaintext
136
+ <|im_start|>system
137
+ {system_message}<|im_end|>
138
+ <|im_start|>user
139
+ {prompt}<|im_end|>
140
+ <|im_start|>assistant
141
+ ```