From 957c3ba17407084e080836aa0886878d81864de2 Mon Sep 17 00:00:00 2001 From: xxl <505279206@qq.com> Date: Thu, 5 Dec 2024 14:38:22 +0800 Subject: [PATCH] First commit --- config.json | 19 ++++++++++++++++ configuration.json | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 config.json create mode 100644 configuration.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..adb75ff --- /dev/null +++ b/config.json @@ -0,0 +1,19 @@ +{ + "attention_probs_dropout_prob": 0.1, + "directionality": "bidi", + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 768, + "initializer_range": 0.02, + "intermediate_size": 3072, + "max_position_embeddings": 512, + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pooler_fc_size": 768, + "pooler_num_attention_heads": 12, + "pooler_num_fc_layers": 3, + "pooler_size_per_head": 128, + "pooler_type": "first_token_transform", + "type_vocab_size": 2, + "vocab_size": 21128 +} diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..b8fe8db --- /dev/null +++ b/configuration.json @@ -0,0 +1,56 @@ +{ + "framework": "pytorch", + "task": "fill-mask", + "model": { + "type": "structbert", + "language": "zh" + }, + "pipeline": { + "type": "fill-mask" + }, + "preprocessor": { + "type": "fill-mask" + }, + "train": { + "work_dir": "/tmp", + "max_epochs": 5, + "dataloader": { + "batch_size_per_gpu": 32, + "workers_per_gpu": 1 + }, + "optimizer": { + "type": "AdamW", + "lr": 2e-5, + "options": {} + }, + "lr_scheduler": { + "type": "LinearLR", + "start_factor": 1.0, + "end_factor": 0.0, + "total_iters": null, + "options": { + "by_epoch": false + } + }, + "hooks": [{ + "type": "CheckpointHook", + "interval": 1 + }, { + "type": "TextLoggerHook", + "interval": 1 + }, { + "type": "IterTimerHook" + }, { + "type": "EvaluationHook", + "by_epoch": false, + "interval": 100 + }] + }, + "evaluation": { + "dataloader": { + "batch_size_per_gpu": 32, + "workers_per_gpu": 1, + "shuffle": false + } + } +}