大得不同:推荐系统模型与NLP模型
推荐系统和自然语言处理是大模型高发的两大应用领域,在大的特征下,它们又有各自的特点。下面以推荐系统的代表模型DLRM(Deep Learning Recommendation Model)和GPT-3(Generative Pre-Training)为例说明。
可以看到,推荐系统模型参数大部分在embeddings部分,而NLP模型参数大部分在FC(transformer)部分。可以认为推荐系统比NLP更稀疏(sparse)、且memory intensive得多。
basic参数
or : total number of transformer blocks
or : number of units in each bottleneck layer, and number of units of each Q/K/V input
or : number of heads of each transformer block
or : input sequence length
derived参数
: dimension of each attention head,
: intermediate layer units of feed forward layer,
各参数在子图中的示意如下:
应用 | 模型 | ||||
NLP | GPT-3 | 96 | 12288 | 96 | 2048 |
NLP | BERT_Base | 12 | 768 | 12 | 128/512 |
NLP | BERT_Large | 24 | 1024 | 16 | 128/512 |
RecSys | BST | 1 | 128(max) | 8 | 20 |
BST: Behavior Sequence Transformer
原文:https://www.cnblogs.com/Matrix_Yao/p/15054002.html