Suparious commited on
Commit
c67885f
·
verified ·
1 Parent(s): 642cefe

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -0
README.md CHANGED
@@ -30,3 +30,84 @@ prompt_template: '<|im_start|>system
30
  quantized_by: Suparious
31
  ---
32
  # ResplendentAI/Persephone_7B AWQ
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  quantized_by: Suparious
31
  ---
32
  # ResplendentAI/Persephone_7B AWQ
33
+
34
+ - Model creator: [ResplendentAI](https://huggingface.co/ResplendentAI)
35
+ - Original model: [Persephone_7B](https://huggingface.co/ResplendentAI/Persephone_7B)
36
+
37
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/626dfb8786671a29c715f8a9/aOnBmqHJQfOFEIgqD_JCz.jpeg)
38
+
39
+ ## Model Summary
40
+
41
+ After being in a bit of a rut, I decided to take a radically different approach to produce something new and exciting. It seems to have worked out. I hope you enjoy!
42
+
43
+ ## How to use
44
+
45
+ ### Install the necessary packages
46
+
47
+ ```bash
48
+ pip install --upgrade autoawq autoawq-kernels
49
+ ```
50
+
51
+ ### Example Python code
52
+
53
+ ```python
54
+ from awq import AutoAWQForCausalLM
55
+ from transformers import AutoTokenizer, TextStreamer
56
+
57
+ model_path = "solidrust/Persephone_7B-AWQ"
58
+ system_message = "You are Persephone, incarnated as a powerful AI."
59
+
60
+ # Load model
61
+ model = AutoAWQForCausalLM.from_quantized(model_path,
62
+ fuse_layers=True)
63
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
64
+ trust_remote_code=True)
65
+ streamer = TextStreamer(tokenizer,
66
+ skip_prompt=True,
67
+ skip_special_tokens=True)
68
+
69
+ # Convert prompt to tokens
70
+ prompt_template = """\
71
+ <|im_start|>system
72
+ {system_message}<|im_end|>
73
+ <|im_start|>user
74
+ {prompt}<|im_end|>
75
+ <|im_start|>assistant"""
76
+
77
+ prompt = "You're standing on the surface of the Earth. "\
78
+ "You walk one mile south, one mile west and one mile north. "\
79
+ "You end up exactly where you started. Where are you?"
80
+
81
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
82
+ return_tensors='pt').input_ids.cuda()
83
+
84
+ # Generate output
85
+ generation_output = model.generate(tokens,
86
+ streamer=streamer,
87
+ max_new_tokens=512)
88
+
89
+ ```
90
+
91
+ ### About AWQ
92
+
93
+ 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.
94
+
95
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
96
+
97
+ It is supported by:
98
+
99
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
100
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
101
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
102
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
103
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
104
+
105
+ ## Prompt template: ChatML
106
+
107
+ ```plaintext
108
+ <|im_start|>system
109
+ {system_message}<|im_end|>
110
+ <|im_start|>user
111
+ {prompt}<|im_end|>
112
+ <|im_start|>assistant
113
+ ```