TheBloke commited on
Commit
36913e9
1 Parent(s): 20cb018

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -41
README.md CHANGED
@@ -5,16 +5,9 @@ license: llama2
5
  model_creator: Xwin-LM
6
  model_name: Xwin-LM 70B V0.1
7
  model_type: llama
8
- prompt_template: 'Below is an instruction that describes a task. Write a response
9
- that appropriately completes the request.
10
-
11
-
12
- ### Instruction:
13
-
14
- {prompt}
15
-
16
-
17
- ### Response:
18
 
19
  '
20
  quantized_by: TheBloke
@@ -59,15 +52,10 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
59
  <!-- repositories-available end -->
60
 
61
  <!-- prompt-template start -->
62
- ## Prompt template: Alpaca
63
 
64
  ```
65
- Below is an instruction that describes a task. Write a response that appropriately completes the request.
66
-
67
- ### Instruction:
68
- {prompt}
69
-
70
- ### Response:
71
 
72
  ```
73
 
@@ -75,7 +63,7 @@ Below is an instruction that describes a task. Write a response that appropriate
75
 
76
 
77
  <!-- README_GPTQ.md-provided-files start -->
78
- ## Provided files and GPTQ parameters
79
 
80
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
81
 
@@ -90,8 +78,8 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
90
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
91
  - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
92
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
93
- - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
94
- - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
95
  - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
96
 
97
  </details>
@@ -108,14 +96,71 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
108
  <!-- README_GPTQ.md-provided-files end -->
109
 
110
  <!-- README_GPTQ.md-download-from-branches start -->
111
- ## How to download from branches
112
 
113
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Xwin-LM-70B-V0.1-GPTQ:main`
114
- - With Git, you can clone a branch with:
 
 
 
 
 
 
 
 
 
 
115
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  git clone --single-branch --branch main https://huggingface.co/TheBloke/Xwin-LM-70B-V0.1-GPTQ
117
  ```
118
- - In Python Transformers code, the branch is the `revision` parameter; see below.
 
 
119
  <!-- README_GPTQ.md-download-from-branches end -->
120
  <!-- README_GPTQ.md-text-generation-webui start -->
121
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
@@ -143,10 +188,10 @@ It is strongly recommended to use the text-generation-webui one-click-installers
143
 
144
  ### Install the necessary packages
145
 
146
- Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
147
 
148
  ```shell
149
- pip3 install transformers>=4.32.0 optimum>=1.12.0
150
  pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
151
  ```
152
 
@@ -156,17 +201,10 @@ If you have problems installing AutoGPTQ using the pre-built wheels, install it
156
  pip3 uninstall -y auto-gptq
157
  git clone https://github.com/PanQiWei/AutoGPTQ
158
  cd AutoGPTQ
 
159
  pip3 install .
160
  ```
161
 
162
- ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
163
-
164
- If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
165
- ```shell
166
- pip3 uninstall -y transformers
167
- pip3 install git+https://github.com/huggingface/transformers.git
168
- ```
169
-
170
  ### You can then use the following code
171
 
172
  ```python
@@ -183,13 +221,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
183
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
184
 
185
  prompt = "Tell me about AI"
186
- prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
187
-
188
- ### Instruction:
189
- {prompt}
190
-
191
- ### Response:
192
-
193
  '''
194
 
195
  print("\n\n*** Generate:")
 
5
  model_creator: Xwin-LM
6
  model_name: Xwin-LM 70B V0.1
7
  model_type: llama
8
+ prompt_template: 'A chat between a curious user and an artificial intelligence assistant.
9
+ The assistant gives helpful, detailed, and polite answers to the user''s questions.
10
+ USER: {prompt} ASSISTANT:
 
 
 
 
 
 
 
11
 
12
  '
13
  quantized_by: TheBloke
 
52
  <!-- repositories-available end -->
53
 
54
  <!-- prompt-template start -->
55
+ ## Prompt template: Vicuna
56
 
57
  ```
58
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {prompt} ASSISTANT:
 
 
 
 
 
59
 
60
  ```
61
 
 
63
 
64
 
65
  <!-- README_GPTQ.md-provided-files start -->
66
+ ## Provided files, and GPTQ parameters
67
 
68
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
69
 
 
78
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
79
  - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
80
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
81
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
82
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
83
  - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
84
 
85
  </details>
 
96
  <!-- README_GPTQ.md-provided-files end -->
97
 
98
  <!-- README_GPTQ.md-download-from-branches start -->
99
+ ## How to download, including from branches
100
 
101
+ ### In text-generation-webui
102
+
103
+ To download from the `main` branch, enter `TheBloke/Xwin-LM-70B-V0.1-GPTQ` in the "Download model" box.
104
+
105
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/Xwin-LM-70B-V0.1-GPTQ:main`
106
+
107
+ ### From the command line
108
+
109
+ I recommend using the `huggingface-hub` Python library:
110
+
111
+ ```shell
112
+ pip3 install huggingface-hub
113
  ```
114
+
115
+ To download the `main` branch to a folder called `Xwin-LM-70B-V0.1-GPTQ`:
116
+
117
+ ```shell
118
+ mkdir Xwin-LM-70B-V0.1-GPTQ
119
+ huggingface-cli download TheBloke/Xwin-LM-70B-V0.1-GPTQ --local-dir Xwin-LM-70B-V0.1-GPTQ --local-dir-use-symlinks False
120
+ ```
121
+
122
+ To download from a different branch, add the `--revision` parameter:
123
+
124
+ ```shell
125
+ mkdir Xwin-LM-70B-V0.1-GPTQ
126
+ huggingface-cli download TheBloke/Xwin-LM-70B-V0.1-GPTQ --revision main --local-dir Xwin-LM-70B-V0.1-GPTQ --local-dir-use-symlinks False
127
+ ```
128
+
129
+ <details>
130
+ <summary>More advanced huggingface-cli download usage</summary>
131
+
132
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Huggingface cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
133
+
134
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
135
+
136
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
137
+
138
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
139
+
140
+ ```shell
141
+ pip3 install hf_transfer
142
+ ```
143
+
144
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
145
+
146
+ ```shell
147
+ mkdir Xwin-LM-70B-V0.1-GPTQ
148
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Xwin-LM-70B-V0.1-GPTQ --local-dir Xwin-LM-70B-V0.1-GPTQ --local-dir-use-symlinks False
149
+ ```
150
+
151
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
152
+ </details>
153
+
154
+ ### With `git` (**not** recommended)
155
+
156
+ To clone a specific branch with `git`, use a command like this:
157
+
158
+ ```shell
159
  git clone --single-branch --branch main https://huggingface.co/TheBloke/Xwin-LM-70B-V0.1-GPTQ
160
  ```
161
+
162
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
163
+
164
  <!-- README_GPTQ.md-download-from-branches end -->
165
  <!-- README_GPTQ.md-text-generation-webui start -->
166
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
 
188
 
189
  ### Install the necessary packages
190
 
191
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
192
 
193
  ```shell
194
+ pip3 install transformers optimum
195
  pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
196
  ```
197
 
 
201
  pip3 uninstall -y auto-gptq
202
  git clone https://github.com/PanQiWei/AutoGPTQ
203
  cd AutoGPTQ
204
+ git checkout v0.4.2
205
  pip3 install .
206
  ```
207
 
 
 
 
 
 
 
 
 
208
  ### You can then use the following code
209
 
210
  ```python
 
221
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
222
 
223
  prompt = "Tell me about AI"
224
+ prompt_template=f'''A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {prompt} ASSISTANT:
 
 
 
 
 
 
225
  '''
226
 
227
  print("\n\n*** Generate:")