Instructions to use MoYoYoTech/Translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MoYoYoTech/Translator with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -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 serve -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/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -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
- Llama new
- LM Studio
- Jan
- Ollama
How to use MoYoYoTech/Translator with Ollama:
ollama run hf.co/MoYoYoTech/Translator:Q5_0
- Unsloth Desktop
- 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 serve -hf MoYoYoTech/Translator:Q5_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MoYoYoTech/Translator:Q5_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- 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
- Hermes Agent
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 serve -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:9931/v1 hermes config set model.default MoYoYoTech/Translator:Q5_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MoYoYoTech/Translator with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MoYoYoTech/Translator:Q5_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "MoYoYoTech/Translator:Q5_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
daihui.zhang commited on
Commit ·
ab22d1a
1
Parent(s): 0b0ef2f
fix error handle in main
Browse filesFiles changed (2)
- main.py+7-5
- transcribe/whisper_llm_serve.py+21-12
123463 unmodified lines68697071727374757677from fastapi import FastAPI, WebSocketfrom urllib.parse import urlparse, parse_qslfrom transcribe.whisper_llm_serve import PyWhiperCppServefrom uuid import uuid163 unmodified linesclient.set_lang(from_lang, to_lang)logger.info(f"Source lange: {from_lang} -> Dst lange: {to_lang}")await websocket.accept()while True:frame_data = await get_audio_from_websocket(websocket)client.add_frames(frame_data)if __name__ == '__main__':freeze_support()123463 unmodified lines686970717273747576777879from fastapi import FastAPI, WebSocket, WebSocketDisconnectfrom urllib.parse import urlparse, parse_qslfrom transcribe.whisper_llm_serve import PyWhiperCppServefrom uuid import uuid163 unmodified linesclient.set_lang(from_lang, to_lang)logger.info(f"Source lange: {from_lang} -> Dst lange: {to_lang}")await websocket.accept()try:while True:frame_data = await get_audio_from_websocket(websocket)client.add_frames(frame_data)except WebSocketDisconnect:returnif __name__ == '__main__':freeze_support()
35 unmodified lines3637383940414243441 unmodified line46474849505120 unmodified lines7273747576777866 unmodified lines14514614714814915015169 unmodified lines2212222232242252262272282292302318 unmodified lines24024124224324435 unmodified linesself.sample_rate = 16000self.send_ready_state()self.run_in_thread(self.speech_to_text)self.run_in_thread(self.get_frame_from_queue)self.text_sep = ""1 unmodified linet = threading.Thread(target=func)t.daemon = Truet.start()def send_ready_state(self):self.websocket.send(json.dumps({20 unmodified linesdef get_frame_from_queue(self,):while True:try:frame_np = self._frame_queue.get(timeout=0.1)with self.lock:66 unmodified linesdef speech_to_text(self):# c = 0while True:if self.exit:logger.info("Exiting speech to text thread")break69 unmodified lines)def send_to_client(self, data:TransResult):coro = self.websocket.send_text(Message(result=data, request_id=self.client_uid).model_dump_json(by_alias=True))asyncio.run(coro)def get_audio_chunk_for_processing(self):8 unmodified linespadded_audio = np.concatenate([silence, self.frames_np])return padded_audio.copy()def cleanup(self):return super().cleanup()#35 unmodified lines363738394041424344451 unmodified line4748495051525320 unmodified lines7475767778798066 unmodified lines14714814915015115215369 unmodified lines2232242252262272282292302312322332342352362372382398 unmodified lines24824925025125225335 unmodified linesself.sample_rate = 16000self.send_ready_state()self._translate_thread_stop = threading.Event()self._frame_to_queue_thread_stop = threading.Event()self.translate_thread = self.run_in_thread(self.speech_to_text)self.frame_to_queue_thread = self.run_in_thread(self.get_frame_from_queue)self.text_sep = ""1 unmodified linet = threading.Thread(target=func)t.daemon = Truet.start()return tdef send_ready_state(self):self.websocket.send(json.dumps({20 unmodified linesdef get_frame_from_queue(self,):while not self._frame_to_queue_thread_stop.is_set():try:frame_np = self._frame_queue.get(timeout=0.1)with self.lock:66 unmodified linesdef speech_to_text(self):# c = 0while not self._translate_thread_stop.is_set():if self.exit:logger.info("Exiting speech to text thread")break69 unmodified lines)def send_to_client(self, data:TransResult):try:coro = self.websocket.send_text(Message(result=data, request_id=self.client_uid).model_dump_json(by_alias=True))asyncio.run(coro)except RuntimeError as e:self.stop()returnexcept Exception as e:logger.error(e)def get_audio_chunk_for_processing(self):8 unmodified linespadded_audio = np.concatenate([silence, self.frames_np])return padded_audio.copy()def stop(self):self._translate_thread_stop.set()self._frame_to_queue_thread_stop.set()
main.py+7-5
transcribe/whisper_llm_serve.py+21-12