Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
bert4torch_pytorch
Commits
819d90cc
Commit
819d90cc
authored
Jan 31, 2024
by
yangzhong
Browse files
修改README
parent
13c631c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
README.md
README.md
+3
-4
No files found.
README.md
View file @
819d90cc
...
...
@@ -71,7 +71,7 @@ python3 setup.py install
4.其它非特殊库参照requirements.txt安装
```
## 数据集
和预训练模型
## 数据集
数据集下载地址:https://s3.bmio.net/kashgari/china-people-daily-ner-corpus.tar.gz
人民日报数据集存放在目录/datasets/bert-base-chinese目录下,然后解压。
...
...
@@ -98,8 +98,7 @@ cd examples/sequence_labeling/
# 修改训练脚本配置文件
crf.py # 单卡训练脚本
crf_ddp.py # 多卡训练脚本 多卡训练使用torch的ddp,在单卡训练代码基础上增加DDP的相关内容
仅修改配置文件路径,包括config_path, checkpoint_path, dict_path, train_dataloader, valid_dtaloader,根据需要调整batch_size大小。
注:如果需要测试fp16,可以修改crf_ddp.py和crf.py中model.compile(),添加use_amp=True。
仅修改配置文件路径,包括config_path, checkpoint_path, dict_path, train_dataloader, valid_dtaloader,根据需要调整batch_size大小。配置文件修改成argparse参数控制形式,可以在单机单卡启动脚本single_train.sh和多机多卡启动脚本multi_train.sh中对参数进行调整。
```
### 单机单卡
...
...
@@ -114,7 +113,7 @@ cd examples/sequence_labeling/
```
## result
无
## 精度
##
#
精度
| 卡数 | 类型 | batch_size | f1 | p | r |
| ---- | ---- | ---------- | ------ | ------ | ------ |
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment