ColossalAI icon indicating copy to clipboard operation
ColossalAI copied to clipboard

[BUG]: weight duplicate in ParallelFreqAwareEmbeddingBag

Open zxgx opened this issue 3 years ago • 0 comments

🐛 Describe the bug

I suppose ParallelFreqAwareEmbeddingBag._weight should be a ColoTensor, otherwise it would be moved to GPU when some Model containing this embedding uses .cuda(). That's why I observed the memory leakage: 4ZgYZqe5vr

Besides, as I've indicated, this weight is also duplicated in CachedParamMgr in this Line

In a word, I believe another design of the weight shared between ParallelFreqAwareEmbeddingBag and CachedParamMgr is in need, and I'm working on it.

Environment

No response

zxgx avatar Aug 11 '22 08:08 zxgx