Help us to help you. It will be interesting that you show where you created model_embed and the code of the training_model  function.
As I see model_embed is passed instead of the model parameter of the training_model function.
Apparently model_embed is a string (str) and not a subclass of torch.nn.Module (and therefore has no parameters attribute).