C3TR Adapter Gguf
模型简介
将基于Gemma的日英/英日神经机器翻译模型转换为gguf格式的版本,支持在普通PC上运行,部分翻译质量超越GPT-4 Turbo
模型特点
无GPU运行
转换为gguf格式后可在普通CPU上运行
高质量翻译
部分翻译基准测试中质量超越GPT-4 Turbo和Command-R Plus
多量化版本
提供7种不同量化规格,平衡性能与体积
风格控制
支持通过提示词控制翻译风格(casual/formal/technical等)
模型能力
日英翻译
英日翻译
风格化翻译
使用案例
内容本地化
日英内容翻译
将日语内容翻译为英语
质量超越GPT-4 Turbo
英日内容翻译
将英语内容翻译为日语
质量超越GPT-4 Turbo
日常交流
日常对话翻译
翻译非正式对话内容
Version2显著提升了日常对话翻译能力
🚀 C3TR-Adapter_gguf 翻译模型
C3TR-Adapter_gguf 是基于 Google Gemma-2 的日英、英日神经机器翻译模型,将其转换为 gguf 格式后,可在无 GPU 的 PC 上运行。在部分翻译基准测试中,该模型的性能超越了 GPT-4 Turbo 和 Command-R Plus。
🚀 快速开始
你可以使用 Google 的免费 Web 服务 Colab 在浏览器中尝试本模型。不过,由于 Colab 的 CPU 性能较之前有所下降,演示运行会比较耗时。 点击以下链接并按下 [Open in Colab] 按钮即可启动 Colab: Colab Sample C3TR_Adapter_gguf_v3_Free_Colab_sample
✨ 主要特性
- 高性能翻译:Version 3 基于 Google Gemma-2,在部分翻译基准测试中超越 GPT-4 Turbo 和 Command-R Plus。
- 多版本支持:提供多种量化版本,可根据需求选择不同文件大小和性能的模型。
- 跨平台运行:转换为 gguf 格式后,可在无 GPU 的 PC 上运行。
📦 安装指南
Install and compile example(linux)
其他操作系统请参考 llama.cpp 官方网站。
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make
💻 使用示例
基础用法
使用 llama.cpp 在本地 PC 上运行推理时,需严格遵循模板格式。以下是一个基本的推理执行示例:
./llama-cli -m ./C3TR-Adapter.f16.Q4_k_m.gguf -e --temp 0 --repeat-penalty 1.0 -n -2 -p "You are a highly skilled professional Japanese-English and English-Japanese translator. Translate the given text accurately, taking into account the context and specific instructions provided. Steps may include hints enclosed in square brackets [] with the key and value separated by a colon:. Only when the subject is specified in the Japanese sentence, the subject will be added when translating into English. If no additional instructions or context are provided, use your expertise to consider what the most appropriate context is and provide a natural translation that aligns with that context. When translating, strive to faithfully reflect the meaning and tone of the original text, pay attention to cultural nuances and differences in language usage, and ensure that the translation is grammatically correct and easy to read. After completing the translation, review it once more to check for errors or unnatural expressions. For technical terms and proper nouns, either leave them in the original language or use appropriate translations as necessary. Take a deep breath, calm down, and start translating.
<start_of_turn>### Instruction:
<<Translate Japanese to English. or Translate English to Japanese.>>
When translating, please use the following hints:
[writing_style: <<casual or formal or technical or journalistic or web-fiction or business or nsfw or educational-casual or academic-presentation or slang or sns-casual>>]
### Input:
<<YOUR_TEXT>
<end_of_turn>
<start_of_turn>### Response:
"
可修改的部分包括:
<<Translate Japanese to English. or Translate English to Japanese.>>
<<casual or formal or technical or journalistic or web-fiction or business or nsfw or educational-casual or academic-presentation or slang or sns-casual>>
<YOUR_TEXT>
高级用法
日英翻译示例
./llama-cli -m ./C3TR-Adapter.f16.Q4_k_m.gguf -e --temp 0 --repeat-penalty 1.0 -n -2 -p "You are a highly skilled professional Japanese-English and English-Japanese translator. Translate the given text accurately, taking into account the context and specific instructions provided. Steps may include hints enclosed in square brackets [] with the key and value separated by a colon:. Only when the subject is specified in the Japanese sentence, the subject will be added when translating into English. If no additional instructions or context are provided, use your expertise to consider what the most appropriate context is and provide a natural translation that aligns with that context. When translating, strive to faithfully reflect the meaning and tone of the original text, pay attention to cultural nuances and differences in language usage, and ensure that the translation is grammatically correct and easy to read. After completing the translation, review it once more to check for errors or unnatural expressions. For technical terms and proper nouns, either leave them in the original language or use appropriate translations as necessary. Take a deep breath, calm down, and start translating.
<start_of_turn>### Instruction:
Translate Japanese to English.
When translating, please use the following hints:
[writing_style: educational-casual]
[虎視虎子: Torako Koshi]
[鹿乃子のこ: Noko Shikanoko]
### Input:
都立日野南高校の虎視虎子は、近所や学校でも「お淑やかな優等生」と評判の女子高生だが、実は「中学までヤンキーで、高校デビューして優等生になった」ことを隠しながら生活していた。
ある日の登校中、虎子は頭にツノが生えている少女・鹿乃子のこが電線に引っ掛かっていたところを助ける。なぜか、のこに「元ヤン」であることを見破られた虎子は、「ヤンキーのお姉さん」と呼ばれるのが嫌で「こしたん」という愛称を受け入れる。
虎子は自分が「元ヤン」だと周囲にバレないように、虎子のクラスに転校してきたのこを警戒するが、のこの生態に振り回される中で、彼女が立ち上げた部活動「シカ部」の部長として、シカであるのこのお世話係になる。
<end_of_turn>
<start_of_turn>### Response:
"
输出示例
Torako Koshi, a high school student at Tokyo's Hino-Minami High School, is known as a "well-behaved honor student" by her neighbors and classmates. However, she's actually hiding the fact that she was a "delinquent" until middle school and became an honor student when she entered high school.
One day, while on her way to school, Torako sees a girl with horns on her head, Noko Shikanoko, hanging from a power line. She helps her, but somehow, Noko sees through Torako's disguise and calls her "a delinquent older sister." Torako hates being called that, so she accepts Noko's nickname, "Koshi-chan."
Torako tries to keep her past as a "delinquent" a secret, so she keeps an eye on Noko, who transferred to her class. However, she ends up taking care of Noko, who is a deer, as the president of the "Deer Club" that Noko started. [end of text]
📚 详细文档
可用版本
使用 llama.cpp 可通过各种量化方法减小文件大小,本模型提供以下 7 种版本:
版本名称 | 文件大小 |
---|---|
C3TR-Adapter-IQ3_XXS.gguf | 3.6GB |
C3TR-Adapter-Q3_k_m.gguf | 4.5GB |
C3TR-Adapter-Q4_k_m.gguf | 5.4GB |
C3TR-Adapter.f16.Q4_k_m.gguf | 6.4GB |
C3TR-Adapter.f16.Q5_k_m.gguf | 7.2GB |
C3TR-Adapter.f16.Q6_k.gguf | 8.1GB |
C3TR-Adapter.f16.Q8_0.gguf | 10GB |
模型参数
当前的 gguf 版本在翻译后可能会额外输出幻觉内容,需要适当调整参数。 可调整的参数如下:
- 温度(--temp):降低此值,模型更倾向于选择置信度更高(即更常见)的单词。
- Top P(--top_p):进一步降低此值,可缩小模型考虑的单词范围,生成更连贯的文本。
- 生成单词数(-n):减小此值可缩短模型生成的文本长度,防止生成不必要的额外文本。-1 表示无限(默认),-2 表示直到上下文填充完毕。
以下是 llama.cpp 作者 (ggerganov) 推荐的参数:
- -e (转义换行符 \n)
- --temp 0 (仅选择最可能的标记)
- --repeat-penalty 1.0 (禁用重复惩罚,对于指令调整模型,这样做并非明智之举)
--no-penalize-nl (不对重复换行符进行惩罚)最新的 llama.cpp 已将其作为默认行为,无需指定
📄 许可证
本项目采用 gemma 许可证。
M2m100 418M
MIT
M2M100是一个多语言编码器-解码器模型,支持100种语言的9900个翻译方向
机器翻译 支持多种语言
M
facebook
1.6M
299
Opus Mt Fr En
Apache-2.0
基于Transformer的法语到英语神经机器翻译模型,由Helsinki-NLP团队开发,采用OPUS多语数据集训练。
机器翻译 支持多种语言
O
Helsinki-NLP
1.2M
44
Opus Mt Ar En
Apache-2.0
基于OPUS数据训练的阿拉伯语到英语的机器翻译模型,采用transformer-align架构
机器翻译 支持多种语言
O
Helsinki-NLP
579.41k
42
M2m100 1.2B
MIT
M2M100是一个支持100种语言的多语言机器翻译模型,可直接在9900个翻译方向之间进行翻译。
机器翻译 支持多种语言
M
facebook
501.82k
167
Indictrans2 Indic En 1B
MIT
支持25种印度语言与英语互译的1.1B参数规模机器翻译模型,由AI4Bharat项目开发
机器翻译
Transformers 支持多种语言

I
ai4bharat
473.63k
14
Opus Mt En Zh
Apache-2.0
基于Transformer架构的英汉多方言翻译模型,支持英语到13种汉语变体的翻译任务
机器翻译 支持多种语言
O
Helsinki-NLP
442.08k
367
Opus Mt Zh En
由赫尔辛基大学开发的基于OPUS语料库的中文到英语机器翻译模型
机器翻译 支持多种语言
O
Helsinki-NLP
441.24k
505
Mbart Large 50 Many To Many Mmt
基于mBART-large-50微调的多语言机器翻译模型,支持50种语言间的互译
机器翻译 支持多种语言
M
facebook
404.66k
357
Opus Mt De En
Apache-2.0
opus-mt-de-en 是一个基于 transformer-align 架构的德语到英语的机器翻译模型,由 Helsinki-NLP 团队开发。
机器翻译 支持多种语言
O
Helsinki-NLP
404.33k
44
Opus Mt Es En
Apache-2.0
这是一个基于Transformer架构的西班牙语到英语的机器翻译模型,由Helsinki-NLP团队开发。
机器翻译
Transformers 支持多种语言

O
Helsinki-NLP
385.40k
71
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98