xd2333 / GalTransl

支持GPT-3.5/GPT-4/Newbing/Sakura等大语言模型的Galgame自动化翻译解决方案 Automated translation solution for visual novels supporting GPT-3.5/GPT-4/Newbing/Sakura
GNU General Public License v3.0
1.24k stars 72 forks source link

建议在翻译退化后设置frequency_penalty #77

Closed jisadn closed 8 months ago

jisadn commented 8 months ago

如出现退化(退化的例子可参见 https://github.com/SakuraLLM/Sakura-13B-Galgame/issues/35https://github.com/SakuraLLM/Sakura-13B-Galgame/issues/36 ),可增加frequency_penalty参数,并设置为大于0的某值,一般设置0.1~0.2即可。

xd2333 commented 8 months ago

https://github.com/cx2333-gt/GalTransl/blob/a183833d3f8422118bd87b3419111b2ff9edadd0/GalTransl/Backend/SakuraTranslate.py#L227

https://github.com/cx2333-gt/GalTransl/blob/a183833d3f8422118bd87b3419111b2ff9edadd0/GalTransl/Backend/SakuraTranslate.py#L354