Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Happy Learner 001ccd80de | 1 year ago | |
---|---|---|
configs | 1 year ago | |
data | 1 year ago | |
fedlab | 1 year ago | |
models | 1 year ago | |
run | 1 year ago | |
tools | 1 year ago | |
trainers | 1 year ago | |
utils | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
cen_run.sh | 1 year ago | |
fed_run.sh | 1 year ago | |
main.py | 1 year ago | |
requirement.txt | 1 year ago | |
test.py | 1 year ago |
FedLab-NLP
为联邦自然语言处理发展添瓦加砖
1️⃣ 本项目来自 SMILELab-FL , 我们主要致力于联邦自然语言处理的发展;
2️⃣ FedLab-NLP
是一款轻量级、可自由定制联邦学习过程并面向于自然语言处理的代码框架;
3️⃣ FedLab-NLP
主要实现基于 FedLab 和 HuggingFace,能完成自然语言预训练大模型在联邦学习场景下工作;
4️⃣ 任何使用问题可以联系 📧 iezhuo17@gmail.com
我们建议按照如下的文件结构来使用FedLab-NLP
:
data: 存放数据集,注意该数据集需要已经经过 iid/niid 划分的联邦数据集;
pretrained: 在nlp文件夹里存储从huggingface中下载的预训练模型,如`bert-base-uncased`;
code: 在该文件夹下面使用`FedLab-NLP`;
output: 存储模型输出的记录等。
目录组织如下:
├── workspace
│ └── data
| | ├── fedglue
| | └── fedner
│ ├── pretrained
│ │ ├── nlp
│ │ └── cv
│ ├── output
│ └── code
│ └── FedLab-NLP
运行路径生成:
mkdir workspace
cd workspace
mkdir data
mkdir code
mkdir pretrained
cd pretrained
mkdir nlp
cd ..
cd code
建议运行环境的python
版本为3.7+
,我们建议使用pytorch
版本为1.10+
git clone git@git.openi.org.cn:Trustworthy-DL/FedLab-NLP.git
cd FedLab-NLP
pip install -r resquirements.txt
支持 fedavg
联邦学习算法
bash fed_run.sh {your_file_path}/workspace {task_name} fedavg 10001 {server_gpu_id} {client1_gpu_id} {client2_gpu_id}
支持 centralized
集中训练学习算法
bash cen_run.sh {your_file_path}/workspace {task_name} centralized 10001 {server_gpu_id}
本项目来自SMILELab-FL,主要致力于联邦结合自然语言处理的发展。
Python Shell
Apache-2.0
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》