Upload folder using huggingface_hub
Browse files- README.md +80 -0
- config.json +4 -0
- figures/fig1.png +0 -0
- figures/fig2.png +0 -0
- figures/fig3.png +0 -0
- pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
---
|
| 5 |
+
# CodeGenModel
|
| 6 |
+
|
| 7 |
+
<!-- markdownlint-disable first-line-h1 -->
|
| 8 |
+
<!-- markdownlint-disable html -->
|
| 9 |
+
<!-- markdownlint-disable no-duplicate-header -->
|
| 10 |
+
|
| 11 |
+
<div align="center">
|
| 12 |
+
<img src="figures/fig1.png" width="60%" alt="CodeGenModel" />
|
| 13 |
+
</div>
|
| 14 |
+
<hr>
|
| 15 |
+
|
| 16 |
+
<div align="center" style="line-height: 1;">
|
| 17 |
+
<a href="LICENSE" style="margin: 2px;">
|
| 18 |
+
<img alt="License" src="figures/fig2.png" style="display: inline-block; vertical-align: middle;"/>
|
| 19 |
+
</a>
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
## 1. Introduction
|
| 23 |
+
|
| 24 |
+
CodeGenModel is specialized for code generation tasks. This model has been selected as the best checkpoint based on code generation benchmark performance.
|
| 25 |
+
|
| 26 |
+
<p align="center">
|
| 27 |
+
<img width="80%" src="figures/fig3.png">
|
| 28 |
+
</p>
|
| 29 |
+
|
| 30 |
+
The model demonstrates outstanding performance in code-related tasks while maintaining strong general capabilities.
|
| 31 |
+
|
| 32 |
+
## 2. Evaluation Results
|
| 33 |
+
|
| 34 |
+
### Comprehensive Benchmark Results
|
| 35 |
+
|
| 36 |
+
<div align="center">
|
| 37 |
+
|
| 38 |
+
| | Benchmark | CodeModel-v1 | CodeModel-v2 | CodeGenModel |
|
| 39 |
+
|---|---|---|---|---|
|
| 40 |
+
| **Core Reasoning Tasks** | Math Reasoning | 0.510 | 0.535 | 0.550 |
|
| 41 |
+
| | Logical Reasoning | 0.789 | 0.801 | 0.819 |
|
| 42 |
+
| | Common Sense | 0.716 | 0.702 | 0.736 |
|
| 43 |
+
| **Language Understanding** | Reading Comprehension | 0.671 | 0.685 | 0.700 |
|
| 44 |
+
| | Question Answering | 0.582 | 0.599 | 0.607 |
|
| 45 |
+
| | Text Classification | 0.803 | 0.811 | 0.828 |
|
| 46 |
+
| | Sentiment Analysis | 0.777 | 0.781 | 0.792 |
|
| 47 |
+
| **Generation Tasks** | Code Generation | 0.615 | 0.631 | 0.650 |
|
| 48 |
+
| | Creative Writing | 0.588 | 0.579 | 0.644 |
|
| 49 |
+
| | Dialogue Generation | 0.621 | 0.635 | 0.767 |
|
| 50 |
+
| | Summarization | 0.745 | 0.755 | 0.767 |
|
| 51 |
+
| **Specialized Capabilities**| Translation | 0.782 | 0.799 | 0.804 |
|
| 52 |
+
| | Knowledge Retrieval | 0.651 | 0.668 | 0.676 |
|
| 53 |
+
| | Instruction Following | 0.733 | 0.749 | 0.758 |
|
| 54 |
+
| | Safety Evaluation | 0.718 | 0.701 | 0.739 |
|
| 55 |
+
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
### Overall Performance Summary
|
| 59 |
+
CodeGenModel achieves top performance on code generation tasks among all checkpoints in this training run.
|
| 60 |
+
|
| 61 |
+
## 3. How to Use
|
| 62 |
+
|
| 63 |
+
### Installation
|
| 64 |
+
```bash
|
| 65 |
+
pip install transformers
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### Quick Start
|
| 69 |
+
```python
|
| 70 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 71 |
+
|
| 72 |
+
model = AutoModelForCausalLM.from_pretrained("CodeGenModel")
|
| 73 |
+
tokenizer = AutoTokenizer.from_pretrained("CodeGenModel")
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## 4. License
|
| 77 |
+
This repository is licensed under the [MIT License](LICENSE).
|
| 78 |
+
|
| 79 |
+
## 5. Contact
|
| 80 |
+
Open an issue on our GitHub for questions.
|
config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "bert",
|
| 3 |
+
"architectures": ["BertModel"]
|
| 4 |
+
}
|
figures/fig1.png
ADDED
|
figures/fig2.png
ADDED
|
figures/fig3.png
ADDED
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:965362299a238de576a92dfdd3e32aea7a2bacc94b2c41541c8c9258b923f587
|
| 3 |
+
size 23
|