Tailoring transformer-based deep learning for code generation and translation