Suparious commited on
Commit
5fe464b
·
verified ·
1 Parent(s): 7398369

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +115 -0
README.md ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - nbeerbower/flammen13-mistral-7B
5
+ - nbeerbower/Flammen-Kunoichi-7B
6
+ - nbeerbower/flammen10-mistral-7B
7
+ - nbeerbower/flammen11X-mistral-7B
8
+ - nbeerbower/Maidphin-Kunoichi-7B
9
+ library_name: transformers
10
+ pipeline_tag: text-generation
11
+ tags:
12
+ - mergekit
13
+ - merge
14
+ - finetuned
15
+ - quantized
16
+ - 4-bit
17
+ - AWQ
18
+ - transformers
19
+ - pytorch
20
+ - mistral
21
+ - 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
+ # nbeerbower/MaidFlameSoup-7B AWQ
37
+
38
+ - Model creator: [nbeerbower](https://huggingface.co/nbeerbower)
39
+ - Original model: [MaidFlameSoup-7B](https://huggingface.co/nbeerbower/MaidFlameSoup-7B)
40
+
41
+ ## Model Summary
42
+
43
+ This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
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/MaidFlameSoup-7B-AWQ"
60
+ system_message = "You are MaidFlameSoup, 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
+ ```