Here’s a solution that’s a bit hacky but should give you what you want:
def f(weight):
    m = MultinomialLogitWithEmbeddings(1, 1)
    m.linear.weight.data = weight
    x_cont = torch.ones(1, 1, 1)
    x_cat = torch.LongTensor([[[0]]])
    return m(x_cont, x_cat)

hessian = torch.autograd.functional.hessian(f, model.linear.weight)