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 ·
1bf4992
1
Parent(s): 3a0633a
fix words missing
Browse files- pyproject.toml +1 -0
- requirements.txt +1 -0
- transcribe/whisper_llm_serve.py +5 -1
- uv.lock +0 -0
pyproject.toml
CHANGED
|
@@ -7,6 +7,7 @@ requires-python = ">=3.11"
|
|
| 7 |
dependencies = [
|
| 8 |
"av>=14.2.0",
|
| 9 |
"fastapi>=0.115.12",
|
|
|
|
| 10 |
"librosa>=0.11.0",
|
| 11 |
"numpy>=2.1.3",
|
| 12 |
"onnxruntime>=1.21.0",
|
|
|
|
| 7 |
dependencies = [
|
| 8 |
"av>=14.2.0",
|
| 9 |
"fastapi>=0.115.12",
|
| 10 |
+
"funasr>=1.2.6",
|
| 11 |
"librosa>=0.11.0",
|
| 12 |
"numpy>=2.1.3",
|
| 13 |
"onnxruntime>=1.21.0",
|
requirements.txt
CHANGED
|
@@ -184,3 +184,4 @@ websockets==15.0.1
|
|
| 184 |
# via trans (pyproject.toml)
|
| 185 |
wordninja==2.0.0
|
| 186 |
# via trans (pyproject.toml)
|
|
|
|
|
|
| 184 |
# via trans (pyproject.toml)
|
| 185 |
wordninja==2.0.0
|
| 186 |
# via trans (pyproject.toml)
|
| 187 |
+
funasr==1.2.6
|
transcribe/whisper_llm_serve.py
CHANGED
|
@@ -180,9 +180,13 @@ class WhisperTranscriptionService:
|
|
| 180 |
|
| 181 |
while not self._translate_thread_stop.is_set():
|
| 182 |
audio_buffer = self._vad_frame_queue.get()
|
| 183 |
-
if audio_buffer is None
|
| 184 |
time.sleep(0.2)
|
| 185 |
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
| 187 |
logger.debug(f"audio buffer size: {len(audio_buffer) / self.sample_rate:.2f}s")
|
| 188 |
# try:
|
|
|
|
| 180 |
|
| 181 |
while not self._translate_thread_stop.is_set():
|
| 182 |
audio_buffer = self._vad_frame_queue.get()
|
| 183 |
+
if audio_buffer is None:
|
| 184 |
time.sleep(0.2)
|
| 185 |
continue
|
| 186 |
+
if len(audio_buffer) < int(self.sample_rate):
|
| 187 |
+
silence_audio = np.zeros(self.sample_rate, dtype=np.float32)
|
| 188 |
+
silence_audio[-len(audio_buffer):] = audio_buffer
|
| 189 |
+
audio_buffer = silence_audio
|
| 190 |
|
| 191 |
logger.debug(f"audio buffer size: {len(audio_buffer) / self.sample_rate:.2f}s")
|
| 192 |
# try:
|
uv.lock
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|