A bidirectional Vietnamese-Chinese Neural Machine Translation model trained with curriculum learning and RoPE attention.
1import torch
2from model.transformer_model import TransformerModel
3
4# Load checkpoint
5checkpoint = torch.load('model.pt', map_location='cuda')
6model = TransformerModel(checkpoint['config'], vocab_size=8000)
7model.load_state_dict(checkpoint['model_state_dict'])
8model.eval()
9
10# Inference (tokenization and decoding depend on SentencePiece)
11# See training/utils.py for greedy_decode and beam_search_decode
1@misc{vn_zh_nmt,
2 title={Vietnamese-Chinese Neural Machine Translation},
3 author={Duy},
4 year={2026}
5}
This project is licensed under the MIT License.