TheBloke commited on
Commit
843c711
1 Parent(s): d861f96

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -15
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  inference: false
3
  license: llama2
4
  model-index:
@@ -15,9 +16,21 @@ model-index:
15
  task:
16
  type: text-generation
17
  model_creator: Phind
18
- model_link: https://huggingface.co/Phind/Phind-CodeLlama-34B-v2
19
  model_name: CodeLlama 34B v2
20
  model_type: llama
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  quantized_by: TheBloke
22
  tags:
23
  - code llama
@@ -55,6 +68,7 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
55
  <!-- repositories-available start -->
56
  ## Repositories available
57
 
 
58
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ)
59
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GGUF)
60
  * [Phind's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Phind/Phind-CodeLlama-34B-v2)
@@ -76,6 +90,7 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
76
 
77
  <!-- prompt-template end -->
78
 
 
79
  <!-- README_GPTQ.md-provided-files start -->
80
  ## Provided files and GPTQ parameters
81
 
@@ -100,22 +115,22 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
100
 
101
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
102
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
103
- | [main](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 17.69 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
104
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 20.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
105
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.98 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
106
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.33 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
107
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.54 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
108
- | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 14.14 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False but poor AutoGPTQ CUDA speed. |
109
 
110
  <!-- README_GPTQ.md-provided-files end -->
111
 
112
  <!-- README_GPTQ.md-download-from-branches start -->
113
  ## How to download from branches
114
 
115
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Phind-CodeLlama-34B-v2-GPTQ:gptq-4bit-32g-actorder_True`
116
  - With Git, you can clone a branch with:
117
  ```
118
- git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ
119
  ```
120
  - In Python Transformers code, the branch is the `revision` parameter; see below.
121
  <!-- README_GPTQ.md-download-from-branches end -->
@@ -128,7 +143,7 @@ It is strongly recommended to use the text-generation-webui one-click-installers
128
 
129
  1. Click the **Model tab**.
130
  2. Under **Download custom model or LoRA**, enter `TheBloke/Phind-CodeLlama-34B-v2-GPTQ`.
131
- - To download from a specific branch, enter for example `TheBloke/Phind-CodeLlama-34B-v2-GPTQ:gptq-4bit-32g-actorder_True`
132
  - see Provided Files above for the list of branches for each option.
133
  3. Click **Download**.
134
  4. The model will start downloading. Once it's finished it will say "Done".
@@ -176,10 +191,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
176
 
177
  model_name_or_path = "TheBloke/Phind-CodeLlama-34B-v2-GPTQ"
178
  # To use a different branch, change revision
179
- # For example: revision="gptq-4bit-32g-actorder_True"
180
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
181
- torch_dtype=torch.float16,
182
  device_map="auto",
 
183
  revision="main")
184
 
185
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
@@ -198,7 +213,7 @@ prompt_template=f'''### System Prompt
198
  print("\n\n*** Generate:")
199
 
200
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
201
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
202
  print(tokenizer.decode(output[0]))
203
 
204
  # Inference can also be done using transformers' pipeline
@@ -209,9 +224,11 @@ pipe = pipeline(
209
  model=model,
210
  tokenizer=tokenizer,
211
  max_new_tokens=512,
 
212
  temperature=0.7,
213
  top_p=0.95,
214
- repetition_penalty=1.15
 
215
  )
216
 
217
  print(pipe(prompt_template)[0]['generated_text'])
@@ -236,10 +253,12 @@ For further support, and discussions on these models and AI in general, join us
236
 
237
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
238
 
239
- ## Thanks, and how to contribute.
240
 
241
  Thanks to the [chirper.ai](https://chirper.ai) team!
242
 
 
 
243
  I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
244
 
245
  If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
@@ -251,7 +270,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
251
 
252
  **Special thanks to**: Aemon Algiz.
253
 
254
- **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
255
 
256
 
257
  Thank you to all my generous patrons and donaters!
 
1
  ---
2
+ base_model: https://huggingface.co/Phind/Phind-CodeLlama-34B-v2
3
  inference: false
4
  license: llama2
5
  model-index:
 
16
  task:
17
  type: text-generation
18
  model_creator: Phind
 
19
  model_name: CodeLlama 34B v2
20
  model_type: llama
21
+ prompt_template: '### System Prompt
22
+
23
+ {system_message}
24
+
25
+
26
+ ### User Message
27
+
28
+ {prompt}
29
+
30
+
31
+ ### Assistant
32
+
33
+ '
34
  quantized_by: TheBloke
35
  tags:
36
  - code llama
 
68
  <!-- repositories-available start -->
69
  ## Repositories available
70
 
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-AWQ)
72
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ)
73
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GGUF)
74
  * [Phind's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Phind/Phind-CodeLlama-34B-v2)
 
90
 
91
  <!-- prompt-template end -->
92
 
93
+
94
  <!-- README_GPTQ.md-provided-files start -->
95
  ## Provided files and GPTQ parameters
96
 
 
115
 
116
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
117
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
118
+ | [main](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 17.69 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
119
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 20.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
120
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.98 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
121
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.33 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
122
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.54 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
123
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 14.14 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
124
 
125
  <!-- README_GPTQ.md-provided-files end -->
126
 
127
  <!-- README_GPTQ.md-download-from-branches start -->
128
  ## How to download from branches
129
 
130
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Phind-CodeLlama-34B-v2-GPTQ:main`
131
  - With Git, you can clone a branch with:
132
  ```
133
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/Phind-CodeLlama-34B-v2-GPTQ
134
  ```
135
  - In Python Transformers code, the branch is the `revision` parameter; see below.
136
  <!-- README_GPTQ.md-download-from-branches end -->
 
143
 
144
  1. Click the **Model tab**.
145
  2. Under **Download custom model or LoRA**, enter `TheBloke/Phind-CodeLlama-34B-v2-GPTQ`.
146
+ - To download from a specific branch, enter for example `TheBloke/Phind-CodeLlama-34B-v2-GPTQ:main`
147
  - see Provided Files above for the list of branches for each option.
148
  3. Click **Download**.
149
  4. The model will start downloading. Once it's finished it will say "Done".
 
191
 
192
  model_name_or_path = "TheBloke/Phind-CodeLlama-34B-v2-GPTQ"
193
  # To use a different branch, change revision
194
+ # For example: revision="main"
195
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
 
196
  device_map="auto",
197
+ trust_remote_code=False,
198
  revision="main")
199
 
200
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
 
213
  print("\n\n*** Generate:")
214
 
215
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
216
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
217
  print(tokenizer.decode(output[0]))
218
 
219
  # Inference can also be done using transformers' pipeline
 
224
  model=model,
225
  tokenizer=tokenizer,
226
  max_new_tokens=512,
227
+ do_sample=True,
228
  temperature=0.7,
229
  top_p=0.95,
230
+ top_k=40,
231
+ repetition_penalty=1.1
232
  )
233
 
234
  print(pipe(prompt_template)[0]['generated_text'])
 
253
 
254
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
255
 
256
+ ## Thanks, and how to contribute
257
 
258
  Thanks to the [chirper.ai](https://chirper.ai) team!
259
 
260
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
261
+
262
  I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
263
 
264
  If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
 
270
 
271
  **Special thanks to**: Aemon Algiz.
272
 
273
+ **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
274
 
275
 
276
  Thank you to all my generous patrons and donaters!