模型:
TheBloke/WizardCoder-15B-1.0-GGML
 Chat & support: my new Discord server
Want to contribute? TheBloke's Patreon page
这些文件是 WizardLM's WizardCoder 15B 1.0 的GGML格式的模型文件。
请注意,这些GGML与llama.cpp或目前的text-generation-webui不兼容。请参阅下面的已知与这些模型文件工作的工具列表。
Below is an instruction that describes a task. Write a response that appropriately completes the request ### Instruction: prompt ### Response:
Matt Hoeffner 在绝地中放了一个演示这个模型的实时空间:
这些文件与llama.cpp不兼容。
当前可以使用它们的是:
如果有其他可用的选项,我会尽力在这里更新它们(如果我遗漏了,请在社区选项卡中告诉我!)
| Name | Quant method | Bits | Size | Max RAM required | Use case | 
|---|---|---|---|---|---|
| WizardCoder-15B-1.0.ggmlv3.q4_0.bin | q4_0 | 4 | 10.75 GB | 13.25 GB | 4-bit. | 
| WizardCoder-15B-1.0.ggmlv3.q4_1.bin | q4_1 | 4 | 11.92 GB | 14.42 GB | 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. | 
| WizardCoder-15B-1.0.ggmlv3.q5_0.bin | q5_0 | 5 | 13.09 GB | 15.59 GB | 5-bit. Higher accuracy, higher resource usage and slower inference. | 
| WizardCoder-15B-1.0.ggmlv3.q5_1.bin | q5_1 | 5 | 14.26 GB | 16.76 GB | 5-bit. Even higher accuracy, resource usage and slower inference. | 
| WizardCoder-15B-1.0.ggmlv3.q8_0.bin | q8_0 | 8 | 20.11 GB | 22.61 GB | 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. | 
如需进一步支持,以及关于这些模型和人工智能的讨论,请加入我们:
感谢 chirper.ai 团队!
我有很多人问我是否可以做出贡献。我喜欢提供模型和帮助人们,我很愿意能够花更多时间做这些事情,以及扩展到新的项目,如细调/训练。
如果您有能力和意愿进行贡献,我将非常感激,并将帮助我继续提供更多的模型,并开始进行新的人工智能项目。
捐赠者将在任何以及所有的AI/LLM/模型问题和请求上获得优先支持,可以进入私人Discord聊天室,并享受其他福利。
特别感谢:CarbonQuill的Luke,Aemon Algiz,Dmitriy Samsonov。
Patreon特别提到:Oscar Rangel,Eugene Pentland,Talal Aujan,Cory Kujawski,Luke,Asp the Wyvern,Ai Maven,Pyrater,Alps Aficionado,senxiiz,Willem Michiel,Junyu Yang,trip7s trip,Sebastain Graf,Joseph William Delisle,Lone Striker,Jonathan Leane,Johann-Peter Hartmann,David Flickinger,Spiking Neurons AB,Kevin Schuppel,Mano Prime,Dmitriy Samsonov,Sean Connelly,Nathan LeClaire,Alain Rossmann,Fen Risland,Derek Yates,Luke Pendergrass,Nikolai Manek,Khalefa Al-Ahmad,Artur Olbinski,John Detwiler,Ajan Kanaga,Imad Khwaja,Trenton Dambrowitz,Kalila,vamX,webtim,Illia Dulskyi。
感谢所有慷慨的赞助者和捐赠者!
这是WizardCoder的完整版本。
存储库: https://github.com/nlpxucan/WizardLM/tree/main/WizardCoder
Twitter: https://twitter.com/WizardLM_AI/status/1669109414559911937
论文:即将推出,使用全新的Evol+方法进行代码LLM。
演示(目前仅支持与代码相关的英语指令):
Demo , Backup Demo1 , Backup Demo2 , Backup Demo3
为了开发我们的WizardCoder模型,我们首先针对编码任务调整了Evol-Instruct方法。这涉及将提示定制为与代码相关的域。随后,我们使用新创建的遵循指令的训练集对Code LLM StarCoder进行了微调。
🔥下图显示了我们的WizardCoder在这个基准测试中获得第三名,超过了Claude-Plus(59.8对53.0)和Bard(59.8对44.5)。值得注意的是,我们的模型相对于这些模型具有更小的尺寸。
  ❗注意:在这项研究中,我们从 LLM-Humaneval-Benchmarks 复制了HumanEval和HumanEval+的得分。值得注意的是,所有提到的模型都使用单次尝试为每个问题生成代码解决方案,并报告结果通过率百分比。我们的WizardCoder使用贪婪解码生成答案,并使用相同的测试进行测试。 code
下表清楚地证明了我们的WizardCoder在所有开源模型上具有显著的性能优势。❗如果您对我们模型的不同得分(57.3和59.8)感到困惑,请查看备注信息。
| Model | HumanEval Pass@1 | MBPP Pass@1 | 
|---|---|---|
| CodeGen-16B-Multi | 18.3 | 20.9 | 
| CodeGeeX | 22.9 | 24.4 | 
| LLaMA-33B | 21.7 | 30.2 | 
| LLaMA-65B | 23.7 | 37.7 | 
| PaLM-540B | 26.2 | 36.8 | 
| PaLM-Coder-540B | 36.0 | 47.0 | 
| PaLM 2-S | 37.6 | 50.0 | 
| CodeGen-16B-Mono | 29.3 | 35.3 | 
| Code-Cushman-001 | 33.5 | 45.9 | 
| StarCoder-15B | 33.6 | 43.6* | 
| InstructCodeT5+ | 35.0 | -- | 
| WizardLM-30B 1.0 | 37.8 | -- | 
| WizardCoder-15B 1.0 | 57.3 | 51.8 | 
❗注意:复现了MBPP上StarCoder的结果。
❗注意:上表对我们的WizardCoder与其他模型在HumanEval和MBPP基准测试上进行了全面比较。我们遵循以前研究中概述的方法,为每个问题生成20个样本,以估计pass@1分数,并使用相同的测试进行评估。 OpenAI 报告的GPT4和GPT3.5的得分分别为67.0和48.1(可能是早期版本的GPT4&3.5)。
我们欢迎每个人使用您的专业和困难的指令来评估WizardCoder,并向我们展示性能差的示例以及您对更好的建议。我们现在正在致力于改进Evol-Instruct,并希望在下一个版本的WizardCoder中解决现有的缺点和问题。之后,我们将公开最新的Evol-Instruct算法的代码和流程,并与您一起改进它。
在线演示
微调
推断
评估
引用
声明
我们将尽可能长时间地为您提供最新型号的试用版。如果某个链接无效,请尝试另一个链接。同时,请尽可能多地尝试您在工作和生活中遇到的真实且具有挑战性的与代码相关的问题。我们将根据您的反馈不断改进我们的模型。
我们使用 Llama-X 中修改的代码train.py来微调WizardCoder。我们使用以下超参数对StarCoder-15B进行微调:
| Hyperparameter | StarCoder-15B | 
|---|---|
| Batch size | 512 | 
| Learning rate | 2e-5 | 
| Epochs | 3 | 
| Max length | 2048 | 
| Warmup step | 30 | 
| LR scheduler | cosine | 
要复现我们对WizardCoder的微调,请按照以下步骤进行操作:
huggingface-cli login
deepspeed train_wizardcoder.py \
    --model_name_or_path "bigcode/starcoder" \
    --data_path "/your/path/to/code_instruction_data.json" \
    --output_dir "/your/path/to/ckpt" \
    --num_train_epochs 3 \
    --model_max_length 2048 \
    --per_device_train_batch_size 16 \
    --per_device_eval_batch_size 1 \
    --gradient_accumulation_steps 4 \
    --evaluation_strategy "no" \
    --save_strategy "steps" \
    --save_steps 50 \
    --save_total_limit 2 \
    --learning_rate 2e-5 \
    --warmup_steps 30 \
    --logging_steps 2 \
    --lr_scheduler_type "cosine" \
    --report_to "tensorboard" \
    --gradient_checkpointing True \
    --deepspeed configs/deepspeed_config.json \
    --fp16 True
 我们提供了用于WizardCoder的解码脚本,该脚本读取输入文件并为每个样本生成相应的响应,最后将它们合并到输出文件中。
您可以在src/ inference_wizardcoder.py 中指定base_model、input_data_path和output_data_path来设置解码模型、输入文件路径和输出文件路径。
pip install jsonlines
解码命令为:
python src\inference_wizardcoder.py \
    --base_model "/your/path/to/ckpt" \
    --input_data_path "/your/path/to/input/data.jsonl" \
    --output_data_path "/your/path/to/output/result.jsonl"
 data.jsonl的格式应为:
{"idx": 11, "Instruction": "Write a Python code to count 1 to 10."}
{"idx": 12, "Instruction": "Write a Jave code to sum 1 to 10."}
 在我们的WizardCoder的src/inference_wizardcoder.py中的提示为:
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Response:
 我们提供了在HumanEval上对WizardCoder进行评估的脚本。
model="/path/to/your/model"
temp=0.2
max_len=2048
pred_num=200
num_seqs_per_iter=2
output_path=preds/T${temp}_N${pred_num}
mkdir -p ${output_path}
echo 'Output path: '$output_path
echo 'Model to eval: '$model
# 164 problems, 21 per GPU if GPU=8
index=0
gpu_num=8
for ((i = 0; i < $gpu_num; i++)); do
  start_index=$((i * 21))
  end_index=$(((i + 1) * 21))
  gpu=$((i))
  echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
  ((index++))
  (
    CUDA_VISIBLE_DEVICES=$gpu python humaneval_gen.py --model ${model} \
      --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
      --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path}
  ) &
  if (($index % $gpu_num == 0)); then wait; fi
done
 output_path=preds/T${temp}_N${pred_num}
echo 'Output path: '$output_path
python process_humaneval.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
evaluate_functional_correctness ${output_path}.jsonl
 如果您在此存储库中使用数据或代码,请引用。
@misc{luo2023wizardcoder,
      title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct}, 
      author={Ziyang Luo and Can Xu and Pu Zhao and Qingfeng Sun and Xiubo Geng and Wenxiang Hu and Chongyang Tao and Jing Ma and Qingwei Lin and Daxin Jiang},
      year={2023},
}
 与此项目相关的资源(包括代码、数据和模型权重)仅限于学术研究目的,不能用于商业目的。任何版本的WizardCoder生成的内容都受到无法控制的变量(如随机性)的影响,因此无法保证输出结果的准确性。该项目不对模型输出的内容承担任何法律责任,也不对使用相关资源和输出结果导致的任何损失承担责任。