Hi, I have a model defined as the following:
Doc2VecModel(
(word_embeddings): Embedding(23026, 400)
(doc_embeddings): Embedding(23026, 400)
(linear): Linear(in_features=400, out_features=23026, bias=True)
(linear2): Linear(in_features=800, out_features=400, bias=True)
(log_softmax): LogSoftmax(dim=1)
)
The program takes a long time to execute, wrapping the model in DDP ie:
DDP(model, device_ids=[gpu_id])
However, if I reduce the size of the model to something like this:
Doc2VecModel(
(word_embeddings): Embedding(400, 400)
(doc_embeddings): Embedding(400, 400)
(linear): Linear(in_features=400, out_features=400, bias=True)
(linear2): Linear(in_features=400, out_features=400, bias=True)
(log_softmax): LogSoftmax(dim=1)
)
then it executes almost instantly. Is there a way to speed up the model transformation for the first model?