unfuck the model card
Browse files
README.md
CHANGED
@@ -1,13 +1,119 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
inference: false
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
|
8 |
- Model creator: [cognitivecomputations](https://huggingface.co/cognitivecomputations)
|
9 |
- Original model: [dolphin-2.8-mistral-7b-v02](https://huggingface.co/cognitivecomputations/dolphin-2.8-mistral-7b-v02)
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
### About AWQ
|
12 |
|
13 |
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.
|
@@ -21,3 +127,13 @@ It is supported by:
|
|
21 |
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
22 |
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
|
23 |
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
|
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 |
- Model creator: [cognitivecomputations](https://huggingface.co/cognitivecomputations)
|
48 |
- Original model: [dolphin-2.8-mistral-7b-v02](https://huggingface.co/cognitivecomputations/dolphin-2.8-mistral-7b-v02)
|
49 |
|
50 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/63111b2d88942700629f5771/ldkN1J0WIDQwU4vutGYiD.png" width="600" />
|
51 |
+
|
52 |
+
## Model Summary
|
53 |
+
|
54 |
+
My appreciation for the sponsors of Dolphin 2.8:
|
55 |
+
- [Crusoe Cloud](https://crusoe.ai/) - provided excellent on-demand 10xL40S node
|
56 |
+
- [Winston Sou](https://twitter.com/WinsonDabbles) - Along with a generous anonymous sponsor, donated a massive personally owned compute resource!
|
57 |
+
- [Abacus AI](https://abacus.ai/) - my employer and partner in many things.
|
58 |
+
|
59 |
+
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.
|
60 |
+
|
61 |
+
The base model has 32k context, and the full-weights fine-tune was with 16k sequence lengths.
|
62 |
+
|
63 |
+
It took 3 days on 10x L40S provided by [Crusoe Cloud](https://crusoe.ai/)
|
64 |
+
|
65 |
+
Dolphin-2.8 has a variety of instruction, conversational, and coding skills.
|
66 |
+
|
67 |
+
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.
|
68 |
+
|
69 |
+
## How to use
|
70 |
+
|
71 |
+
### Install the necessary packages
|
72 |
+
|
73 |
+
```bash
|
74 |
+
pip install --upgrade autoawq autoawq-kernels
|
75 |
+
```
|
76 |
+
|
77 |
+
### Example Python code
|
78 |
+
|
79 |
+
```python
|
80 |
+
from awq import AutoAWQForCausalLM
|
81 |
+
from transformers import AutoTokenizer, TextStreamer
|
82 |
+
|
83 |
+
model_path = "solidrust/dolphin-2.8-mistral-7b-v02-AWQ"
|
84 |
+
system_message = "You are Dolphin, incarnated as a powerful AI."
|
85 |
+
|
86 |
+
# Load model
|
87 |
+
model = AutoAWQForCausalLM.from_quantized(model_path,
|
88 |
+
fuse_layers=True)
|
89 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path,
|
90 |
+
trust_remote_code=True)
|
91 |
+
streamer = TextStreamer(tokenizer,
|
92 |
+
skip_prompt=True,
|
93 |
+
skip_special_tokens=True)
|
94 |
+
|
95 |
+
# Convert prompt to tokens
|
96 |
+
prompt_template = """\
|
97 |
+
<|im_start|>system
|
98 |
+
{system_message}<|im_end|>
|
99 |
+
<|im_start|>user
|
100 |
+
{prompt}<|im_end|>
|
101 |
+
<|im_start|>assistant"""
|
102 |
+
|
103 |
+
prompt = "You're standing on the surface of the Earth. "\
|
104 |
+
"You walk one mile south, one mile west and one mile north. "\
|
105 |
+
"You end up exactly where you started. Where are you?"
|
106 |
+
|
107 |
+
tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
|
108 |
+
return_tensors='pt').input_ids.cuda()
|
109 |
+
|
110 |
+
# Generate output
|
111 |
+
generation_output = model.generate(tokens,
|
112 |
+
streamer=streamer,
|
113 |
+
max_new_tokens=512)
|
114 |
+
|
115 |
+
```
|
116 |
+
|
117 |
### About AWQ
|
118 |
|
119 |
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.
|
|
|
127 |
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
128 |
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
|
129 |
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
130 |
+
|
131 |
+
## Prompt template: ChatML
|
132 |
+
|
133 |
+
```plaintext
|
134 |
+
<|im_start|>system
|
135 |
+
{system_message}<|im_end|>
|
136 |
+
<|im_start|>user
|
137 |
+
{prompt}<|im_end|>
|
138 |
+
<|im_start|>assistant
|
139 |
+
```
|