yes, vocab_size returns unique words unless you limit vocab size to some value.
I think you have to use the same embeddings which was used in training phase.
I am not sure about 3, if you want to use the logic of average embeddings from train set to fill unknown tokens in train set.
instead, you can initialize unk_init = torch.Tensor.normal_. so that, pytorch will initialize unknown words via Gaussian distribution and this can be applied to train and test sets.