Skip to content

genggui001/ancient_chinese_language_model

Repository files navigation

古汉语语言模型

语料:殆知阁古代文献txt大全集

训练平台:Colab 白嫖Colab训练语言模型教程

基础框架:苏神的bert4keras

框架安装:

pip install bert4keras==0.9.9

T5 Encoder版本

模型调用代码:

ancient_chinese_t5s.py

模型参数下载地址:

百度网盘:链接 提取码:15bv

模型预训练过程:

两阶段预训练:90%采用128句子长度,10%采用512句子长度

128阶段预训练参数:

seq_len = 128
batch_size = 1792
learning_rate = 0.00125
weight_decay_rate = 0.01
num_warmup_steps = 0
num_train_steps = 250000

mlm_loss曲线:

ancient_chinese_t5s_mlm_loss_step_0

mlm_acc曲线:

ancient_chinese_t5s_mlm_acc_step_0

512阶段预训练参数:

seq_len = 512
batch_size = 1792
learning_rate = 0.000125
weight_decay_rate = 0.01
num_warmup_steps = 0
num_train_steps = 25000

mlm_loss曲线:

ancient_chinese_t5s_mlm_loss_step_1

mlm_acc曲线:

ancient_chinese_t5s_mlm_acc_step_1

Bert Base版本

模型调用代码:

ancient_chinese_base.py

模型参数下载地址:

百度网盘:链接 提取码:26yh

模型预训练过程:

两阶段预训练:90%采用128句子长度,10%采用512句子长度

128阶段预训练参数:

seq_len = 128
batch_size = 1792
learning_rate = 0.00125
weight_decay_rate = 0.01
num_warmup_steps = 3125
num_train_steps = 250000

mlm_loss曲线:

ancient_chinese_base_mlm_loss_step_0

mlm_acc曲线:

ancient_chinese_base_mlm_acc_step_0

512阶段预训练参数:

seq_len = 512
batch_size = 1792
learning_rate = 0.000125
weight_decay_rate = 0.01
num_warmup_steps = 0
num_train_steps = 25000

mlm_loss曲线:

ancient_chinese_base_mlm_loss_step_1

mlm_acc曲线:

ancient_chinese_base_mlm_acc_step_1

About

古汉语语言模型

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages