So the linear layer does a linear transformation on the given data by multiplying it with a learned transformation matrix (and optionally adding bias). This (transposed) transformation matrix is of the shape output_features * input_features, which in the case of the classification layer is n_classes * model_hidden_size. I do not understand why you bring the vocabulary size into play, as it is not important at this stage.