Edit model card

介绍

基于macbert对mask language model微调,进行错字修改。

这个是在shibing624/macbert4csc-base-chinese的基础上进行修改, 其对应的 源码位置

使用

可参考shibing624/macbert4csc-base-chinese

改动

主要改动两个地方:

  1. MLM和错字检测二分类超参改成0.9和0.1(当然不一定是最优参数)。
  2. 对错字检测二分类引入一个ScalarMix layer,原代码使用hidden_states最后一层,个人觉得稍微有点深以及学习起来可能更复杂。

思考

整体下来错字检测二分类对整体模型效果影响并没有很突出,以及整体模型效果并没有超出原作者多少,所以上传这个代码以及模型更多是为了学习记录与思考。 其以pycorrector eval.py跑出来的结果如下:

corpus数据集:

Sentence Level: acc:0.7200, precision:0.8804, recall:0.6154, f1:0.7244, cost time:5.67 s

sighan2015数据集:

Sentence Level: acc:0.7973, precision:0.8265, recall:0.7459, f1:0.7841, cost time:11.19 s
Downloads last month
2
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.