Macropodus
commited on
Upload 8 files
Browse files- config.json +32 -0
- csc.config +81 -0
- generation_config.json +5 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +13 -0
- vocab.txt +0 -0
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "hfl/chinese-macbert-base",
|
3 |
+
"architectures": [
|
4 |
+
"BertForMaskedLM"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 512,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"pooler_fc_size": 768,
|
22 |
+
"pooler_num_attention_heads": 12,
|
23 |
+
"pooler_num_fc_layers": 3,
|
24 |
+
"pooler_size_per_head": 128,
|
25 |
+
"pooler_type": "first_token_transform",
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"torch_dtype": "float32",
|
28 |
+
"transformers_version": "4.30.2",
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 21128
|
32 |
+
}
|
csc.config
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"CUDA_VISIBLE_DEVICES": "0",
|
3 |
+
"USE_TORCH": "1",
|
4 |
+
"output_hidden_states": null,
|
5 |
+
"pretrained_model_name_or_path": "hfl/chinese-macbert-base",
|
6 |
+
"model_save_path": "../output/text_correction/model_public_csc",
|
7 |
+
"config_name": "csc.config",
|
8 |
+
"model_name": "pytorch_model.bin",
|
9 |
+
"path_train": "csc_public.train.json",
|
10 |
+
"path_dev": "csc_public.dev.json",
|
11 |
+
"path_tet": "csc_public.tet.json",
|
12 |
+
"scheduler_name": "cosine",
|
13 |
+
"tokenizer_type": "CHAR",
|
14 |
+
"padding_side": "RIGHT",
|
15 |
+
"active_type": "RELU",
|
16 |
+
"task_type": "CSC",
|
17 |
+
"model_type": "BERT",
|
18 |
+
"loss_type": "BCE",
|
19 |
+
"loss_det_rate": 0.3,
|
20 |
+
"max_len_limit": 512,
|
21 |
+
"batch_size": 32,
|
22 |
+
"num_labels": 0,
|
23 |
+
"max_len": 128,
|
24 |
+
"epochs": 3,
|
25 |
+
"lr": 3e-05,
|
26 |
+
"grad_accum_steps": 4,
|
27 |
+
"max_grad_norm": 1.0,
|
28 |
+
"weight_decay": 0.01,
|
29 |
+
"dropout_rate": 0.1,
|
30 |
+
"adam_eps": 1e-08,
|
31 |
+
"seed": 42,
|
32 |
+
"evaluate_steps": 1000,
|
33 |
+
"warmup_steps": 0.1,
|
34 |
+
"ignore_index": 0,
|
35 |
+
"save_steps": 1000,
|
36 |
+
"stop_epochs": 4,
|
37 |
+
"num_workers": 0,
|
38 |
+
"max_steps": -1,
|
39 |
+
"flag_save_model_state": true,
|
40 |
+
"flag_dynamic_encode": false,
|
41 |
+
"flag_tokenizer_char": true,
|
42 |
+
"flag_soft_label": true,
|
43 |
+
"flag_save_best": true,
|
44 |
+
"flag_dropout": false,
|
45 |
+
"flag_shuffle": true,
|
46 |
+
"flag_active": false,
|
47 |
+
"flag_train": false,
|
48 |
+
"flag_cuda": true,
|
49 |
+
"flag_mft": true,
|
50 |
+
"flag_adv": false,
|
51 |
+
"xy_keys_predict": [
|
52 |
+
"original_text",
|
53 |
+
"correct_text",
|
54 |
+
"wrong_ids"
|
55 |
+
],
|
56 |
+
"keys": [
|
57 |
+
"original_text",
|
58 |
+
"correct_text",
|
59 |
+
"wrong_ids"
|
60 |
+
],
|
61 |
+
"save_best_mertics_key": [
|
62 |
+
"sentence",
|
63 |
+
"strict_cor_f1"
|
64 |
+
],
|
65 |
+
"label_sep": "|myz|",
|
66 |
+
"multi_label_threshold": 0.5,
|
67 |
+
"len_rate": 1,
|
68 |
+
"adv_emb_name": "word_embeddings.",
|
69 |
+
"adv_eps": 1.0,
|
70 |
+
"additional_special_tokens": [],
|
71 |
+
"len_corpus": null,
|
72 |
+
"prior_count": null,
|
73 |
+
"prior": null,
|
74 |
+
"l2i": null,
|
75 |
+
"i2l": null,
|
76 |
+
"xy_keys": [
|
77 |
+
"original_text",
|
78 |
+
"correct_text",
|
79 |
+
"wrong_ids"
|
80 |
+
]
|
81 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"pad_token_id": 0,
|
4 |
+
"transformers_version": "4.30.2"
|
5 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f792f767230dd18811374aefa64e7c69ea0a78baba5284f494041b447f56172
|
3 |
+
size 409234681
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"clean_up_tokenization_spaces": true,
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"do_lower_case": true,
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"model_max_length": 1000000000000000019884624838656,
|
7 |
+
"pad_token": "[PAD]",
|
8 |
+
"sep_token": "[SEP]",
|
9 |
+
"strip_accents": null,
|
10 |
+
"tokenize_chinese_chars": true,
|
11 |
+
"tokenizer_class": "BertTokenizer",
|
12 |
+
"unk_token": "[UNK]"
|
13 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|