Instructions to use Aiden1020/SubtitleEN2TW-0.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Aiden1020/SubtitleEN2TW-0.6B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Aiden1020/SubtitleEN2TW-0.6B", filename="SubtitleEN2TW-0.6B-Q5_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Aiden1020/SubtitleEN2TW-0.6B 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 Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M # Run inference directly in the terminal: llama cli -hf Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M # Run inference directly in the terminal: llama cli -hf Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
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 Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
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 Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
Use Docker
docker model run hf.co/Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use Aiden1020/SubtitleEN2TW-0.6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aiden1020/SubtitleEN2TW-0.6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aiden1020/SubtitleEN2TW-0.6B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
- Ollama
How to use Aiden1020/SubtitleEN2TW-0.6B with Ollama:
ollama run hf.co/Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
- Unsloth Studio
How to use Aiden1020/SubtitleEN2TW-0.6B 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 Aiden1020/SubtitleEN2TW-0.6B 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 Aiden1020/SubtitleEN2TW-0.6B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Aiden1020/SubtitleEN2TW-0.6B to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Aiden1020/SubtitleEN2TW-0.6B with Docker Model Runner:
docker model run hf.co/Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
- Lemonade
How to use Aiden1020/SubtitleEN2TW-0.6B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Aiden1020/SubtitleEN2TW-0.6B:Q5_K_M
Run and chat with the model
lemonade run user.SubtitleEN2TW-0.6B-Q5_K_M
List all available models
lemonade list
SubtitleEN2TW-0.6B (Q5_K_M GGUF)
A fine-tuned quantized model for cue-level, context-aware English → Taiwan Traditional Chinese subtitle translation, optimized for local real-time inference.
Model Details
| Item | Value |
|---|---|
| Base model | NiuTrans/LMT-60-0.6B |
| Fine-tuning method | Supervised Fine-Tuning (SFT), causal LM loss on assistant turn only |
| Task | EN → TW subtitle translation, cue-level, 0–3 cues of context |
| Quantization | Q5_K_M (GGUF, via llama.cpp) |
| Best checkpoint | Step 22,000 · eval loss 1.4804 |
| Precision | BF16 during training |
| Context window | 256 tokens (subtitle cues are short) |
Intended Use
This model is designed for one task only:
Given recent English subtitle cues as context and the current English subtitle cue, output only the Taiwan Traditional Chinese translation of the current cue.
In scope:
- Real-time local subtitle overlay
- Cue-level streaming inference
- English → Taiwan Traditional Chinese (繁體中文・台灣用語)
Out of scope:
- General-purpose translation
- Long-document translation
- Simplified Chinese output
- General instruction following
Input / Output Format
CTX:
<0–3 previous English subtitle cues>
CUR:
<current English subtitle cue>
Output: Taiwan Traditional Chinese translation of CUR only.
Example:
CTX:
I sent you the file.
Check your inbox.
CUR:
You got it?
Expected output:
你收到了嗎?
Usage (llama.cpp)
./llama-cli \
-m SubtitleEN2TW-0.6B-Q5_K_M.gguf \
--temp 0.0 \
-p "CTX:\nI sent you the file.\nCheck your inbox.\n\nCUR:\nYou got it?" \
-n 64
Usage (Python · llama-cpp-python)
from llama_cpp import Llama
llm = Llama(model_path="SubtitleEN2TW-0.6B-Q5_K_M.gguf", n_ctx=256)
ctx_cues = ["I sent you the file.", "Check your inbox."]
cur_cue = "You got it?"
ctx_block = "\n".join(ctx_cues)
prompt = f"CTX:\n{ctx_block}\n\nCUR:\n{cur_cue}"
out = llm(prompt, max_tokens=64, temperature=0.0, stop=["\n\n"])
print(out["choices"][0]["text"].strip())
Training Data
The SFT dataset was built from two public subtitle corpora. The actual dataset is not redistributed due to upstream licensing constraints. Pipeline details and the diagnostic test set are available at Aiden1020/SubtitleEN2TW-SFT-Pipeline.
| Source | Format | Language pair | Scale (before filtering) |
|---|---|---|---|
| OpenSubtitles v2024 (OPUS) | Moses parallel text | en – zh_TW |
~18.6 M sentence pairs |
| TVSub | Timestamped subtitle cues | en – zh |
~2.2 M cue pairs |
Filtering steps applied:
- Text cleaning: remove HTML/ASS/VTT tags, music symbols, encoding-corruption markers (PUA chars, kana, Cyrillic), subtitle-group watermarks
- Simplified Chinese rejection: OpenCC s2t diff ratio > 3% → dropped
- CTX-leakage filter: discard samples where the Chinese target is disproportionately longer than the English cue, or closely matches the previous Chinese cue
- English-echo filter: discard samples where the English source appears verbatim in the Chinese output
- Length validation: English 1–200 chars, Chinese 1–120 chars
Context size distribution in training set (0–3 cues): 30% / 30% / 25% / 15%.
A small manually curated diagnostic set (~3% mix-in) was included to cover leakage probes, short responses, ambiguous phrases, and Taiwan terminology.
Limitations
- Trained on subtitle-domain data only; may produce unnatural output for other domains.
- The training data is primarily from OpenSubtitles which contains crowd-sourced subtitles; quality varies.
- Output targets Taiwan Traditional Chinese style but may occasionally produce Hong Kong or neutral Traditional Chinese forms.
- Context crossing episode boundaries is treated as acceptable noise; no document-level segmentation is applied.
- Not suitable for general chat or instruction following.
Citation
If you use this model, please also cite the base model:
@misc{luoyf2025lmt,
title={NiuTrans.LMT: Toward Inclusive and Scalable Multilingual Machine Translation with LLMs},
author={Yingfeng Luo, Ziqiang Xu, Yuxuan Ouyang, Murun Yang, Dingyang Lin, Kaiyan Chang, Tong Zheng, Bei Li, Peinan Feng, Quan Du, Tong Xiao, Jingbo Zhu},
year={2025},
eprint={2511.07003},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2511.07003}
}
License
This model is released under the Apache License 2.0.
See NOTICE for third-party attribution.
- Downloads last month
- 47
5-bit