Instructions to use microsoft/wavecoder-pro-6.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/wavecoder-pro-6.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/wavecoder-pro-6.7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/wavecoder-pro-6.7b") model = AutoModelForCausalLM.from_pretrained("microsoft/wavecoder-pro-6.7b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use microsoft/wavecoder-pro-6.7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/wavecoder-pro-6.7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/wavecoder-pro-6.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/microsoft/wavecoder-pro-6.7b
- SGLang
How to use microsoft/wavecoder-pro-6.7b 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 "microsoft/wavecoder-pro-6.7b" \ --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": "microsoft/wavecoder-pro-6.7b", "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 "microsoft/wavecoder-pro-6.7b" \ --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": "microsoft/wavecoder-pro-6.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use microsoft/wavecoder-pro-6.7b with Docker Model Runner:
docker model run hf.co/microsoft/wavecoder-pro-6.7b
Commit Β·
12930ff
1
Parent(s): fbbb799
update usage
Browse files
README.md
CHANGED
|
@@ -2,21 +2,21 @@
|
|
| 2 |
license: mit
|
| 3 |
license_link: https://huggingface.co/microsoft/wavecoder-pro-6.7b/blob/main/LICENSE
|
| 4 |
language:
|
| 5 |
-
- en
|
| 6 |
library_name: transformers
|
| 7 |
datasets:
|
| 8 |
-
- humaneval
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
tags:
|
| 11 |
-
- code
|
| 12 |
metrics:
|
| 13 |
-
- code_eval
|
| 14 |
---
|
|
|
|
| 15 |
<h1 align="center">
|
| 16 |
π WaveCoder: Widespread And Versatile Enhanced Code LLM
|
| 17 |
</h1>
|
| 18 |
|
| 19 |
-
|
| 20 |
<p align="center">
|
| 21 |
<a href="https://arxiv.org/abs/2312.14187"><b>[π Paper]</b></a> β’
|
| 22 |
<!-- <a href=""><b>[π€ HF Models]</b></a> β’ -->
|
|
@@ -33,31 +33,43 @@ metrics:
|
|
| 33 |
Repo for "<a href="https://arxiv.org/abs/2312.14187" target="_blank">WaveCoder: Widespread And Versatile Enhanced Instruction Tuning with Refined Data Generation</a>"
|
| 34 |
</p>
|
| 35 |
|
| 36 |
-
|
| 37 |
## π₯ News
|
| 38 |
|
| 39 |
-
- [2024/04/10] π₯π₯π₯
|
| 40 |
- [2023/12/26] WaveCoder paper released.
|
|
|
|
| 41 |
## π‘ Introduction
|
| 42 |
|
| 43 |
-
WaveCoder π is a series of large language models (LLMs) for the coding domain, designed to solve relevant problems in the field of code through instruction-following learning. Its training dataset was generated from a subset of code-search-net data using a generator-discriminator framework based on LLMs that we proposed, covering four general code-related tasks: code generation, code summary, code translation, and code repair.
|
| 44 |
|
| 45 |
-
| Model
|
| 46 |
-
|---|---|---|---|---|
|
| 47 |
-
| GPT-4
|
| 48 |
-
| [π WaveCoder-DS-6.7B](https://huggingface.co/microsoft/wavecoder-ds-6.7b)
|
| 49 |
-
| [π WaveCoder-Pro-6.7B](https://huggingface.co/microsoft/wavecoder-pro-6.7b)
|
| 50 |
-
| [π WaveCoder-Ultra-6.7B](https://huggingface.co/microsoft/wavecoder-ultra-6.7b) | 79.9
|
| 51 |
|
| 52 |
## πͺ Evaluation
|
| 53 |
|
| 54 |
Please refer to WaveCoder's [GitHub repo](https://github.com/microsoft/WaveCoder) for inference, evaluation, and training code.
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
## π License
|
| 58 |
-
This code repository is licensed under the MIT License. The use of DeepSeek Coder models is subject to the its [License](https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL).
|
| 59 |
-
|
| 60 |
|
|
|
|
| 61 |
|
| 62 |
## βοΈ Citation
|
| 63 |
|
|
@@ -71,6 +83,7 @@ If you find this repository helpful, please consider citing our paper:
|
|
| 71 |
year={2023}
|
| 72 |
}
|
| 73 |
```
|
|
|
|
| 74 |
## Note
|
| 75 |
|
| 76 |
-
WaveCoder models are trained on the synthetic data generated by OpenAI models. Please pay attention to OpenAI's [terms of use](https://openai.com/policies/terms-of-use) when using the models and the datasets.
|
|
|
|
| 2 |
license: mit
|
| 3 |
license_link: https://huggingface.co/microsoft/wavecoder-pro-6.7b/blob/main/LICENSE
|
| 4 |
language:
|
| 5 |
+
- en
|
| 6 |
library_name: transformers
|
| 7 |
datasets:
|
| 8 |
+
- humaneval
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
tags:
|
| 11 |
+
- code
|
| 12 |
metrics:
|
| 13 |
+
- code_eval
|
| 14 |
---
|
| 15 |
+
|
| 16 |
<h1 align="center">
|
| 17 |
π WaveCoder: Widespread And Versatile Enhanced Code LLM
|
| 18 |
</h1>
|
| 19 |
|
|
|
|
| 20 |
<p align="center">
|
| 21 |
<a href="https://arxiv.org/abs/2312.14187"><b>[π Paper]</b></a> β’
|
| 22 |
<!-- <a href=""><b>[π€ HF Models]</b></a> β’ -->
|
|
|
|
| 33 |
Repo for "<a href="https://arxiv.org/abs/2312.14187" target="_blank">WaveCoder: Widespread And Versatile Enhanced Instruction Tuning with Refined Data Generation</a>"
|
| 34 |
</p>
|
| 35 |
|
|
|
|
| 36 |
## π₯ News
|
| 37 |
|
| 38 |
+
- [2024/04/10] π₯π₯π₯ WaveCoder repo, models released at [π€ HuggingFace](https://huggingface.co/microsoft/wavecoder-ultra-6.7b)!
|
| 39 |
- [2023/12/26] WaveCoder paper released.
|
| 40 |
+
|
| 41 |
## π‘ Introduction
|
| 42 |
|
| 43 |
+
WaveCoder π is a series of large language models (LLMs) for the coding domain, designed to solve relevant problems in the field of code through instruction-following learning. Its training dataset was generated from a subset of code-search-net data using a generator-discriminator framework based on LLMs that we proposed, covering four general code-related tasks: code generation, code summary, code translation, and code repair.
|
| 44 |
|
| 45 |
+
| Model | HumanEval | MBPP(500) | HumanEval<br>Fix(Avg.) | HumanEval<br>Explain(Avg.) |
|
| 46 |
+
| -------------------------------------------------------------------------------- | --------- | --------- | ---------------------- | -------------------------- |
|
| 47 |
+
| GPT-4 | 85.4 | - | 47.8 | 52.1 |
|
| 48 |
+
| [π WaveCoder-DS-6.7B](https://huggingface.co/microsoft/wavecoder-ds-6.7b) | 65.8 | 63.0 | 49.5 | 40.8 |
|
| 49 |
+
| [π WaveCoder-Pro-6.7B](https://huggingface.co/microsoft/wavecoder-pro-6.7b) | 74.4 | 63.4 | 52.1 | 43.0 |
|
| 50 |
+
| [π WaveCoder-Ultra-6.7B](https://huggingface.co/microsoft/wavecoder-ultra-6.7b) | 79.9 | 64.6 | 52.3 | 45.7 |
|
| 51 |
|
| 52 |
## πͺ Evaluation
|
| 53 |
|
| 54 |
Please refer to WaveCoder's [GitHub repo](https://github.com/microsoft/WaveCoder) for inference, evaluation, and training code.
|
| 55 |
|
| 56 |
+
## How to get start with the model
|
| 57 |
+
|
| 58 |
+
```python
|
| 59 |
+
# Load model directly
|
| 60 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 61 |
+
# Load model directly
|
| 62 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 63 |
+
|
| 64 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/wavecoder-ds-6.7b")
|
| 65 |
+
model = AutoModelForCausalLM.from_pretrained("microsoft/wavecoder-ds-6.7b")
|
| 66 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/wavecoder-ds-6.7b")
|
| 67 |
+
model = AutoModelForCausalLM.from_pretrained("microsoft/wavecoder-ds-6.7b")
|
| 68 |
+
```
|
| 69 |
|
| 70 |
## π License
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
This code repository is licensed under the MIT License. The use of DeepSeek Coder models is subject to the its [License](https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL).
|
| 73 |
|
| 74 |
## βοΈ Citation
|
| 75 |
|
|
|
|
| 83 |
year={2023}
|
| 84 |
}
|
| 85 |
```
|
| 86 |
+
|
| 87 |
## Note
|
| 88 |
|
| 89 |
+
WaveCoder models are trained on the synthetic data generated by OpenAI models. Please pay attention to OpenAI's [terms of use](https://openai.com/policies/terms-of-use) when using the models and the datasets.
|