Update REAMDE

pull/32/head
Stanislas0 2 years ago
parent 593ef9e231
commit 1f285df06d

@ -42,6 +42,8 @@ We introduce CodeGeeX, a large-scale multilingual code generation model with 13
## News
* **2022-12-04**: We release source code of quantization (requires less GPU RAM: 27GB -> 15GB) and model parallelism (possible to run on multiple GPUs with <8G RAM).
* **2022-09-30**: We release the cross-platform source code and models weights for both Ascend and NVIDIA platforms.
## Getting Started
@ -61,7 +63,7 @@ pip install -e .
Apply and download model weights through this [link](https://models.aminer.cn/codegeex/download/request). You'll receive by mail ```urls.txt``` that contains temporary download links. We recommend you to use [aria2](https://aria2.github.io/) to download it via the following command (Please make sure you have enough disk space to download the checkpoint (~26GB)):
```bash
aria2c -x 16 -s 16 -j 4 --continue=true -i urls.txt
```
```
Run the following command to get the full model weights:
```bash
cat codegeex_13b.tar.gz.* > codegeex_13b.tar.gz
@ -72,7 +74,15 @@ tar xvf codegeex_13b.tar.gz
Have a try on generating the first program with CodeGeeX. First, specify the path of the model weights in ``configs/codegeex_13b.sh``. Second, write the prompt (natural language description or code snippet) into a file, e.g., ``tests/test_prompt.txt``, then run the following script:
```bash
# On a single GPU (with more than 27GB RAM)
bash ./scripts/test_inference.sh <GPU_ID> ./tests/test_prompt.txt
# With quantization (with more than 15GB RAM)
bash ./scripts/test_inference_quantized.sh <GPU_ID> ./tests/test_prompt.txt
# On multiple GPUs (with more than 6GB RAM, need to first convert ckpt to MP_SIZE partitions)
bash ./scripts/convert_ckpt_parallel.sh <LOAD_CKPT_PATH> <SAVE_CKPT_PATH> <MP_SIZE>
bash ./scripts/test_inference_parallel.sh <MP_SIZE> ./tests/test_prompt.txt
```
### VS Code Extension Guidance

@ -41,6 +41,8 @@ CodeGeeX是一个具有130亿参数的多编程语言代码生成预训练模型
## 新闻
* **2022-12-04**: 我们开源了量化代码需要更少的显存27GB -> 15GB以及模型并行代码可以运行在多个显存至少8GB的GPUs上
* **2022-09-30**: 我们开源了跨平台代码和模型权重,同时支持昇腾和英伟达平台。
## 使用指南
@ -70,7 +72,15 @@ tar xvf codegeex_13b.tar.gz
尝试使用CodeGeeX模型生成第一个程序吧首先在配置文件``configs/codegeex_13b.sh``中写明存放权重的路径。其次,将提示(可以是任意描述或代码片段)写入文件``tests/test_prompt.txt``运行以下脚本即可开始推理需指定GPU序号
```bash
# On a single GPU (with more than 27GB RAM)
bash ./scripts/test_inference.sh <GPU_ID> ./tests/test_prompt.txt
# With quantization (with more than 15GB RAM)
bash ./scripts/test_inference_quantized.sh <GPU_ID> ./tests/test_prompt.txt
# On multiple GPUs (with more than 6GB RAM, need to first convert ckpt to MP_SIZE partitions)
bash ./scripts/convert_ckpt_parallel.sh <LOAD_CKPT_PATH> <SAVE_CKPT_PATH> <MP_SIZE>
bash ./scripts/test_inference_parallel.sh <MP_SIZE> ./tests/test_prompt.txt
```
### VS Code插件使用指南

Loading…
Cancel
Save