Instructions to use SOTAagi2030/CodeGenModel-Best with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SOTAagi2030/CodeGenModel-Best with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="SOTAagi2030/CodeGenModel-Best")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("SOTAagi2030/CodeGenModel-Best") model = AutoModel.from_pretrained("SOTAagi2030/CodeGenModel-Best", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from SOTAagi2030/CodeGenModel-Best: direct link, hf CLI and curl.
- Browser
- Download file 2.41 kB
-
https://huggingface.co/SOTAagi2030/CodeGenModel-Best/resolve/main/README.md
- Command line
-
hf download hf://SOTAagi2030/CodeGenModel-Best/README.md
-
curl -L -o README.md https://huggingface.co/SOTAagi2030/CodeGenModel-Best/resolve/main/README.md
2.41 kB
| license: mit | |
| library_name: transformers | |
| # CodeGenModel | |
| <!-- markdownlint-disable first-line-h1 --> | |
| <!-- markdownlint-disable html --> | |
| <!-- markdownlint-disable no-duplicate-header --> | |
| <div align="center"> | |
| <img src="figures/fig1.png" width="60%" alt="CodeGenModel" /> | |
| </div> | |
| <hr> | |
| <div align="center" style="line-height: 1;"> | |
| <a href="LICENSE" style="margin: 2px;"> | |
| <img alt="License" src="figures/fig2.png" style="display: inline-block; vertical-align: middle;"/> | |
| </a> | |
| </div> | |
| ## 1. Introduction | |
| CodeGenModel is specialized for code generation tasks. This model has been selected as the best checkpoint based on code generation benchmark performance. | |
| <p align="center"> | |
| <img width="80%" src="figures/fig3.png"> | |
| </p> | |
| The model demonstrates outstanding performance in code-related tasks while maintaining strong general capabilities. | |
| ## 2. Evaluation Results | |
| ### Comprehensive Benchmark Results | |
| <div align="center"> | |
| | | Benchmark | CodeModel-v1 | CodeModel-v2 | CodeGenModel | | |
| |---|---|---|---|---| | |
| | **Core Reasoning Tasks** | Math Reasoning | 0.510 | 0.535 | 0.55 | | |
| | | Logical Reasoning | 0.789 | 0.801 | 0.819 | | |
| | | Common Sense | 0.716 | 0.702 | 0.736 | | |
| | **Language Understanding** | Reading Comprehension | 0.671 | 0.685 | 0.7 | | |
| | | Question Answering | 0.582 | 0.599 | 0.607 | | |
| | | Text Classification | 0.803 | 0.811 | 0.828 | | |
| | | Sentiment Analysis | 0.777 | 0.781 | 0.792 | | |
| | **Generation Tasks** | Code Generation | 0.615 | 0.631 | 0.65 | | |
| | | Creative Writing | 0.588 | 0.579 | 0.61 | | |
| | | Dialogue Generation | 0.621 | 0.635 | 0.644 | | |
| | | Summarization | 0.745 | 0.755 | 0.767 | | |
| | **Specialized Capabilities**| Translation | 0.782 | 0.799 | 0.804 | | |
| | | Knowledge Retrieval | 0.651 | 0.668 | 0.676 | | |
| | | Instruction Following | 0.733 | 0.749 | 0.758 | | |
| | | Safety Evaluation | 0.718 | 0.701 | 0.739 | | |
| </div> | |
| ### Overall Performance Summary | |
| CodeGenModel achieves top performance on code generation tasks among all checkpoints in this training run. | |
| ## 3. How to Use | |
| ### Installation | |
| ```bash | |
| pip install transformers | |
| ``` | |
| ### Quick Start | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained("CodeGenModel") | |
| tokenizer = AutoTokenizer.from_pretrained("CodeGenModel") | |
| ``` | |
| ## 4. License | |
| This repository is licensed under the [MIT License](LICENSE). | |
| ## 5. Contact | |
| Open an issue on our GitHub for questions. | |