LAE
收藏数据集概述
数据集名称
- LAE 数据集
数据集下载
- 下载链接:https://thunlp-public.oss-cn-hongkong.aliyuncs.com/legal/LegalArgumentPairExtraction/data.zip
- 存储路径:
./data/lae
数据集用途
- 用于法律领域的细粒度论证对提取模型的预训练和评估。
数据集操作
-
预训练:使用LAE数据集预训练模型,命令如下: bash mpirun --allow-run-as-root -n 8 python run_mindformer.py --config configs/txtcls/contract_train.yaml # 针对合同领域 mpirun --allow-run-as-root -n 8 python run_mindformer.py --config configs/txtcls/loan_train.yaml # 针对贷款领域
-
评估:评估预训练模型,命令如下: bash
针对合同领域
for file in $(ls output/checkpoint/rank_0/contract_pretrain_rank_0-*.ckpt); do echo "Processing $file" python run_mindformer.py --config configs/txtcls/contract_test.yaml --load_checkpoint $file done
针对贷款领域
for file in $(ls output/checkpoint/rank_0/loan_pretrain_rank_0-*.ckpt); do echo "Processing $file" python run_mindformer.py --config configs/txtcls/loan_test.yaml --load_checkpoint $file done
-
微调:使用预训练模型进行微调,命令如下: bash python run_mindformer.py --config configs/txtcls/contract_finetune.yaml --load_checkpoint output/checkpoint/rank_0/contract_pretrain_rank_0-{best_checkpoint}.ckpt # 针对合同领域 python run_mindformer.py --config configs/txtcls/loan_finetune.yaml --load_checkpoint output/checkpoint/rank_0/loan_pretrain_rank_0-{best_checkpoint}.ckpt # 针对贷款领域
-
最终评估:评估微调后的模型,命令如下: bash
针对合同领域
for file in $(ls output/checkpoint/rank_0/contract_finetune_rank_0-*.ckpt); do echo "Processing $file" python run_mindformer.py --config configs/txtcls/contract_test.yaml --load_checkpoint $file done
针对贷款领域
for file in $(ls output/checkpoint/rank_0/loan_finetune_rank_0-*.ckpt); do echo "Processing $file" python run_mindformer.py --config configs/txtcls/loan_test.yaml --load_checkpoint $file done
数据集注意事项
- 在重新运行预训练或微调时,需要移除之前的检查点以确保评估的正确性。




