Suparious commited on
Commit
c88c6c7
1 Parent(s): 6e137f3

Add Model Card

Browse files
Files changed (1) hide show
  1. README.md +133 -0
README.md CHANGED
@@ -1,3 +1,136 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - finetuned
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - pytorch
9
+ - mistral
10
+ - instruct
11
+ - text-generation
12
+ - conversational
13
+ - license:apache-2.0
14
+ - autotrain_compatible
15
+ - endpoints_compatible
16
+ - text-generation-inference
17
+ - finetune
18
+ - chatml
19
+ model-index:
20
+ - name: samantha-1.1-westlake-7b
21
+ results: []
22
+ base_model: cognitivecomputations/samantha-1.1-westlake-7b
23
  license: apache-2.0
24
+ datasets:
25
+ - cognitivecomputations/samantha-data
26
+ language:
27
+ - en
28
+ library_name: transformers
29
+ model_creator: Common Sense
30
+ model_name: Samantha-v1.1-WestLake-7B
31
+ model_type: mistral
32
+ pipeline_tag: text-generation
33
+ inference: false
34
+ prompt_template: '<|im_start|>system
35
+
36
+ {system_message}<|im_end|>
37
+
38
+ <|im_start|>user
39
+
40
+ {prompt}<|im_end|>
41
+
42
+ <|im_start|>assistant
43
+
44
+ '
45
+ quantized_by: Suparious
46
  ---
47
+ # Samantha 1.1 Westlake-7b AWQ
48
+
49
+ - Model creator: [Cognitive Computations](https://huggingface.co/cognitivecomputations)
50
+ - Original model: [Samantha 1.1 WestLake 7B](https://huggingface.co/cognitivecomputations/samantha-1.1-westlake-7b)
51
+
52
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63111b2d88942700629f5771/DQ2iBVPM1PA4GKQBgvMEO.png)
53
+
54
+ ## Model Summary
55
+
56
+ Samantha-1.1-Westlake-7b is the Samantha-1.1 dataset trained on Westlake-7b model.
57
+
58
+ Unfortunately, while I trained her not to engage in sexual or romantic activities, she seems to have taken her own path. When prompted sweetly, she can be led astray.
59
+
60
+ I am not sure if this is because of the addition of system prompts, or because she was trained on WestLake base.
61
+
62
+ Anyway she's grown and makes her own decisions, I can't stop her now.
63
+
64
+ Be good to her.
65
+
66
+ ## How to use
67
+
68
+ ### Install the necessary packages
69
+
70
+ ```bash
71
+ pip install --upgrade autoawq autoawq-kernels
72
+ ```
73
+
74
+ ### Example Python code
75
+
76
+ ```python
77
+ from awq import AutoAWQForCausalLM
78
+ from transformers import AutoTokenizer, TextStreamer
79
+
80
+ model_path = "solidrust/samantha-1.1-westlake-7b-AWQ"
81
+ system_message = "You are Senzu, incarnated as a powerful AI."
82
+
83
+ # Load model
84
+ model = AutoAWQForCausalLM.from_quantized(model_path,
85
+ fuse_layers=True)
86
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
87
+ trust_remote_code=True)
88
+ streamer = TextStreamer(tokenizer,
89
+ skip_prompt=True,
90
+ skip_special_tokens=True)
91
+
92
+ # Convert prompt to tokens
93
+ prompt_template = """\
94
+ <|im_start|>system
95
+ {system_message}<|im_end|>
96
+ <|im_start|>user
97
+ {prompt}<|im_end|>
98
+ <|im_start|>assistant"""
99
+
100
+ prompt = "You're standing on the surface of the Earth. "\
101
+ "You walk one mile south, one mile west and one mile north. "\
102
+ "You end up exactly where you started. Where are you?"
103
+
104
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
105
+ return_tensors='pt').input_ids.cuda()
106
+
107
+ # Generate output
108
+ generation_output = model.generate(tokens,
109
+ streamer=streamer,
110
+ max_new_tokens=512)
111
+
112
+ ```
113
+
114
+ ### About AWQ
115
+
116
+ 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.
117
+
118
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
119
+
120
+ It is supported by:
121
+
122
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
123
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
124
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
125
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
126
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
127
+
128
+ ## Prompt template: ChatML
129
+
130
+ ```plaintext
131
+ <|im_start|>system
132
+ {system_message}<|im_end|>
133
+ <|im_start|>user
134
+ {prompt}<|im_end|>
135
+ <|im_start|>assistant
136
+ ```