Hi,
For the first point, I think the cpp API has a very different goal. If you were using it, you would need to reimplement your model in CPP and then load_state_dict like you would do in python.
TorchScript does not require that as it allows you to serialize the whole model with the weights.
For the tokens in your model I’m not sure  But if you use torchscript, it should just behave like the python version of your model. So you just need to make sure not to do extra padding on the python side.