SkyWork
commited on
Commit
•
581b698
1
Parent(s):
1f6fe3d
Upload README_SkyCode_en.md
Browse files- README_SkyCode_en.md +62 -0
README_SkyCode_en.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SkyCode
|
2 |
+
|
3 |
+
SkyCode is a multi-language open source programming model released by Singularity-AI. It adopts the GPT3 model structure and uses a large amount of code for training. Support Java, JavaScript, C, C++, Python, Go, shell and other mainstream programming languages, and can understand Chinese comments. The model can complete the code, solve problems and other operations, freeing you from programming and focusing on solving larger problems.
|
4 |
+
|
5 |
+
|
6 |
+
## Project Highlights
|
7 |
+
|
8 |
+
1. Technical advantage 1: covering multiple programming languages
|
9 |
+
|
10 |
+
Different programming languages focus on solving problems in different platforms and environments, and different programming languages have their own reasons for existence. The codes that Singularity SkyCode can generate not only include widely used JavaScript, python, Java, C, etc., but also cover more than ten programming languages such as php, go, and swift, so that users of different languages can experience SkyCode has powerful code generation capabilities.
|
11 |
+
|
12 |
+
|
13 |
+
2. Technical advantage 2: optimize for Chinese annotations
|
14 |
+
|
15 |
+
In the field of pre-training large models, it has always been dominated by the English community. The code generation model based on GPT3 has the same problem. Relying on the experience of deeply cultivating Chinese models, Singularity-AI optimized and innovated a unique Chinese encoding method according to the characteristics of Chinese, which is more in line with Chinese language habits, making the model's ability to understand Chinese annotations better.
|
16 |
+
|
17 |
+
3. Technical advantage 3: excellent problem-solving ability
|
18 |
+
|
19 |
+
On the HumanEval data set that reflects the problem-solving ability of the code generation model, the problem-solving ability of SkyCode is also much higher than that of other open source models.
|
20 |
+
|
21 |
+
| model | pass@1 | pass@10 | pass@100 |
|
22 |
+
|:-------------- | ------:|:-------:| -------- |
|
23 |
+
| GPT-Neo 1.3B | 4.79% | 7.47% | 16.30% |
|
24 |
+
| GPT-Neo 2.7B | 6.41% | 11.27% | 21.37% |
|
25 |
+
| GPT-J 6B | 11.62% | 15.74% | 27.74% |
|
26 |
+
| SKY_code(2.6B) | 12.84% | 21.07% | 35.97% |
|
27 |
+
|
28 |
+
It can be seen that SkyCode with a parameter quantity of 2.6B is not only much higher than the GPT-Neo 1.3B model with fewer parameters, but also much higher than the GPT-Neo 2.7B model with a comparable parameter quantity. Even compared to the GPT-J 6B model with a higher number of parameters, SkyCode's problem-solving ability is stronger. In the pass@100 indicator that better reflects the upper limit of problem-solving ability, SkyCode's net value exceeds GPT-J by 8.23%.
|
29 |
+
|
30 |
+
|
31 |
+
# News of Singularity-AI
|
32 |
+
|
33 |
+
- [2022.12.15] [AIGC Press Conference of Singularity-AI](https://live.vhall.com/v3/lives/subscribe/697547540)
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
## Installation
|
38 |
+
|
39 |
+
```
|
40 |
+
Recommand
|
41 |
+
transformers>=4.18.0
|
42 |
+
```
|
43 |
+
|
44 |
+
## Model Usage
|
45 |
+
|
46 |
+
```python
|
47 |
+
# -*- coding: utf-8 -*-
|
48 |
+
from transformers import GPT2LMHeadModel
|
49 |
+
from transformers import AutoTokenizer
|
50 |
+
from transformers import TextGenerationPipeline
|
51 |
+
|
52 |
+
model = GPT2LMHeadModel.from_pretrained("SkyWork/SkyCode")
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained("SkyWork/SkyCode", trust_remote_code=True)
|
54 |
+
text_generator = TextGenerationPipeline(model, tokenizer, device=0)
|
55 |
+
input_str = "if __name__"
|
56 |
+
max_new_tokens = 40
|
57 |
+
print(text_generator(input_str, max_new_tokens=max_new_tokens, do_sample=True))###
|
58 |
+
```
|
59 |
+
|
60 |
+
# License
|
61 |
+
|
62 |
+
[MIT License](LICENSE)
|