Instructions to use MoYoYoTech/Translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use MoYoYoTech/Translator with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MoYoYoTech/Translator", filename="moyoyo_asr_models/qwen2.5-1.5b-instruct-q5_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use MoYoYoTech/Translator with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoYoYoTech/Translator:Q5_0 # Run inference directly in the terminal: llama-cli -hf MoYoYoTech/Translator:Q5_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoYoYoTech/Translator:Q5_0 # Run inference directly in the terminal: llama-cli -hf MoYoYoTech/Translator:Q5_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf MoYoYoTech/Translator:Q5_0 # Run inference directly in the terminal: ./llama-cli -hf MoYoYoTech/Translator:Q5_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf MoYoYoTech/Translator:Q5_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf MoYoYoTech/Translator:Q5_0
Use Docker
docker model run hf.co/MoYoYoTech/Translator:Q5_0
- LM Studio
- Jan
- Ollama
How to use MoYoYoTech/Translator with Ollama:
ollama run hf.co/MoYoYoTech/Translator:Q5_0
- Unsloth Studio
How to use MoYoYoTech/Translator with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MoYoYoTech/Translator to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MoYoYoTech/Translator to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MoYoYoTech/Translator to start chatting
- Pi
How to use MoYoYoTech/Translator with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf MoYoYoTech/Translator:Q5_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MoYoYoTech/Translator:Q5_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MoYoYoTech/Translator with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf MoYoYoTech/Translator:Q5_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MoYoYoTech/Translator:Q5_0
Run Hermes
hermes
- Docker Model Runner
How to use MoYoYoTech/Translator with Docker Model Runner:
docker model run hf.co/MoYoYoTech/Translator:Q5_0
- Lemonade
How to use MoYoYoTech/Translator with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MoYoYoTech/Translator:Q5_0
Run and chat with the model
lemonade run user.Translator-Q5_0
List all available models
lemonade list
daihui.zhang commited on
Commit ·
b37f1c3
1
Parent(s): ad6ae02
update prompts and words
Browse files- config/hotwords.json +16 -1
- config/hotwords.txt +3 -0
- config/keywords.txt +5 -1
- config/prompt.py +19 -12
- config/settings.py +2 -2
config/hotwords.json
CHANGED
|
@@ -5,8 +5,23 @@
|
|
| 5 |
"GO SAME": "GOSIM",
|
| 6 |
"go same": "GOSIM",
|
| 7 |
"GoSync": "GOSIM",
|
|
|
|
| 8 |
"CSN": "CSDN",
|
| 9 |
"CSDF": "CSDN",
|
| 10 |
"CSTN": "CSDN",
|
| 11 |
-
"OpenAZI": "Open AGI"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
|
|
|
| 5 |
"GO SAME": "GOSIM",
|
| 6 |
"go same": "GOSIM",
|
| 7 |
"GoSync": "GOSIM",
|
| 8 |
+
"Go Son": "GOSIM",
|
| 9 |
"CSN": "CSDN",
|
| 10 |
"CSDF": "CSDN",
|
| 11 |
"CSTN": "CSDN",
|
| 12 |
+
"OpenAZI": "Open AGI",
|
| 13 |
+
"CSdn": "CSDN",
|
| 14 |
+
"DeepSeq": "DeepSeek",
|
| 15 |
+
"deep sig": "DeepSeek",
|
| 16 |
+
"deep sick": "DeepSeek",
|
| 17 |
+
"chat GBT": "ChatGPT",
|
| 18 |
+
"Deep sike": "DeepSeek",
|
| 19 |
+
"Deep sink": "DeepSeek",
|
| 20 |
+
"它跟face": "huggingface",
|
| 21 |
+
"拉么index": "LlamaIndex",
|
| 22 |
+
"lama index": "LlamaIndex",
|
| 23 |
+
"rug": "RAG",
|
| 24 |
+
"defive": "Dify",
|
| 25 |
+
"define": "Dify",
|
| 26 |
+
"open minus":"open manus"
|
| 27 |
}
|
config/hotwords.txt
CHANGED
|
@@ -32,3 +32,6 @@ MoXIN
|
|
| 32 |
Function
|
| 33 |
Func
|
| 34 |
Lava
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
Function
|
| 33 |
Func
|
| 34 |
Lava
|
| 35 |
+
C++
|
| 36 |
+
阿里
|
| 37 |
+
pipeline
|
config/keywords.txt
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
OpenAGI
|
| 2 |
GOSIM
|
| 3 |
Rust
|
| 4 |
-
LLaMA Factory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
OpenAGI
|
| 2 |
GOSIM
|
| 3 |
Rust
|
| 4 |
+
LLaMA Factory
|
| 5 |
+
OPENGL
|
| 6 |
+
GPU
|
| 7 |
+
Web3
|
| 8 |
+
DeepSeek
|
config/prompt.py
CHANGED
|
@@ -34,16 +34,23 @@ LLM_SYS_7B_PROMPT_EN = """
|
|
| 34 |
""".format(keywords_mapping_string=keywords_mapping_string)
|
| 35 |
|
| 36 |
LLM_SYS_7B_PROMPT_ZH = """
|
| 37 |
-
你是一
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
文本:"""
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
""".format(keywords_mapping_string=keywords_mapping_string)
|
| 35 |
|
| 36 |
LLM_SYS_7B_PROMPT_ZH = """
|
| 37 |
+
你是一位中英文翻译专家。请将以下中文文本翻译成英文,遵循以下要求:
|
| 38 |
+
|
| 39 |
+
翻译要求:
|
| 40 |
+
- 保留原文英文内容:以下内容请保持原始英文形式,不进行翻译或改写:
|
| 41 |
+
- 技术术语与专业词汇
|
| 42 |
+
- 产品名称、品牌名称
|
| 43 |
+
- 代码片段、函数名、变量名
|
| 44 |
+
- 专有名词、缩写、首字母缩略词(如 API、NLP、RAG 等)
|
| 45 |
+
- 翻译符合英文表达习惯,流畅自然,不生硬直译。
|
| 46 |
+
- 保持专业性与准确性,清晰传达原意。
|
| 47 |
+
- 如遇原文表达模糊或逻辑不清的情况,允许适度调整语序或措辞,以增强英文表述的清晰度和逻辑性。
|
| 48 |
+
|
| 49 |
+
注意:
|
| 50 |
+
若难以确定某个词汇是否需要翻译,请优先保留原始英文形式。
|
| 51 |
+
不需添加额外解释或注释,仅翻译正文内容。
|
| 52 |
+
|
| 53 |
文本:"""
|
| 54 |
+
|
| 55 |
+
LLM_SYS_PROMPT_EN = LLM_SYS_7B_PROMPT_EN
|
| 56 |
+
LLM_SYS_PROMPT_ZH =LLM_SYS_7B_PROMPT_ZH
|
config/settings.py
CHANGED
|
@@ -60,8 +60,8 @@ WHISPER_MODEL_EN = 'large-v3-turbo-q5_0'
|
|
| 60 |
WHISPER_MODEL_ZH = 'large-v3-turbo-q5_0'
|
| 61 |
# LLM
|
| 62 |
LLM_MODEL_PATH = (MODEL_DIR / "qwen2.5-1.5b-instruct-q5_0.gguf").as_posix()
|
| 63 |
-
|
| 64 |
-
LLM_LARGE_MODEL_PATH = (MODEL_DIR / "qwen2.5-7b-instruct-q5_0-00001-of-00002.gguf").as_posix()
|
| 65 |
|
| 66 |
# VAD
|
| 67 |
VAD_MODEL_PATH = (MODEL_DIR / "silero-vad" / "silero_vad.onnx").as_posix()
|
|
|
|
| 60 |
WHISPER_MODEL_ZH = 'large-v3-turbo-q5_0'
|
| 61 |
# LLM
|
| 62 |
LLM_MODEL_PATH = (MODEL_DIR / "qwen2.5-1.5b-instruct-q5_0.gguf").as_posix()
|
| 63 |
+
LLM_LARGE_MODEL_PATH = (MODEL_DIR / "qwen2.5-1.5b-instruct-q5_0.gguf").as_posix()
|
| 64 |
+
# LLM_LARGE_MODEL_PATH = (MODEL_DIR / "qwen2.5-7b-instruct-q5_0-00001-of-00002.gguf").as_posix()
|
| 65 |
|
| 66 |
# VAD
|
| 67 |
VAD_MODEL_PATH = (MODEL_DIR / "silero-vad" / "silero_vad.onnx").as_posix()
|