Suparious commited on
Commit
93cfc3a
1 Parent(s): c07bbb6

adding model card

Browse files
Files changed (2) hide show
  1. README.md +140 -0
  2. quant_config.json +6 -0
README.md CHANGED
@@ -1,3 +1,143 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - axolotl
5
+ - finetune
6
+ - qlora
7
+ - quantized
8
+ - 4-bit
9
+ - AWQ
10
+ - pytorch
11
+ - mistral
12
+ - instruct
13
+ - text-generation
14
+ - conversational
15
+ - license:apache-2.0
16
+ - autotrain_compatible
17
+ - endpoints_compatible
18
+ - text-generation-inference
19
+ base_model: openchat/openchat-3.5-0106
20
+ datasets:
21
+ - hendrycks/competition_math
22
+ - allenai/ai2_arc
23
+ - camel-ai/physics
24
+ - camel-ai/chemistry
25
+ - camel-ai/biology
26
+ - camel-ai/math
27
+ - STEM-AI-mtl/Electrical-engineering
28
+ - openbookqa
29
+ - piqa
30
+ - metaeval/reclor
31
+ - mandyyyyii/scibench
32
+ - derek-thomas/ScienceQA
33
+ - sciq
34
+ - TIGER-Lab/ScienceEval
35
+ license: apache-2.0
36
+ language:
37
+ - en
38
+ library_name: transformers
39
+ model_creator: Weyaxi
40
+ model_name: Newton-7B
41
+ model_type: mistral
42
+ pipeline_tag: text-generation
43
+ inference: false
44
+ prompt_template: '<|im_start|>system
45
+
46
+ {system_message}<|im_end|>
47
+
48
+ <|im_start|>user
49
+
50
+ {prompt}<|im_end|>
51
+
52
+ <|im_start|>assistant
53
+
54
+ '
55
+ quantized_by: Suparious
56
  ---
57
+ # Weyaxi/Newton-7B AWQ
58
+
59
+ - Model creator: [Weyaxi](https://huggingface.co/Weyaxi)
60
+ - Original model: [Newton-7B](https://huggingface.co/Weyaxi/Newton-7B)
61
+
62
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/6468ce47e134d050a58aa89c/aimTTdmut59aZxOWQlkcC.jpeg)
63
+
64
+ ## Model Summary
65
+
66
+ This model is a fine-tuned version of [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106) on datasets related to science.
67
+
68
+ This model is fine-tuned using [QLoRa](https://arxiv.org/abs/2305.14314) and [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
69
+
70
+ This model's training was sponsored by [sablo.ai](https://sablo.ai).
71
+
72
+ ## How to use
73
+
74
+ ### Install the necessary packages
75
+
76
+ ```bash
77
+ pip install --upgrade autoawq autoawq-kernels
78
+ ```
79
+
80
+ ### Example Python code
81
+
82
+ ```python
83
+ from awq import AutoAWQForCausalLM
84
+ from transformers import AutoTokenizer, TextStreamer
85
+
86
+ model_path = "solidrust/Newton-7B-AWQ"
87
+ system_message = "You are Newton, incarnated as a powerful AI."
88
+
89
+ # Load model
90
+ model = AutoAWQForCausalLM.from_quantized(model_path,
91
+ fuse_layers=True)
92
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
93
+ trust_remote_code=True)
94
+ streamer = TextStreamer(tokenizer,
95
+ skip_prompt=True,
96
+ skip_special_tokens=True)
97
+
98
+ # Convert prompt to tokens
99
+ prompt_template = """\
100
+ <|im_start|>system
101
+ {system_message}<|im_end|>
102
+ <|im_start|>user
103
+ {prompt}<|im_end|>
104
+ <|im_start|>assistant"""
105
+
106
+ prompt = "You're standing on the surface of the Earth. "\
107
+ "You walk one mile south, one mile west and one mile north. "\
108
+ "You end up exactly where you started. Where are you?"
109
+
110
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
111
+ return_tensors='pt').input_ids.cuda()
112
+
113
+ # Generate output
114
+ generation_output = model.generate(tokens,
115
+ streamer=streamer,
116
+ max_new_tokens=512)
117
+
118
+ ```
119
+
120
+ ### About AWQ
121
+
122
+ 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.
123
+
124
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
125
+
126
+ It is supported by:
127
+
128
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
129
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
130
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
131
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
132
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
133
+
134
+ ## Prompt template: ChatML
135
+
136
+ ```plaintext
137
+ <|im_start|>system
138
+ {system_message}<|im_end|>
139
+ <|im_start|>user
140
+ {prompt}<|im_end|>
141
+ <|im_start|>assistant
142
+ ```
143
+
quant_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "zero_point": true,
3
+ "q_group_size": 128,
4
+ "w_bit": 4,
5
+ "version": "GEMM"
6
+ }