from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub
from transformers import AutoTokenizer
model_name = "michaelfeil/ct2fast-WizardCoder-15B-V1.0"# use either TranslatorCT2fromHfHub or GeneratorCT2fromHfHub here, depending on model.
model = GeneratorCT2fromHfHub(
# load in int8 on CUDA
model_name_or_path=model_name,
device="cuda",
compute_type="int8_float16",
# tokenizer=AutoTokenizer.from_pretrained("WizardLM/WizardCoder-15B-V1.0")
)
outputs = model.generate(
text=["def fibonnaci(", "User: How are you doing? Bot:"],
max_length=64,
include_prompt_in_result=False
)
print(outputs)
Licence and other remarks:
This is just a quantized version. Licence conditions are intended to be idential to original huggingface repo.
WizardCoder: Empowering Code Large Language Models with Evol-Instruct
To develop our WizardCoder model, we begin by adapting the Evol-Instruct method specifically for coding tasks. This involves tailoring the prompt to the domain of code-related instructions. Subsequently, we fine-tune the Code LLM, StarCoder, utilizing the newly created instruction-following training set.
News
🔥 Our
WizardCoder-15B-v1.0
model achieves the
57.3 pass@1
on the
HumanEval Benchmarks
, which is
22.3
points higher than the SOTA open-source Code LLMs.
🔥 We released
WizardCoder-15B-v1.0
trained with
78k
evolved code instructions. Please checkout the
Model Weights
, and
Paper
.
Comparing WizardCoder with the Closed-Source Models.
🔥 The following figure shows that our
WizardCoder attains the third position in this benchmark
, surpassing Claude-Plus (59.8 vs. 53.0) and Bard (59.8 vs. 44.5). Notably, our model exhibits a substantially smaller size compared to these models.
❗
Note: In this study, we copy the scores for HumanEval and HumanEval+ from the
LLM-Humaneval-Benchmarks
. Notably, all the mentioned models generate code solutions for each problem utilizing a
single attempt
, and the resulting pass rate percentage is reported. Our
WizardCoder
generates answers using greedy decoding and tests with the same
code
.
Comparing WizardCoder with the Open-Source Models.
The following table clearly demonstrates that our
WizardCoder
exhibits a substantial performance advantage over all the open-source models. ❗
If you are confused with the different scores of our model (57.3 and 59.8), please check the Notes.
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
❗
Note: The reproduced result of StarCoder on MBPP.
❗
Note: The above table conducts a comprehensive comparison of our
WizardCoder
with other models on the HumanEval and MBPP benchmarks. We adhere to the approach outlined in previous studies by generating
20 samples
for each problem to estimate the pass@1 score and evaluate with the same
code
. The scores of GPT4 and GPT3.5 reported by
OpenAI
are 67.0 and 48.1 (maybe these are the early version GPT4&3.5).
Call for Feedbacks
We welcome everyone to use your professional and difficult instructions to evaluate WizardCoder, and show us examples of poor performance and your suggestions in the
issue discussion
area. We are focusing on improving the Evol-Instruct now and hope to relieve existing weaknesses and issues in the the next version of WizardCoder. After that, we will open the code and pipeline of up-to-date Evol-Instruct algorithm and work with you together to improve it.
We will provide our latest models for you to try for as long as possible. If you find a link is not working, please try another one. At the same time, please try as many
real-world
and
challenging
code-related problems that you encounter in your work and life as possible. We will continue to evolve our models with your feedbacks.
Fine-tuning
We fine-tune WizardCoder using the modified code
train.py
from
Llama-X
.
We fine-tune StarCoder-15B with the following hyperparameters:
Hyperparameter
StarCoder-15B
Batch size
512
Learning rate
2e-5
Epochs
3
Max length
2048
Warmup step
30
LR scheduler
cosine
To reproduce our fine-tuning of WizardCoder, please follow the following steps:
According to the instructions of
Llama-X
, install the environment, download the training code, and deploy. (Note:
deepspeed==0.9.2
and
transformers==4.29.2
)
Replace the
train.py
with the
train_wizardcoder.py
in our repo (
src/train_wizardcoder.py
)
We provide the decoding script for WizardCoder, which reads a input file and generates corresponding responses for each sample, and finally consolidates them into an output file.
You can specify
base_model
,
input_data_path
and
output_data_path
in
src\inference_wizardcoder.py
to set the decoding model, path of input file and path of output file.
Please cite the repo if you use the data or code in this repo.
@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},
}
Disclaimer
The resources, including code, data, and model weights, associated with this project are restricted for academic research purposes only and cannot be used for commercial purposes. The content produced by any version of WizardCoder is influenced by uncontrollable variables such as randomness, and therefore, the accuracy of the output cannot be guaranteed by this project. This project does not accept any legal liability for the content of the model output, nor does it assume responsibility for any losses incurred due to the use of associated resources and output results.
Runs of michaelfeil ct2fast-WizardCoder-15B-V1.0 on huggingface.co
6
Total runs
0
24-hour runs
-1
3-day runs
2
7-day runs
-4
30-day runs
More Information About ct2fast-WizardCoder-15B-V1.0 huggingface.co Model
More ct2fast-WizardCoder-15B-V1.0 license Visit here:
ct2fast-WizardCoder-15B-V1.0 huggingface.co is an AI model on huggingface.co that provides ct2fast-WizardCoder-15B-V1.0's model effect (), which can be used instantly with this michaelfeil ct2fast-WizardCoder-15B-V1.0 model. huggingface.co supports a free trial of the ct2fast-WizardCoder-15B-V1.0 model, and also provides paid use of the ct2fast-WizardCoder-15B-V1.0. Support call ct2fast-WizardCoder-15B-V1.0 model through api, including Node.js, Python, http.
ct2fast-WizardCoder-15B-V1.0 huggingface.co is an online trial and call api platform, which integrates ct2fast-WizardCoder-15B-V1.0's modeling effects, including api services, and provides a free online trial of ct2fast-WizardCoder-15B-V1.0, you can try ct2fast-WizardCoder-15B-V1.0 online for free by clicking the link below.
michaelfeil ct2fast-WizardCoder-15B-V1.0 online free url in huggingface.co:
ct2fast-WizardCoder-15B-V1.0 is an open source model from GitHub that offers a free installation service, and any user can find ct2fast-WizardCoder-15B-V1.0 on GitHub to install. At the same time, huggingface.co provides the effect of ct2fast-WizardCoder-15B-V1.0 install, users can directly use ct2fast-WizardCoder-15B-V1.0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
ct2fast-WizardCoder-15B-V1.0 install url in huggingface.co: