bojone / bert4keras

keras implement of transformers for humans
https://kexue.fm/archives/6915
Apache License 2.0
5.37k stars 929 forks source link

Contrastive Search解码策略 #512

Closed SunYanCN closed 1 year ago

SunYanCN commented 1 year ago

支持Contrastive Search解码策略,通过对比学习的方式改善文本生成模型重复解码的问题。 参考:

  1. A Contrastive Framework for Neural Text Generation
  2. https://zhuanlan.zhihu.com/p/599921747