为什么baichuan模型中只有decodelayer,没有encodelayer?transformer模型架构中不是还有编码层吗?
这行代码self.layers = nn.ModuleList([DecoderLayer(config) for _ in range(config.num_hidden_layers)]) 只有decoderLayer
class Model(PreTrainedModel):
"""
Transformer decoder consisting of config.num_hidden_layers layers. Each layer is a [DecoderLayer]
Required prerequisites
Questions
为什么baichuan模型中只有decodelayer,没有encodelayer?transformer模型架构中不是还有编码层吗? 这行代码self.layers = nn.ModuleList([DecoderLayer(config) for _ in range(config.num_hidden_layers)]) 只有decoderLayer class Model(PreTrainedModel): """ Transformer decoder consisting of config.num_hidden_layers layers. Each layer is a [
DecoderLayer
]Checklist