KJ-X Korean–Japanese Translation
KJ-X is a custom PyTorch encoder-decoder model for bidirectional Korean↔Japanese translation. The uploaded release contains inference exports and its SentencePiece tokenizer; training datasets and training checkpoints are not distributed.
Files
model_ema.pt: recommended FP32 EMA inference exportmodel_int8.pt: smaller CPU-only dynamic INT8 exportkjx.model,kjx.vocab,token_features.npz: tokenizer files
The model uses custom code from
gaon12/sion_translate and is not a Transformers
AutoModel checkpoint.
Quick start
python -m pip install "sion-translate @ git+https://github.com/gaon12/sion_translate.git@ad09f1bb906bf30ae15cbd177df549ac812cc853"
hf download gaon12/sion_translate \
model_ema.pt kjx.model kjx.vocab token_features.npz \
--local-dir models/sion_translate
from sion_translate.inference import Translator
translator = Translator(
"models/sion_translate/model_ema.pt",
"models/sion_translate/kjx.model",
device="cuda", # Use "cpu" when CUDA is unavailable.
)
print(translator.translate(["안녕하세요."], target_language="ja", num_beams=4)[0])
print(translator.translate(["こんにちは。"], target_language="ko", num_beams=4)[0])
Translator automatically finds token_features.npz beside the model/tokenizer. The model is
custom code, so transformers.AutoModel and hosted Transformers inference are not supported.
For a smaller CPU download, replace model_ema.pt with model_int8.pt and set device="cpu".
The INT8 export is CPU-only. Only load PyTorch artifacts from repositories you trust.
Reproducible smoke test
After downloading the files above, run this from a clean environment to exercise both directions:
python - <<'PY'
from sion_translate.inference import Translator
translator = Translator("models/sion_translate/model_ema.pt", "models/sion_translate/kjx.model")
for text, target in [("안녕하세요.", "ja"), ("こんにちは。", "ko")]:
output = translator.translate([text], target_language=target, num_beams=1)[0]
assert isinstance(output, str) and output.strip(), output
print(f"{text} -> {output}")
PY
Evaluation
The GitHub repository includes a small, independently authored diagnostic JSONL covering both directions and provides a common scorer for KJ-X, LibreTranslate, Papago, Google Translation, DeepL, M2M100 418M, and NLLB-200. No universal quality claim is made from that small set.
Limitations
- Machine translations can omit, add, or reverse meaning.
- Proper nouns, short context-dependent utterances, specialist terminology, and long inputs need human review.
- Do not use unreviewed output for medical, legal, safety-critical, or certified translation.
- The custom architecture requires the repository code; hosted Transformers inference is not available out of the box.
License
The original KJ-X code and uploaded model release are provided under the MIT License. This does not grant rights to user-provided inputs, generated service outputs, third-party software, or third-party models used only as comparison baselines.