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