pycorrector icon indicating copy to clipboard operation
pycorrector copied to clipboard

Pycorrector使用GPT模型方式如何加载自己训练的模型?

Open suchstar opened this issue 1 year ago • 3 comments

这两天调研Pycorrector的GPT模式纠错,感觉结果相对理想,但是我们的目标行业是特定的行业,所以我就在想基于现有的模型shibing624/chatglm3-6b-csc-chinese-lora,THUDM/chatglm3-6b再次加强训练,提升错误检测的准确率,样例代码中也提供了训练方法,但是最终的训练模型在工程话的时候,Pycorrector如何加载使用,这一块有详细的说明吗?

suchstar avatar Dec 05 '23 03:12 suchstar

就批量预测就好了:https://github.com/shibing624/pycorrector/blob/master/examples/macbert/demo.py

shibing624 avatar Dec 05 '23 09:12 shibing624

抱歉,可能我的问题没有说清楚:

我在使用咱们gpt模式纠错的时候,发现“文聪做玩作业了”这类句子没有检查出来错误(玩—>完)。

所以想问下,如果自己训练模型的话,自己训练的模型的加载怎么搞,现在我想到的办法就是修改源码?

还是说您的上面的说的调用m.correct_batch方法的过程中已经涵盖模型的训练了?

suchstar avatar Dec 06 '23 01:12 suchstar

https://github.com/shibing624/pycorrector/blob/master/examples/macbert/README.md

shibing624 avatar Dec 07 '23 07:12 shibing624