Views
No views yet

Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{prompt}
### Response:
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|---|---|---|---|---|---|
| wizardcoder-33b-v1.1.Q2_K.gguf | Q2_K | 2 | 14.03 GB | 16.53 GB | smallest, significant quality loss - not recommended for most purposes |
| wizardcoder-33b-v1.1.Q3_K_S.gguf | Q3_K_S | 3 | 14.42 GB | 16.92 GB | very small, high quality loss |
| wizardcoder-33b-v1.1.Q3_K_M.gguf | Q3_K_M | 3 | 16.07 GB | 18.57 GB | very small, high quality loss |
| wizardcoder-33b-v1.1.Q3_K_L.gguf | Q3_K_L | 3 | 17.56 GB | 20.06 GB | small, substantial quality loss |
| wizardcoder-33b-v1.1.Q4_0.gguf | Q4_0 | 4 | 18.82 GB | 21.32 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
| wizardcoder-33b-v1.1.Q4_K_S.gguf | Q4_K_S | 4 | 18.89 GB | 21.39 GB | small, greater quality loss |
| wizardcoder-33b-v1.1.Q4_K_M.gguf | Q4_K_M | 4 | 19.94 GB | 22.44 GB | medium, balanced quality - recommended |
| wizardcoder-33b-v1.1.Q5_0.gguf | Q5_0 | 5 | 22.96 GB | 25.46 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
| wizardcoder-33b-v1.1.Q5_K_S.gguf | Q5_K_S | 5 | 22.96 GB | 25.46 GB | large, low quality loss - recommended |
| wizardcoder-33b-v1.1.Q5_K_M.gguf | Q5_K_M | 5 | 23.54 GB | 26.04 GB | large, very low quality loss - recommended |
| wizardcoder-33b-v1.1.Q6_K.gguf | Q6_K | 6 | 27.36 GB | 29.86 GB | very large, extremely low quality loss |
| wizardcoder-33b-v1.1.Q8_0.gguf | Q8_0 | 8 | 35.43 GB | 37.93 GB | very large, extremely low quality loss - not recommended |
text-generation-webuihuggingface-hub Python library:pip3 install huggingface-hubhuggingface-cli download TheBloke/WizardCoder-33B-V1.1-GGUF wizardcoder-33b-v1.1.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falsehuggingface-cli download TheBloke/WizardCoder-33B-V1.1-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'huggingface-cli, please see: HF -> Hub Python Library -> Download files -> Download from the CLI.hf_transfer:pip3 install hf_transferHF_HUB_ENABLE_HF_TRANSFER to 1:HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/WizardCoder-33B-V1.1-GGUF wizardcoder-33b-v1.1.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falseset HF_HUB_ENABLE_HF_TRANSFER=1 before the download command.llama.cpp commandllama.cpp from commit d0cee0d or later../main -ngl 35 -m wizardcoder-33b-v1.1.Q4_K_M.gguf --color -c 16384 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:"-ngl 32 to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.-c 16384 to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.-p <PROMPT> argument with -i -instext-generation-webui1# Base ctransformers with no GPU acceleration
2pip install llama-cpp-python
3# With NVidia CUDA acceleration
4CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
5# Or with OpenBLAS acceleration
6CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
7# Or with CLBLast acceleration
8CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
9# Or with AMD ROCm GPU acceleration (Linux only)
10CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
11# Or with Metal GPU acceleration for macOS systems only
12CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
13
14# In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
15$env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
16pip install llama-cpp-python1from llama_cpp import Llama
2
3# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
4llm = Llama(
5 model_path="./wizardcoder-33b-v1.1.Q4_K_M.gguf", # Download the model file first
6 n_ctx=16384, # The max sequence length to use - note that longer sequence lengths require much more resources
7 n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
8 n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
9)
10
11# Simple inference example
12output = llm(
13 "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:", # Prompt
14 max_tokens=512, # Generate up to 512 tokens
15 stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
16 echo=True # Whether to echo the prompt
17)
18
19# Chat Completion API
20
21llm = Llama(model_path="./wizardcoder-33b-v1.1.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
22llm.create_chat_completion(
23 messages = [
24 {"role": "system", "content": "You are a story writing assistant."},
25 {
26 "role": "user",
27 "content": "Write a story about llamas."
28 }
29 ]
30)| Model | Checkpoint | Paper | HumanEval | HumanEval+ | MBPP | MBPP+ | License |
|---|---|---|---|---|---|---|---|
| GPT-4-Turbo (Nov 2023) | - | - | 85.4 | 81.7 | 83.0 | 70.7 | - |
| GPT-4 (May 2023) | - | - | 88.4 | 76.8 | - | - | - |
| GPT-3.5-Turbo (Nov 2023) | - | - | 72.6 | 65.9 | 81.7 | 69.4 | - |
| Gemini Pro | - | - | 63.4 | 55.5 | 72.9 | 57.9 | - |
| DeepSeek-Coder-33B-instruct | - | - | 78.7 | 72.6 | 78.7 | 66.7 | - |
| WizardCoder-33B-V1.1 | 🤗 HF Link | 📃 [WizardCoder] | 79.9 | 73.2 | 78.9 | 66.9 | MSFTResearch |
| WizardCoder-Python-34B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 73.2 | 64.6 | 73.2 | 59.9 | Llama2 |
| WizardCoder-15B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 59.8 | 52.4 | -- | -- | OpenRAIL-M |
| WizardCoder-Python-13B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 64.0 | -- | -- | -- | Llama2 |
| WizardCoder-Python-7B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 55.5 | -- | -- | -- | Llama2 |
| WizardCoder-3B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 34.8 | -- | -- | -- | OpenRAIL-M |
| WizardCoder-1B-V1.0 | 🤗 HF Link | 📃 [WizardCoder] | 23.8 | -- | -- | -- | OpenRAIL-M |
"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"transformers==4.36.2
vllm==0.2.51model="WizardLM/WizardCoder-33B-V1.1"
2temp=0.0
3max_len=2048
4pred_num=1
5num_seqs_per_iter=1
6
7output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
8
9mkdir -p ${output_path}
10echo 'Output path: '$output_path
11echo 'Model to eval: '$model
12
13# 164 problems, 21 per GPU if GPU=8
14index=0
15gpu_num=8
16for ((i = 0; i < $gpu_num; i++)); do
17 start_index=$((i * 21))
18 end_index=$(((i + 1) * 21))
19
20 gpu=$((i))
21 echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
22 ((index++))
23 (
24 CUDA_VISIBLE_DEVICES=$gpu python humaneval_gen.py --model ${model} \
25 --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
26 --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --greedy_decode
27 ) &
28 if (($index % $gpu_num == 0)); then wait; fi
29done1model="WizardLM/WizardCoder-33B-V1.1"
2temp=0.0
3max_len=2048
4pred_num=1
5num_seqs_per_iter=1
6
7output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
8
9mkdir -p ${output_path}
10echo 'Output path: '$output_path
11echo 'Model to eval: '$model
12
13CUDA_VISIBLE_DEVICES=0,1,2,3 python humaneval_gen_vllm.py --model ${model} \
14 --start_index 0 --end_index 164 --temperature ${temp} \
15 --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --num_gpus 4 --overwrite1git clone https://github.com/evalplus/evalplus.git
2cd evalplus
3export PYTHONPATH=$PYTHONPATH:$(pwd)
4pip install -r requirements.txt1output_path=preds/T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
2
3echo 'Output path: '$output_path
4python process_humaneval.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
5
6evalplus.evaluate --dataset humaneval --samples ${output_path}.jsonl1model="WizardLM/WizardCoder-33B-V1.1"
2temp=0.0
3max_len=2048
4pred_num=1
5num_seqs_per_iter=1
6
7output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
8
9mkdir -p ${output_path}
10echo 'Output path: '$output_path
11echo 'Model to eval: '$model
12
13# 399 problems, 50 per GPU if GPU=8
14index=0
15gpu_num=8
16for ((i = 0; i < $gpu_num; i++)); do
17 start_index=$((i * 50))
18 end_index=$(((i + 1) * 50))
19
20 gpu=$((i))
21 echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
22 ((index++))
23 (
24 CUDA_VISIBLE_DEVICES=$gpu python mbppplus_gen.py --model ${model} \
25 --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
26 --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --greedy_decode
27 ) &
28 if (($index % $gpu_num == 0)); then wait; fi
29done1model="WizardLM/WizardCoder-33B-V1.1"
2temp=0.0
3max_len=2048
4pred_num=1
5num_seqs_per_iter=1
6
7output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
8
9mkdir -p ${output_path}
10echo 'Output path: '$output_path
11echo 'Model to eval: '$model
12
13CUDA_VISIBLE_DEVICES=0,1,2,3 python mbppplus_gen_vllm.py --model ${model} \
14 --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
15 --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --num_gpus 41git clone https://github.com/evalplus/evalplus.git
2cd evalplus
3export PYTHONPATH=$PYTHONPATH:$(pwd)
4pip install -r requirements.txt1output_path=preds/MBPP_T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
2
3echo 'Output path: '$output_path
4python mbppplus_process_preds.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
5
6evalplus.evaluate --dataset mbpp --samples ${output_path}.jsonl@article{luo2023wizardcoder,
title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
author={Luo, Ziyang and Xu, Can and Zhao, Pu and Sun, Qingfeng and Geng, Xiubo and Hu, Wenxiang and Tao, Chongyang and Ma, Jing and Lin, Qingwei and Jiang, Daxin},
journal={arXiv preprint arXiv:2306.08568},
year={2023}
}