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