Seq2Seq Transformer model for normalizing Vietnamese address strings to canonical post-2025 administrative form. Uses province-constrained beam search over 187K clean canonical addresses.
This model has been adapted to run on Ascend NPU (Ascend910B). Key adaptations:
npu:0Model device: npu:0
input_ids device: npu:0
encoder output device: npu:0pip install -r requirements.txt
python inference.py "p tan dinh q1 tphcm"python inference.py "p tan dinh q1 tphcm"from inference import normalize
result = normalize("p tan dinh q1 tphcm")
print(result["canonical"]) # "Phường Tân Định, Thành phố Hồ Chí Minh"
print(result["valid"]) # True| Metric | Value |
|---|---|
| Model parameters | 6.59M |
| Inference latency | ~1000-1500ms (NPU, warm) |
| Search space | 170-699 candidates |

MIT