RichardErkhov
commited on
Commit
β’
94ade6b
1
Parent(s):
fe8ea4b
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
ReflectionCoder-CL-34B - GGUF
|
11 |
+
- Model creator: https://huggingface.co/SenseLLM/
|
12 |
+
- Original model: https://huggingface.co/SenseLLM/ReflectionCoder-CL-34B/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [ReflectionCoder-CL-34B.Q2_K.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q2_K.gguf) | Q2_K | 11.65GB |
|
18 |
+
| [ReflectionCoder-CL-34B.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q3_K_S.gguf) | Q3_K_S | 13.6GB |
|
19 |
+
| [ReflectionCoder-CL-34B.Q3_K.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q3_K.gguf) | Q3_K | 15.19GB |
|
20 |
+
| [ReflectionCoder-CL-34B.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q3_K_M.gguf) | Q3_K_M | 15.19GB |
|
21 |
+
| [ReflectionCoder-CL-34B.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q3_K_L.gguf) | Q3_K_L | 16.55GB |
|
22 |
+
| [ReflectionCoder-CL-34B.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.IQ4_XS.gguf) | IQ4_XS | 16.99GB |
|
23 |
+
| [ReflectionCoder-CL-34B.Q4_0.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q4_0.gguf) | Q4_0 | 17.74GB |
|
24 |
+
| [ReflectionCoder-CL-34B.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.IQ4_NL.gguf) | IQ4_NL | 17.92GB |
|
25 |
+
| [ReflectionCoder-CL-34B.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q4_K_S.gguf) | Q4_K_S | 17.87GB |
|
26 |
+
| [ReflectionCoder-CL-34B.Q4_K.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q4_K.gguf) | Q4_K | 18.83GB |
|
27 |
+
| [ReflectionCoder-CL-34B.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q4_K_M.gguf) | Q4_K_M | 18.83GB |
|
28 |
+
| [ReflectionCoder-CL-34B.Q4_1.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q4_1.gguf) | Q4_1 | 19.69GB |
|
29 |
+
| [ReflectionCoder-CL-34B.Q5_0.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q5_0.gguf) | Q5_0 | 21.64GB |
|
30 |
+
| [ReflectionCoder-CL-34B.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q5_K_S.gguf) | Q5_K_S | 21.64GB |
|
31 |
+
| [ReflectionCoder-CL-34B.Q5_K.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q5_K.gguf) | Q5_K | 22.2GB |
|
32 |
+
| [ReflectionCoder-CL-34B.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q5_K_M.gguf) | Q5_K_M | 22.2GB |
|
33 |
+
| [ReflectionCoder-CL-34B.Q5_1.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q5_1.gguf) | Q5_1 | 23.59GB |
|
34 |
+
| [ReflectionCoder-CL-34B.Q6_K.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q6_K.gguf) | Q6_K | 25.78GB |
|
35 |
+
| [ReflectionCoder-CL-34B.Q8_0.gguf](https://huggingface.co/RichardErkhov/SenseLLM_-_ReflectionCoder-CL-34B-gguf/blob/main/ReflectionCoder-CL-34B.Q8_0.gguf) | Q8_0 | 33.39GB |
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
Original model description:
|
41 |
+
---
|
42 |
+
license: apache-2.0
|
43 |
+
datasets:
|
44 |
+
- SenseLLM/ReflectionSeq-GPT
|
45 |
+
- SenseLLM/ReflectionSeq-DS
|
46 |
+
language:
|
47 |
+
- en
|
48 |
+
---
|
49 |
+
## ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation
|
50 |
+
|
51 |
+
<p align="center">
|
52 |
+
<a href="https://arxiv.org/abs/2405.17057">π Paper</a> β’
|
53 |
+
<a href="https://github.com/SenseLLM/ReflectionCoder">π Repo</a> β’
|
54 |
+
<a href="https://huggingface.co/SenseLLM/ReflectionCoder-DS-33B">π€ Models</a> β’
|
55 |
+
<a href="https://huggingface.co/datasets/SenseLLM/ReflectionSeq-GPT">π Datasets </a>
|
56 |
+
</p>
|
57 |
+
|
58 |
+
## Introduction
|
59 |
+
ReflectionCoder is a novel approach that effectively leverages reflection sequences constructed by integrating compiler feedback to improve one-off code generation performance. Please refer to our paper and repo for more details!
|
60 |
+
|
61 |
+
![](method.png)
|
62 |
+
|
63 |
+
<hr>
|
64 |
+
|
65 |
+
## Models
|
66 |
+
|
67 |
+
| Model | Checkpoint | Size | HumanEval (+) | MBPP (+) | License|
|
68 |
+
|:-------|:------------|:------|:---------------|:----------|:--------|
|
69 |
+
| ReflectionCoder-CL-7B | π€ [HF Link](https://huggingface.co/SenseLLM/ReflectionCoder-CL-7B) | 7B | 75.0 (68.9) | 72.2 (61.4) | [Llama2](https://ai.meta.com/llama/license/) |
|
70 |
+
| ReflectionCoder-CL-34B | π€ [HF Link](https://huggingface.co/SenseLLM/ReflectionCoder-CL-34B) | 34B | 70.7 (66.5) | 68.4 (56.6) | [Llama2](https://ai.meta.com/llama/license/) |
|
71 |
+
| ReflectionCoder-DS-6.7B | π€ [HF Link](https://huggingface.co/SenseLLM/ReflectionCoder-DS-6.7B) | 6.7B | 80.5 (74.4) | 81.5 (69.6) | [DeepSeek](https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL) |
|
72 |
+
| ReflectionCoder-DS-33B | π€ [HF Link](https://huggingface.co/SenseLLM/ReflectionCoder-DS-33B) | 33B | 82.9 (76.8) | 84.1 (72.0) | [DeepSeek](https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/LICENSE-MODEL) |
|
73 |
+
|
74 |
+
## Datasets
|
75 |
+
|
76 |
+
| Dataset | Link | License |
|
77 |
+
|:-------------------|:----------------|:----------------------------------------------|
|
78 |
+
| ReflectionSeq-GPT | π€ [HF Link](https://huggingface.co/datasets/SenseLLM/ReflectionSeq-GPT) | [License](LICENSE) |
|
79 |
+
| ReflectionSeq-DS | π€ [HF Link](https://huggingface.co/datasets/SenseLLM/ReflectionSeq-DS) | [License](LICENSE) |
|
80 |
+
|
81 |
+
|
82 |
+
## How to Use
|
83 |
+
|
84 |
+
#### Chat Format
|
85 |
+
Following chat templates of most models, we use two special tokens to wrap the message of user and assistant, *i.e.*, ``<|user|>``, ``<|assistant|>``, and ``<|endofmessage|>``. Furthermore, we use two special tokens to wrap the content of different blocks, *i.e.*, ``<|text|>`` and ``<|endofblock|>``. You can use the following template to prompt our ReflectionCoder.
|
86 |
+
|
87 |
+
```python
|
88 |
+
import torch
|
89 |
+
from transformers import pipeline
|
90 |
+
|
91 |
+
chat = [
|
92 |
+
{"role": "user", "content": "<Your code instruction here>"}
|
93 |
+
]
|
94 |
+
|
95 |
+
generator = pipeline(
|
96 |
+
model="SenseLLM/ReflectionCoder-CL-34B",
|
97 |
+
task="text-generation",
|
98 |
+
torch_dtype=torch.bfloat16,
|
99 |
+
device_map="auto",
|
100 |
+
)
|
101 |
+
|
102 |
+
result = generator(chat, max_length=128, num_return_sequences=1)
|
103 |
+
|
104 |
+
print(result)
|
105 |
+
```
|
106 |
+
|
107 |
+
Please refer to our [GitHub Repo](https://github.com/SenseLLM/ReflectionCoder) for more technical details.
|
108 |
+
|
109 |
+
## Citation
|
110 |
+
|
111 |
+
If you find this repo useful for your research, please kindly cite our paper:
|
112 |
+
```
|
113 |
+
@misc{ren2024reflectioncoder,
|
114 |
+
title={ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation},
|
115 |
+
author={Houxing Ren and Mingjie Zhan and Zhongyuan Wu and Aojun Zhou and Junting Pan and Hongsheng Li},
|
116 |
+
year={2024},
|
117 |
+
eprint={2405.17057},
|
118 |
+
archivePrefix={arXiv},
|
119 |
+
primaryClass={cs.CL}
|
120 |
+
}
|
121 |
+
```
|
122 |
+
|
123 |
+
## Acknowledgments
|
124 |
+
|
125 |
+
We thank the following amazing projects that truly inspired us:
|
126 |
+
|
127 |
+
- [CodeLlama](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)
|
128 |
+
- [DeepSeek-Coder](https://github.com/deepseek-ai/DeepSeek-Coder)
|
129 |
+
- [WizardCoder](https://github.com/nlpxucan/WizardLM/tree/main/WizardCoder)
|
130 |
+
- [Evol-CodeAlpaca-v1](https://huggingface.co/datasets/theblackcat102/evol-codealpaca-v1)
|
131 |
+
- [MagiCoder](https://github.com/ise-uiuc/magicoder/tree/main)
|
132 |
+
- [EvalPlus](https://github.com/evalplus/evalplus)
|
133 |
+
- [OpenCoderInterpreter](https://github.com/OpenCodeInterpreter/OpenCodeInterpreter/tree/main)
|
134 |
+
|