shibing624 / pycorrector

pycorrector is a toolkit for text error correction. 文本纠错,实现了Kenlm,T5,MacBERT,ChatGLM3,Qwen2.5等模型应用在纠错场景,开箱即用。
https://www.mulanai.com/product/corrector/
Apache License 2.0
5.61k stars 1.1k forks source link

macbert微调保存模型结构的问题 #427

Closed evanchenhi closed 8 months ago

evanchenhi commented 1 year ago

我看pycorrector/macbert/train_macbert4csc.yml配置文件里BERT_CKPT是原始 hfl/chinese-macbert-base 模型

微调完保存的也是原始模型,链接如下,并没有保存MacBert4Csc模型结构,只保存了权重参数 bert = BertForMaskedLM.from_pretrained(cfg.MODEL.BERT_CKPT) bert.save_pretrained(cfg.OUTPUT_DIR) https://github.com/shibing624/pycorrector/blob/master/pycorrector/macbert/train.py#L114

不知道我看的是否正确

shibing624 commented 1 year ago

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)