Suparious commited on
Commit
83854bd
·
verified ·
1 Parent(s): 7548ece

Create README.md

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