Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加v0.10pre0的字典支持 #6

Merged
merged 5 commits into from
Mar 12, 2024
Merged

Conversation

Tabing010102
Copy link
Contributor

@Tabing010102 Tabing010102 commented Mar 9, 2024

添加文件版本(0.2.3)
添加配置(仅在OpenAI模式下生效)

  • UseDict默认为空字符串
  • DictMode默认为Full
  • Dict默认为空字符串

其中

  • UseDict为false时是老的OpenAI Prompt
  • DictModeFull时传递整个字典,为Partial或其他时,传递当前翻译句子包含的字典部分
  • Dict为json编码的字符串,格式同MTool,为{"k1":"v1","k2":"v2"},暂未发现SakuraLLM官方示例中给的字典注释有什么作用

llama.cpp-b2355,sakura-13b-qwen2beta-v0.10pre0-Q6_K.gguf,Windows和Linux下测试
理论上高版本llama.cpp和Kaggle都能用,不过我未测试Kaggle
配置:

[Sakura]
Endpoint=http://127.0.0.1:5000/v1/chat/completions
ApiType=OpenAI
UseDict=True
DictMode=Full
Dict={"たちばな":"橘","橘":"橘","あやの":"绫乃","綾乃":"绫乃"}

@Tabing010102 Tabing010102 marked this pull request as draft March 10, 2024 00:22
@Tabing010102 Tabing010102 marked this pull request as ready for review March 10, 2024 01:18
@fkiliver fkiliver merged commit 624bc3b into fkiliver:master Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants