-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68f374e
commit 3dc0242
Showing
11 changed files
with
117 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"training_dataset": { | ||
"__type__": "MSRAFlatNerDataset", | ||
"__name_space__": "mrc_ner", | ||
"dataset_file_path": "/Users/panxu/MyProjects/github/easytext/data/dataset/mrc_msra_ner/sample.json" | ||
}, | ||
|
||
"validation_dataset": { | ||
"__type__": "MSRAFlatNerDataset", | ||
"__name_space__": "mrc_ner", | ||
"dataset_file_path": "/Users/panxu/MyProjects/github/easytext/data/dataset/mrc_msra_ner/sample.json" | ||
}, | ||
|
||
"model_collate": { | ||
"__type__": "BertModelCollate", | ||
"__name_space__": "mrc_ner", | ||
"tokenizer": { | ||
"__type__": "BertTokenizer", | ||
"bert_dir": "/Users/panxu/MyProjects/github/easytext/data/pretrained/bert/chinese_roberta_wwm_large_ext_pytorch" | ||
}, | ||
|
||
"max_length": 128 | ||
}, | ||
|
||
|
||
|
||
"model": { | ||
"__type__": "BertRnnWithCrf", | ||
"__name_space__": "mrc_ner", | ||
"bert_dir": "/Users/panxu/MyProjects/github/easytext/data/pretrained/bert/chinese_roberta_wwm_large_ext_pytorch", | ||
"dropout": 0.1 | ||
}, | ||
|
||
"loss": { | ||
"__type__": "MRCBCELoss", | ||
"__name_space__": "mrc_ner", | ||
"start_weight": 1.0, | ||
"end_weight": 1.0, | ||
"match_weight": 1.0 | ||
}, | ||
|
||
"metric": { | ||
"__type__": "MrcModelMetricAdapter", | ||
"__name_space__": "mrc_ner" | ||
}, | ||
|
||
"optimizer": { | ||
"__type__": "MRCOptimizer", | ||
"__name_space__": "mrc_ner", | ||
"lr": 0.00002, | ||
"eps": 0.00000001, | ||
"weight_decay": 0.01 | ||
}, | ||
|
||
"lr_scheduler": { | ||
"__type__": "MRCLrScheduler", | ||
"__name_space__": "mrc_ner", | ||
"max_lr": 0.00002, | ||
"final_div_factor": 10000, | ||
"total_steps": null, | ||
}, | ||
"grad_rescaled": null, | ||
|
||
"process_group_parameter": { | ||
"__type__": "ProcessGroupParameter", | ||
"__name_space__": "__easytext__", | ||
"host": "127.0.0.1", | ||
"port": "2345", | ||
"backend": "nccl" | ||
}, | ||
|
||
"distributed_data_parallel_parameter": { | ||
"__type__": "DistributedDataParallelParameter", | ||
"__name_space__": "__easytext__", | ||
"find_unused_parameters": false | ||
}, | ||
|
||
"num_epoch": 500, | ||
"patient": 100, | ||
"num_check_point_keep": 1, | ||
|
||
"devices": ["cpu"], | ||
"serialize_dir": "/Users/panxu/MyProjects/github/easytext/data/mrc_ner/serialize", | ||
"train_batch_size": 4, | ||
"test_batch_size": 8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ | |
Authors: PanXu | ||
Date: 2021/10/27 14:11:00 | ||
""" | ||
|
||
from .mrc_bce_loss import MRCBCELoss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
""" | ||
|
||
from .mrc_optimizer import MRCOptimizer | ||
from .mrc_lr_scheduler import MRCLrScheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters