qgyd2021's picture
Update config.json
0c71652 verified
{
"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
}
}