Repository navigation
Replies: 2 comments 2 replies
|
make sense PR welcome |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
在我自己的字幕翻译项目中,我发现使用json格式将字幕以多行一组提交,能显著提交翻译质量和效率,我觉得电子书翻译也可以使用。
例如这样的prompt,可以将多行字幕互为上下文,甚至可以交给模型合并和拆分:
Translate the following JSON subtitles into Concise Simplified Chinese. You may adjust 'text' to improve translation, but the number of JSON entries and 'id' must remain strictly aligned, even if 'text' is empty. Return only the translation, no explanations.\n{input}输入和输出的json通过id来校验,例如
[{id:1, text:text1}, {id:2, text:text2}]当然最好是模型支持json结构化,最好同时支持schema:
对于必然会出现的大语言模型翻译失败的情况,特别是在行数过多时,可以使用行数梯度减半的方式重试,最后交给单条翻译兜底。对于字幕翻译,一般qwen7b_q4以上的量化模型就能在8行时达到90%以上的成功率,gemma3-12b/qwen14b基本都能97%以上。
针对epub翻译,我自己是尝试将同一组li,和同section的h和p作为同一组进行多行提交:
All reactions