Commit c2e594cd authored by dcuai's avatar dcuai
Browse files

Update README.md

parent bdcf7781
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## 论文 ## 论文
- [论文地址] [Blueprint of FinGPT](https://arxiv.org/abs/2306.06031) - [FinGPT: Open-Source Financial Large Language Models](https://arxiv.org/abs/2306.06031)
...@@ -56,9 +56,8 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu22.04-dt ...@@ -56,9 +56,8 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu22.04-dt
docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal/:/opt/hyhal/:ro --shm-size=64G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name fingpt <your imageID> bash docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal/:/opt/hyhal/:ro --shm-size=64G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name fingpt <your imageID> bash
docker exec -it fingpt bash
cd /path/your_code_data/FinGPT cd /path/your_code_data/fingpt
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
...@@ -66,13 +65,13 @@ pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-ma ...@@ -66,13 +65,13 @@ pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-ma
``` ```
### Dockerfile(方法二) ### Dockerfile(方法二)
``` ```
cd /path/your_code_data/FinGPT/docker cd /path/your_code_data/fingpt/docker
docker build --no-cache -t fingpt:latest . docker build --no-cache -t fingpt:latest .
docker run --shm-size=64G --name fingpt -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v /path/your_code_data/:/path/your_code_data/ -it fingpt bash docker run --shm-size=64G --name fingpt -v /opt/hyhal:/opt/hyhal:ro --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v /path/your_code_data/:/path/your_code_data/ -it fingpt bash
cd /path/your_code_data/FinGPT cd /path/your_code_data/fingpt
pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-manylinux2014_x86_64.whl pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-manylinux2014_x86_64.whl
``` ```
...@@ -84,18 +83,14 @@ pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-ma ...@@ -84,18 +83,14 @@ pip install deepspeed-0.12.3+gitfe61783.abi0.dtk2310.torch2.1.0a0-cp310-cp310-ma
DTK驱动:dtk23.10 DTK驱动:dtk23.10
python:python3.10 python:python3.10
torch: 2.1.0 torch: 2.1.0
transformers: >=4.37.2 torchvision: 0.16.0
apex: 1.1.0
deepspped: 0.12.3 deepspped: 0.12.3
datasets: 2.14.3
accelerate: 0.27.2
peft: 0.10.0
trl: 0.8.1
gradio: >=3.38.0,<=4.0.0
``` ```
``` ```
conda create -n fingpt python=3.10 conda create -n fingpt python=3.10
cd /path/your_code_data/FinGPT cd /path/your_code_data/fingpt
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple
...@@ -152,6 +147,8 @@ python data_process.py ...@@ -152,6 +147,8 @@ python data_process.py
│    │   
``` ```
## 训练 ## 训练
根据实际情况在脚本中修改权重相关路径
### 单机多卡 ### 单机多卡
``` ```
bash multi_dcu_train.sh bash multi_dcu_train.sh
...@@ -183,7 +180,7 @@ python inference_FinGPT.py ...@@ -183,7 +180,7 @@ python inference_FinGPT.py
测试数据:[twitter-financial-news-sentiment](../FinGPT/dataset/dataset_new.jsonl),使用的加速卡:V100S/K100。 测试数据:[twitter-financial-news-sentiment](../FinGPT/dataset/dataset_new.jsonl),使用的加速卡:V100S/K100。
根据测试结果情况填写表格: 根据测试结果情况填写表格:
| xxx | train_loss | train_runtime |eval_los |eval_runtime | | device | train_loss | train_runtime |eval_los |eval_runtime |
| :------: | :------: | :------: | :------: |:------: | | :------: | :------: | :------: | :------: |:------: |
| V100s | 0.371248 | 4445.348 | 0.06542 | 30.5495 | | V100s | 0.371248 | 4445.348 | 0.06542 | 30.5495 |
| K100 | 0.371148 | 4018.4874 | 0.06536 | 53.1593 | | K100 | 0.371148 | 4018.4874 | 0.06536 | 53.1593 |
...@@ -193,7 +190,7 @@ python inference_FinGPT.py ...@@ -193,7 +190,7 @@ python inference_FinGPT.py
### 算法类别 ### 算法类别
`对话问答` `对话问答`
### 热点应用行业 ### 热点应用行业
`金融, 教育, 政府, 科研` `金融,教育,政府,科研`
## 预训练权重 ## 预训练权重
| Models | Description | Function | | Models | Description | Function |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment