Your code and comments are not really helpful, so I can only make some half-informed guesses.
I assume the shape of inputs is (1, 3) since it comes from a array called trigrams. After embeds=self.embeddings(inputs) the shape of embeds is (1, 3, 10) with 10 being the embed_dim. After embeds=embeds.view(1,-1) the shape of embeds is (1, 30).
However, self.linear1=nn.Linear(context_size*embedding_dim,128), given your parameter values means self.linear1=nn.Linear(2*10,128). Here you have to mismatch between the tensor of size 30 from embeds and the expected size of 20 from self.linear1.
If my assumptions are correct, model=NGram(len(vocab),10,3) should help.