Text Generation
Transformers
Safetensors
llama
code
Eval Results (legacy)
text-generation-inference
4-bit precision
gptq
Run this model with HF Jobs
Run TheBloke/WizardCoder-Python-13B-V1.0-GPTQ on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use TheBloke/WizardCoder-Python-13B-V1.0-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/WizardCoder-Python-13B-V1.0-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/WizardCoder-Python-13B-V1.0-GPTQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/WizardCoder-Python-13B-V1.0-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/WizardCoder-Python-13B-V1.0-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/WizardCoder-Python-13B-V1.0-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ
- SGLang
How to use TheBloke/WizardCoder-Python-13B-V1.0-GPTQ with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/WizardCoder-Python-13B-V1.0-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ
Upload README.md
Browse files123456789101112131415161718192021222324252627282917 unmodified lines474849505152535455565758596061626364656 unmodified lines727374757677787980818283848586878889909110 unmodified lines1021031041051061072 unmodified lines11011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118212 unmodified lines1951961971981992002012022037 unmodified lines21121221321421521621721821922022122218 unmodified lines24124224324424524624725 unmodified lines27327427527627727827925 unmodified lines3053063073083093107 unmodified lines318319320321322323324---inference: falselibrary_name: transformerslicense: llama2metrics:- code_evalmodel-index:- name: WizardCoder-Python-13B-V1.0results:- dataset:name: HumanEvaltype: openai_humanevalmetrics:- name: pass@1type: pass@1value: 0.64verified: falsetask:type: text-generationmodel_creator: WizardLMmodel_link: https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0model_name: WizardCoder Python 13B V1.0model_type: llamaquantized_by: TheBloketags:- code---<!-- header start -->17 unmodified lines- Model creator: [WizardLM](https://huggingface.co/WizardLM)- Original model: [WizardCoder Python 13B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0)## DescriptionThis repo contains GPTQ model files for [WizardLM's WizardCoder Python 13B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0).Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.## Repositories available* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ)* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGUF)* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGML)* [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0)## Prompt template: Alpaca```6 unmodified lines```## Provided files and GPTQ parametersMultiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.Each separate quant is in a different branch. See below for instructions on fetching from different branches.All GPTQ files are made with AutoGPTQ.<details><summary>Explanation of GPTQ parameters</summary>- Bits: The bit size of the quantised model.- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.- Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.- 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).- 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.10 unmodified lines| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. || [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |## How to download from branches- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`2 unmodified linesgit clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ```- In Python Transformers code, the branch is the `revision` parameter; see below.## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.1. Click the **Model tab**.2. Under **Download custom model or LoRA**, enter `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ`.- To download from a specific branch, enter for example `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`- see Provided Files above for the list of branches for each option.3. Click **Download**.4. The model will start downloading. Once it's finished it will say "Done"5. In the top left, click the refresh icon next to **Model**.6. In the **Model** dropdown, choose the model you just downloaded: `WizardCoder-Python-13B-V1.0-GPTQ`7. The model will automatically load, and is now ready for use!8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.* Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!## How to use this GPTQ model from Python codeFirst make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:```pip3 install auto-gptq```If you have problems installing AutoGPTQ, please build from source instead:```pip3 uninstall -y auto-gptqgit clone https://github.com/PanQiWei/AutoGPTQcd AutoGPTQpip3 install .```Then try the following example code:```pythonfrom transformers import AutoTokenizer, pipeline, loggingfrom auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfigmodel_name_or_path = "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ"use_triton = Falsetokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,use_safetensors=True,trust_remote_code=False,device="cuda:0",use_triton=use_triton,quantize_config=None)"""# To download from a specific branch, use the revision parameter, as in this example:# Note that `revision` requires AutoGPTQ 0.3.1 or later!model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,revision="gptq-4bit-32g-actorder_True",use_safetensors=True,trust_remote_code=False,device="cuda:0",quantize_config=None)"""prompt = "Tell me about AI"prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.12 unmodified lines# Inference can also be done using transformers' pipeline# Prevent printing spurious transformers error when using pipeline with AutoGPTQlogging.set_verbosity(logging.CRITICAL)print("*** Pipeline:")pipe = pipeline("text-generation",7 unmodified linesprint(pipe(prompt_template)[0]['generated_text'])```## CompatibilityThe files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.<!-- footer start --><!-- 200823 -->18 unmodified lines**Special thanks to**: Aemon Algiz.**Patreon special mentions**: Kacper Wikieล, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, ้ฟๆ, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11Thank you to all my generous patrons and donaters!25 unmodified lines| WizardCoder-Python-34B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 73.2 | 61.2 | [Demo](http://47.103.63.15:50085/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> || WizardCoder-15B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-15B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 59.8 |50.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> || WizardCoder-Python-13B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 64.0 | 55.6 | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> || WizardCoder-3B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-3B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 34.8 |37.4 | [Demo](http://47.103.63.15:50086/) | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> || WizardCoder-1B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-1B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 23.8 |28.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |25 unmodified lines| <sup>WizardLM-7B-V1.0 </sup>| <sup>๐ค <a href="https://huggingface.co/WizardLM/WizardLM-7B-V1.0" target="_blank">HF Link</a> </sup> |<sup> ๐ <a href="https://arxiv.org/abs/2304.12244" target="_blank">[WizardLM]</a> </sup>| | | |<sup>19.1 </sup>|<sup> Non-commercial</sup>|</font>## Prompt Format```"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"7 unmodified lines## CitationPlease cite the repo if you use the data or code in this repo.```@misc{luo2023wizardcoder,123456789101117 unmodified lines2930313233343536373839404142434445464748495051526 unmodified lines596061626364656667686970717273747576777879808110 unmodified lines92939495969798991002 unmodified lines10310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317412 unmodified lines1871881891901911927 unmodified lines20020120220320420520620720820921021121221321421521618 unmodified lines23523623723823924024125 unmodified lines26726826927027127227327425 unmodified lines3003013023033043053063073083093103113123137 unmodified lines321322323324325326327---inference: falselicense: llama2model_creator: WizardLMmodel_link: https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0model_name: WizardCoder Python 13B V1.0model_type: llamaquantized_by: TheBloke---<!-- header start -->17 unmodified lines- Model creator: [WizardLM](https://huggingface.co/WizardLM)- Original model: [WizardCoder Python 13B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0)<!-- description start -->## DescriptionThis repo contains GPTQ model files for [WizardLM's WizardCoder Python 13B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0).Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.<!-- description end --><!-- repositories-available start -->## Repositories available* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ)* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGUF)* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GGML)* [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0)<!-- repositories-available end --><!-- prompt-template start -->## Prompt template: Alpaca```6 unmodified lines```<!-- prompt-template end --><!-- README_GPTQ.md-provided-files start -->## Provided files and GPTQ parametersMultiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.Each separate quant is in a different branch. See below for instructions on fetching from different branches.All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa.<details><summary>Explanation of GPTQ parameters</summary>- Bits: The bit size of the quantised model.- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.- 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.- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.- 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).- 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.10 unmodified lines| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. || [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |<!-- README_GPTQ.md-provided-files end --><!-- README_GPTQ.md-download-from-branches start -->## How to download from branches- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`2 unmodified linesgit clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardCoder-Python-13B-V1.0-GPTQ```- In Python Transformers code, the branch is the `revision` parameter; see below.<!-- README_GPTQ.md-download-from-branches end --><!-- README_GPTQ.md-text-generation-webui start -->## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.1. Click the **Model tab**.2. Under **Download custom model or LoRA**, enter `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ`.- To download from a specific branch, enter for example `TheBloke/WizardCoder-Python-13B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`- see Provided Files above for the list of branches for each option.3. Click **Download**.4. The model will start downloading. Once it's finished it will say "Done".5. In the top left, click the refresh icon next to **Model**.6. In the **Model** dropdown, choose the model you just downloaded: `WizardCoder-Python-13B-V1.0-GPTQ`7. The model will automatically load, and is now ready for use!8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.* Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!<!-- README_GPTQ.md-text-generation-webui end --><!-- README_GPTQ.md-use-from-python start -->## How to use this GPTQ model from Python code### Install the necessary packagesRequires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.```shellpip3 install transformers>=4.32.0 optimum>=1.12.0pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7```If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:```shellpip3 uninstall -y auto-gptqgit clone https://github.com/PanQiWei/AutoGPTQcd AutoGPTQpip3 install .```### For CodeLlama models only: you must use Transformers 4.33.0 or later.If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:```shellpip3 uninstall -y transformerspip3 install git+https://github.com/huggingface/transformers.git```### You can then use the following code```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizer, pipelinemodel_name_or_path = "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ"# To use a different branch, change revision# For example: revision="gptq-4bit-32g-actorder_True"model = AutoModelForCausalLM.from_pretrained(model_name_or_path,torch_dtype=torch.float16,device_map="auto",revision="main")tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)prompt = "Tell me about AI"prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.12 unmodified lines# Inference can also be done using transformers' pipelineprint("*** Pipeline:")pipe = pipeline("text-generation",7 unmodified linesprint(pipe(prompt_template)[0]['generated_text'])```<!-- README_GPTQ.md-use-from-python end --><!-- README_GPTQ.md-compatibility start -->## CompatibilityThe files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).[ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.[Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.<!-- README_GPTQ.md-compatibility end --><!-- footer start --><!-- 200823 -->18 unmodified lines**Special thanks to**: Aemon Algiz.**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 CruiserThank you to all my generous patrons and donaters!25 unmodified lines| WizardCoder-Python-34B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 73.2 | 61.2 | [Demo](http://47.103.63.15:50085/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> || WizardCoder-15B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-15B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 59.8 |50.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> || WizardCoder-Python-13B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 64.0 | 55.6 | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> || WizardCoder-Python-7B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-Python-7B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 55.5 | 51.6 | [Demo](http://47.103.63.15:50088/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> || WizardCoder-3B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-3B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 34.8 |37.4 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> || WizardCoder-1B-V1.0 | ๐ค <a href="https://huggingface.co/WizardLM/WizardCoder-1B-V1.0" target="_blank">HF Link</a> | ๐ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 23.8 |28.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |25 unmodified lines| <sup>WizardLM-7B-V1.0 </sup>| <sup>๐ค <a href="https://huggingface.co/WizardLM/WizardLM-7B-V1.0" target="_blank">HF Link</a> </sup> |<sup> ๐ <a href="https://arxiv.org/abs/2304.12244" target="_blank">[WizardLM]</a> </sup>| | | |<sup>19.1 </sup>|<sup> Non-commercial</sup>|</font>## Comparing WizardCoder-Python-34B-V1.0 with Other LLMs.๐ฅ The following figure shows that our **WizardCoder-Python-34B-V1.0 attains the second position in this benchmark**, surpassing GPT4 (2023/03/15, 73.2 vs. 67.0), ChatGPT-3.5 (73.2 vs. 72.5) and Claude2 (73.2 vs. 71.2).<p align="center" width="100%"><a ><img src="https://raw.githubusercontent.com/nlpxucan/WizardLM/main/WizardCoder/imgs/compare_sota.png" alt="WizardCoder" style="width: 96%; min-width: 300px; display: block; margin: auto;"></a></p>## Prompt Format```"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"7 unmodified lines## CitationPlease cite the repo if you use the data, method or code in this repo.```@misc{luo2023wizardcoder,
README.md+64-61