File size: 1,799 Bytes
eba4db9
 
729e377
eba4db9
 
 
 
 
 
 
 
 
 
0c71652
eba4db9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
    "dataset_reader": {
        "type": "text_classification_json",
        "token_indexers": {
            "tokens": {
                "type": "single_id",
                "namespace": "tokens",
                "lowercase_tokens": true,
                "token_min_padding_length": 5
            }
        },
        "tokenizer": {
            "type": "pretrained_transformer",
            "model_name": "google-bert/bert-base-multilingual-uncased"
        },
        "max_sequence_length": 256
    },
    "train_data_path": "train.json",
    "validation_data_path": "valid.json",
    "vocabulary": {
        "directory_path": "vocabulary"
    },
    "model": {
        "type": "basic_classifier",
        "text_field_embedder": {
            "token_embedders": {
                "tokens": {
                    "type": "embedding",
                    "num_embeddings": 105880,
                    "embedding_dim": 64
                }
            }
        },
        "seq2seq_encoder": {
            "type": "pass_through",
            "input_dim": 64
        },
        "seq2vec_encoder": {
            "type": "bag_of_embeddings",
            "embedding_dim": 64
        }
    },
    "data_loader": {
        "type": "multiprocess",
        "batch_size": 64,
        "shuffle": true
    },
    "trainer": {
        "type": "gradient_descent",
        "cuda_device": -1,
        "optimizer": {
            "type": "bert_adam",
            "lr": 5e-05,
            "warmup": 0.1,
            "t_total": 50000,
            "schedule": "warmup_linear"
        },
        "checkpointer": {
            "serialization_dir": "serialization_dir",
            "keep_most_recent_by_count": 10
        },
        "patience": 5,
        "validation_metric": "+accuracy",
        "num_epochs": 100
    }
}