Text Generation
Transformers
Safetensors
llama
code
Eval Results
text-generation-inference
Inference Endpoints
wyt2000's picture
Update README.md
388f222 verified
|
raw
history blame
No virus
7.09 kB
---
license: other
license_name: deepseek
license_link: LICENSE
datasets:
- wyt2000/InverseCoder-DS-6.7B-Evol-Instruct-90K
- ise-uiuc/Magicoder-Evol-Instruct-110K
library_name: transformers
pipeline_tag: text-generation
tags:
- code
model-index:
- name: InverseCoder-DS-6.7B
results:
- task:
type: text-generation
dataset:
type: openai_humaneval
name: HumanEval
metrics:
- name: pass@1
type: pass@1
value: 0.799
verified: false
- task:
type: text-generation
dataset:
type: openai_humaneval
name: HumanEval(+)
metrics:
- name: pass@1
type: pass@1
value: 0.768
verified: false
- task:
type: text-generation
dataset:
type: mbpp
name: MBPP
metrics:
- name: pass@1
type: pass@1
value: 0.786
verified: false
- task:
type: text-generation
dataset:
type: mbpp
name: MBPP(+)
metrics:
- name: pass@1
type: pass@1
value: 0.690
verified: false
- task:
type: text-generation
dataset:
type: ds1000
name: DS-1000 (Overall Completion)
metrics:
- name: pass@1
type: pass@1
value: 0.442
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (Java)
metrics:
- name: pass@1
type: pass@1
value: 0.607
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (JavaScript)
metrics:
- name: pass@1
type: pass@1
value: 0.701
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (C++)
metrics:
- name: pass@1
type: pass@1
value: 0.705
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (PHP)
metrics:
- name: pass@1
type: pass@1
value: 0.636
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (Swift)
metrics:
- name: pass@1
type: pass@1
value: 0.530
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (Rust)
metrics:
- name: pass@1
type: pass@1
value: 0.574
verified: false
- task:
type: text-generation
dataset:
type: nuprl/MultiPL-E
name: MultiPL-HumanEval (Average for non-python languages)
metrics:
- name: pass@1
type: pass@1
value: 0.626
verified: false
---
<div align="center">
<img src="https://huggingface.co/wyt2000/InverseCoder-CL-7B/resolve/main/assets/logo.png" style="zoom:25%;" />
</div>
# InverseCoder: Unleashing the Power of Instruction-Tuned Code LLMs with Inverse-Instruct
<img src="https://huggingface.co/wyt2000/InverseCoder-CL-7B/resolve/main/assets/overview.png" style="zoom:50%;" />
InverseCoder is a series of code LLMs instruction-tuned by generating data from itself through Inverse-Instruct.
## Models and Datasets
| | Base Model | InverseCoder | Dataset |
| --- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| 6.7B | [deepseek-ai/deepseek-coder-6.7b-base](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-base) | [wyt2000/InverseCoder-DS-6.7B](https://huggingface.co/wyt2000/InverseCoder-DS-6.7B) **<= You are here** | [wyt2000/InverseCoder-DS-6.7B-Evol-Instruct-90K](https://huggingface.co/datasets/wyt2000/InverseCoder-DS-6.7B-Evol-Instruct-90K) |
| 7B | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [wyt2000/InverseCoder-CL-7B](https://huggingface.co/wyt2000/InverseCoder-CL-7B) | [wyt2000/InverseCoder-CL-7B-Evol-Instruct-90K](https://huggingface.co/datasets/wyt2000/InverseCoder-CL-7B-Evol-Instruct-90K) |
| 13B | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [wyt2000/InverseCoder-CL-13B](https://huggingface.co/wyt2000/InverseCoder-CL-13B) | [wyt2000/InverseCoder-CL-13B-Evol-Instruct-90K](https://huggingface.co/datasets/wyt2000/InverseCoder-CL-13B-Evol-Instruct-90K) |
## Usage
Similar to [Magicoder-S-DS-6.7B](https://huggingface.co/ise-uiuc/Magicoder-S-DS-6.7B/), use the code below to get started with the model. Make sure you installed the [transformers](https://huggingface.co/docs/transformers/index) library.
```python
from transformers import pipeline
import torch
INVERSECODER_PROMPT = """You are an exceptionally intelligent coding assistant that consistently delivers accurate and reliable responses to user instructions.
@@ Instruction
{instruction}
@@ Response
"""
instruction = <Your code instruction here>
prompt = INVERSECODER_PROMPT.format(instruction=instruction)
generator = pipeline(
model="wyt2000/InverseCoder-DS-6.7B",
task="text-generation",
torch_dtype=torch.bfloat16,
device_map="auto",
)
result = generator(prompt, max_length=1024, num_return_sequences=1, temperature=0.0)
print(result[0]["generated_text"])
```
## Paper
**Arxiv:** <https://arxiv.org/abs/2407.05700>
Please cite the paper if you use the models or datasets from InverseCoder.
```
@misc{wu2024inversecoderunleashingpowerinstructiontuned,
title={InverseCoder: Unleashing the Power of Instruction-Tuned Code LLMs with Inverse-Instruct},
author={Yutong Wu and Di Huang and Wenxuan Shi and Wei Wang and Lingzhe Gao and Shihao Liu and Ziyuan Nan and Kaizhao Yuan and Rui Zhang and Xishan Zhang and Zidong Du and Qi Guo and Yewen Pu and Dawei Yin and Xing Hu and Yunji Chen},
year={2024},
eprint={2407.05700},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2407.05700},
}
```
## Code
[Official code repo](https://github.com/wyt2000/InverseCoder) for Inverse-Instruct (under development).
## Acknowledgements
* [Magicoder](https://github.com/ise-uiuc/magicoder): Training code, original datasets and data decontamination
* [DeepSeek-Coder](https://github.com/deepseek-ai/DeepSeek-Coder): Base model for InverseCoder-DS
* [CodeLlama](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/): Base model for InverseCoder-CL
* [AutoMathText](https://github.com/yifanzhang-pro/AutoMathText): Self-evaluation and data selection method