1.Transformer架构
首先看一下transformer的结构图:
解释一下这个结构图。首先,Transformer模型也是使用经典的encoer-decoder架构,由encoder和decoder两部分组成。
-
-上图的左半边用
Nx
框出来的,就是我们的encoder的一层。encoder一共有6层这样的结构。 -
-上图的右半边用
Nx
框出来的,就是我们的decoder的一层。decoder一共有6层这样的结构。 -
-输入序列经过word embedding和positional encoding相加后,输入到encoder。
-
-输出序列经过word embedding和positional encoding相加后,输入到decoder。
-
-最后,decoder输出的结果,经过一个线性层,然后计算softmax。
-
-word embedding和positional encoding我后面会解释。我们首先详细地分析一下encoder和decoder的每一层是怎么样的。
2.Encoder
encoder由6层相同的层组成,每一层分别由两部分组成:
-
第一部分是一个multi-head self-attention mechanism
-
第二部分是一个position-wise feed-forward network,是一个全连接层
两个部分,都有一个残差连接(residual connection),然后接着一个Layer Normalization。
如果你是一个新手,你可能会问:
-
multi-head self-attention 是什么呢?
-
参差结构是什么呢?
-
Layer Normalization又是什么?
这些问题我们在后面会一一解答。
3.Decoder
和encoder类似,decoder由6个相同的层组成,每一个层包括以下3个部分:
-
第一个部分是multi-head self-attention mechanism
-
第二部分是multi-head context-attention mechanism
-
第三部分是一个position-wise feed-forward network
还是和encoder类似,上面三个部分的每一个部分,都有一个残差连接,后接一个Layer Normalization。
但是,decoder出现了一个新的东西multi-head context-attention mechanism。这个东西其实也不复杂,理解了multi-head self-attention你就可以理解multi-head context-attention。这个我们后面会讲解。
4.Attention机制
在讲清楚各种attention之前,我们得先把attention机制说清楚。
通俗来说,attention是指,对于某个时刻的输出y
,它在输入x
上各个部分的注意力。这个注意力实际上可以理解为权重。
attention机制也可以分成很多种,一问有一张比较全面的表格:
上面第一种additive attention你可能听过。以前我们的seq2seq模型里面,使用attention机制,这种**加性注意力(additive attention)**用的很多。Google的项目tensorflow/nmt里面使用的attention就是这种。
为什么这种attention叫做additive attention呢?很简单,对于输入序列隐状态和输出序列的隐状态
,它的处理方式很简单,直接合并,变成
。
但是我们的transformer模型使用的不是这种attention机制,使用的是另一种,叫做乘性注意力(multiplicative attention)。
那么这种乘性注意力机制是怎么样的呢?从上表中的公式也可以看出来:两个隐状态进行点积!
5.Self-attention是什么?
到这里就可以解释什么是self-attention了。
所谓self-attention实际上就是,输出序列就是输入序列!因此,计算自己的attention得分,就叫做self-attention!
6.Context-attention是什么?
知道了self-attention,那你肯定猜到了context-attention是什么了:它是encoder和decoder之间的attention!所以,你也可以称之为encoder-decoder attention!
context-attention一词并不是本人原创,有些文章或者代码会这样描述,我觉得挺形象的,所以在此沿用这个称呼。其他文章可能会有其他名称,但是不要紧,我们抓住了重点即可,那就是两个不同序列之间的attention,与self-attention相区别。
不管是self-attention还是context-attention,它们计算attention分数的时候,可以选择很多方式,比如上面表中提到的:
-
additive attention
-
local-base
-
general
-
dot-product
-
scaled dot-product
那么我们的Transformer模型,采用的是哪种呢?答案是:scaled dot-product attention。
7.Scaled dot-product attention是什么?
论文Attention is all you need里面对于attention机制的描述是这样的:
An attention function can be described as a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed by a compatibility of the query with the corresponding key.
这句话描述得很清楚了。翻译过来就是:通过确定Q和K之间的相似程度来选择V!
用公式来描述更加清晰:
首先说明一下我们的K、Q、V是什么:
-
在encoder的self-attention中,Q、K、V都来自同一个地方(相等),他们是上一层encoder的输出。对于第一层encoder,它们就是word embedding和positional encoding相加得到的输入。
-
在decoder的self-attention中,Q、K、V都来自于同一个地方(相等),它们是上一层decoder的输出。对于第一层decoder,它们就是word embedding和positional encoding相加得到的输入。但是对于decoder,我们不希望它能获得下一个time step(即将来的信息),因此我们需要进行sequence masking。
-
在encoder-decoder attention中,Q来自于decoder的上一层的输出,K和V来自于encoder的输出,K和V是一样的。
-
Q、K、V三者的维度一样,即
上面scaled dot-product attention和decoder的self-attention都出现了masking这样一个东西。那么这个mask到底是什么呢?这两处的mask操作是一样的吗?这个问题在后面会有详细解释。
8.Scaled dot-product attention的实现
咱们先把scaled dot-product attention实现了吧。代码如下:
import torchimport torch.nn as nn
class ScaledDotProductAttention(nn.Module): """Scaled dot-product attention mechanism."""
def __init__(self, attention_dropout=0.0): super(ScaledDotProductAttention, self).__init__() self.dropout = nn.Dropout(attention_dropout) self.softmax = nn.Softmax(dim=2)
def forward(self, q, k, v, scale=None, attn_mask=None): """前向传播.
Args: q: Queries张量,形状为[B, L_q, D_q] k: Keys张量,形状为[B, L_k, D_k] v: Values张量,形状为[B, L_v, D_v],一般来说就是k scale: 缩放因子,一个浮点标量 attn_mask: Masking张量,形状为[B, L_q, L_k]
Returns: 上下文张量和attetention张量 """ attention = torch.bmm(q, k.transpose(1, 2)) if scale: attention = attention * scale if attn_mask: # 给需要mask的地方设置一个负无穷 attention = attention.masked_fill_(attn_mask, -np.inf)# 计算softmax attention = self.softmax(attention)# 添加dropout attention = self.dropout(attention)# 和V做点积 context = torch.bmm(attention, v) return context, attention
9.Multi-head attention又是什么呢?
下面是multi-head attention的结构图:
值得注意的是,加入不同位置的表示子空间的信息。上面所说的分成
Multi-head attention允许模型
Multi-head attention的公式如下:
其中,
10.Multi-head attention的实现
相信大家已经理清楚了multi-head attention,那么我们来实现它吧。代码如下:
import torchimport torch.nn as nn
class MultiHeadAttention(nn.Module):
def __init__(self, model_dim=512, num_heads=8, dropout=0.0): super(MultiHeadAttention, self).__init__()
self.dim_per_head = model_dim // num_heads self.num_heads = num_heads self.linear_k = nn.Linear(model_dim, self.dim_per_head * num_heads) self.linear_v = nn.Linear(model_dim, self.dim_per_head * num_heads) self.linear_q = nn.Linear(model_dim, self.dim_per_head * num_heads)
self.dot_product_attention = ScaledDotProductAttention(dropout) self.linear_final = nn.Linear(model_dim, model_dim) self.dropout = nn.Dropout(dropout)# multi-head attention之后需要做layer norm self.layer_norm = nn.LayerNorm(model_dim)
def forward(self, key, value, query, attn_mask=None):# 残差连接 residual = query
dim_per_head = self.dim_per_head num_heads = self.num_heads batch_size = key.size(0)
# linear projection key = self.linear_k(key) value = self.linear_v(value) query = self.linear_q(query)
# split by heads key = key.view(batch_size * num_heads, -1, dim_per_head) value = value.view(batch_size * num_heads, -1, dim_per_head) query = query.view(batch_size * num_heads, -1, dim_per_head)
if attn_mask: attn_mask = attn_mask.repeat(num_heads, 1, 1) # scaled dot product attention scale = (key.size(-1) // num_heads) ** -0.5 context, attention = self.dot_product_attention( query, key, value, scale, attn_mask)
# concat heads context = context.view(batch_size, -1, dim_per_head * num_heads)
# final linear projection output = self.linear_final(context)
# dropout output = self.dropout(output)
# add residual and norm layer output = self.layer_norm(residual + output)
return output, attention
上面的代码终于出现了Residual connection和**Layer normalization,**我们现在来解释它们。
11.Residual connection是什么?
残差连接其实很简单!给你看一张示意图你就明白了:
所以,代码实现residual connection很非常简单:
def residual(sublayer_fn,x):return sublayer_fn(x)+x
文章开始的transformer架构图中的Add & Norm
中的Add
也就是指的这个shortcut。
至此,residual connection的问题理清楚了。更多关于残差网络的介绍可以看文末的参考文献。
12.Layer normalization是什么?
Normalization有很多种,但是它们都有一个共同的目的,那就是把输入转化成均值为0方差为1的数据。我们在把数据送入激活函数之前进行normalization(归一化),因为我们不希望输入数据落在激活函数的饱和区。
说到normalization,那就肯定得提到Batch Normalization。BN在CNN等地方用得很多。
BN的主要思想就是:在每一层的每一批数据上进行归一化。
我们可能会对输入数据进行归一化,但是经过该网络层的作用后,我们的的数据已经不再是归一化的了。随着这种情况的发展,数据的偏差越来越大,我的反向传播需要考虑到这些大的偏差,这就迫使我们只能使用较小的学习率来防止梯度消失或者梯度爆炸。
BN的具体做法就是对每一小批数据,在批这个方向上做归一化。如下图所示:
可以看到,右半边求均值是沿着数据批量N的方向进行的!
Batch normalization的计算公式如下:
具体的实现可以查看上图的链接文章。
说完Batch normalization,就该说说咱们今天的主角Layer normalization。
那么什么是Layer normalization呢?:它也是归一化数据的一种方式,不过LN是在每一个样本上计算均值和方差,而不是BN那种在批方向计算均值和方差!
下面是LN的示意图:
和上面的BN示意图一比较就可以看出二者的区别啦!
下面看一下LN的公式,也BN十分相似:
13.Layer normalization的实现
import torchimport torch.nn as nn
class LayerNorm(nn.Module): """实现LayerNorm。其实PyTorch已经实现啦,见nn.LayerNorm。"""
def __init__(self, features, epsilon=1e-6): """Init.
Args: features: 就是模型的维度。论文默认512 epsilon: 一个很小的数,防止数值计算的除0错误 """ super(LayerNorm, self).__init__() # alpha self.gamma = nn.Parameter(torch.ones(features)) # beta self.beta = nn.Parameter(torch.zeros(features)) self.epsilon = epsilon
def forward(self, x): """前向传播.
Args: x: 输入序列张量,形状为[B, L, D] """ # 根据公式进行归一化 # 在X的最后一个维度求均值,最后一个维度就是模型的维度 mean = x.mean(-1, keepdim=True) # 在X的最后一个维度求方差,最后一个维度就是模型的维度 std = x.std(-1, keepdim=True) return self.gamma * (x - mean) / (std + self.epsilon) + self.beta
顺便提一句,Layer normalization多用于RNN这种结构。
14.Mask是什么?
现在终于轮到讲解mask了!mask顾名思义就是掩码,在我们这里的意思大概就是对某些值进行掩盖,使其不产生效果。
需要说明的是,我们的Transformer模型里面涉及两种mask。分别是padding mask和sequence mask。其中后者我们已经在decoder的self-attention里面见过啦!
其中,padding mask在所有的scaled dot-product attention里面都需要用到,而sequence mask只有在decoder的self-attention里面用到。
所以,我们之前ScaledDotProductAttention的forward
方法里面的参数attn_mask
在不同的地方会有不同的含义。这一点我们会在后面说明。
15.Padding mask
什么是padding mask呢?回想一下,我们的每个批次输入序列长度是不一样的!也就是说,我们要对输入序列进行对齐!具体来说,就是给在较短的序列后面填充0
。因为这些填充的位置,其实是没什么意义的,所以我们的attention机制不应该把注意力放在这些位置上,所以我们需要进行一些处理。
具体的做法是,把这些位置的值加上一个非常大的负数(可以是负无穷),这样的话,经过softmax,这些位置的概率就会接近0!
而我们的padding mask实际上是一个张量,每个值都是一个Boolen,值为False
的地方就是我们要进行处理的地方。
下面是实现:
def padding_mask(seq_k, seq_q):# seq_k和seq_q的形状都是[B,L] len_q = seq_q.size(1) # `PAD` is 0 pad_mask = seq_k.eq(0) pad_mask = pad_mask.unsqueeze(1).expand(-1, len_q, -1) # shape [B, L_q, L_k] return pad_mask
16.Sequence mask
文章前面也提到,sequence mask是为了使得decoder不能看见未来的信息。也就是对于一个序列,在time_step为t的时刻,我们的解码输出应该只能依赖于t时刻之前的输出,而不能依赖t之后的输出。因此我们需要想一个办法,把t之后的信息给隐藏起来。
那么具体怎么做呢?也很简单:产生一个上三角矩阵,上三角的值全为1,下三角的值权威0,对角线也是0。把这个矩阵作用在每一个序列上,就可以达到我们的目的啦。
具体的代码实现如下:
def sequence_mask(seq): batch_size, seq_len = seq.size() mask = torch.triu(torch.ones((seq_len, seq_len), dtype=torch.uint8), diagonal=1) mask = mask.unsqueeze(0).expand(batch_size, -1, -1) # [B, L, L] return mask
哈佛大学的文章The Annotated Transformer有一张效果图:
值得注意的是,本来mask只需要二维的矩阵即可,但是考虑到我们的输入序列都是批量的,所以我们要把原本二维的矩阵扩张成3维的张量。上面的代码可以看出,我们已经进行了处理。
回到本小结开始的问题,attn_mask
参数有几种情况?分别是什么意思?
-
对于decoder的self-attention,里面使用到的scaled dot-product attention,同时需要
padding mask
和sequence mask
作为attn_mask
,具体实现就是两个mask相加作为attn_mask。 -
其他情况,
attn_mask
一律等于padding mask
。
至此,mask相关的问题解决了。
17.Positional encoding是什么?
好了,终于要解释位置编码了,那就是文字开始的结构图提到的Positional encoding。
就目前而言,我们的Transformer架构似乎少了点什么东西。没错,就是它对序列的顺序没有约束!我们知道序列的顺序是一个很重要的信息,如果缺失了这个信息,可能我们的结果就是:所有词语都对了,但是无法组成有意义的语句!
为了解决这个问题。论文提出了Positional encoding。这是啥?一句话概括就是:对序列中的词语出现的位置进行编码!如果对位置进行编码,那么我们的模型就可以捕捉顺序信息!
那么具体怎么做呢?论文的实现很有意思,使用正余弦函数。公式如下:
其中,pos
是指词语在序列中的位置。可以看出,在偶数位置,使用正弦编码,在奇数位置,使用余弦编码。
正弦函数能够表达相对位置信息。,主要数学依据是以下两个公式:
18.Positional encoding的实现
PE的实现也不难,按照论文的公式即可。代码如下:
import torchimport torch.nn as nn
class PositionalEncoding(nn.Module):
def __init__(self, d_model, max_seq_len): """初始化。
Args: d_model: 一个标量。模型的维度,论文默认是512 max_seq_len: 一个标量。文本序列的最大长度 """ super(PositionalEncoding, self).__init__()
# 根据论文给的公式,构造出PE矩阵 position_encoding = np.array([ [pos / np.pow(10000, 2.0 * (j // 2) / d_model) for j in range(d_model)] for pos in range(max_seq_len)]) # 偶数列使用sin,奇数列使用cos position_encoding[:, 0::2] = np.sin(position_encoding[:, 0::2]) position_encoding[:, 1::2] = np.cos(position_encoding[:, 1::2])
# 在PE矩阵的第一行,加上一行全是0的向量,代表这`PAD`的positional encoding # 在word embedding中也经常会加上`UNK`,代表位置单词的word embedding,两者十分类似 # 那么为什么需要这个额外的PAD的编码呢?很简单,因为文本序列的长度不一,我们需要对齐, # 短的序列我们使用0在结尾补全,我们也需要这些补全位置的编码,也就是`PAD`对应的位置编码 pad_row = torch.zeros([1, d_model]) position_encoding = torch.cat((pad_row, position_encoding))
# 嵌入操作,+1是因为增加了`PAD`这个补全位置的编码, # Word embedding中如果词典增加`UNK`,我们也需要+1。看吧,两者十分相似 self.position_encoding = nn.Embedding(max_seq_len + 1, d_model) self.position_encoding.weight = nn.Parameter(position_encoding, requires_grad=False) def forward(self, input_len): """神经网络的前向传播。
Args: input_len: 一个张量,形状为[BATCH_SIZE, 1]。每一个张量的值代表这一批文本序列中对应的长度。
Returns: 返回这一批序列的位置编码,进行了对齐。 """
# 找出这一批序列的最大长度 max_len = torch.max(input_len) tensor = torch.cuda.LongTensor if input_len.is_cuda else torch.LongTensor # 对每一个序列的位置进行对齐,在原序列位置的后面补上0 # 这里range从1开始也是因为要避开PAD(0)的位置 input_pos = tensor( [list(range(1, len + 1)) + [0] * (max_len - len) for len in input_len]) return self.position_encoding(input_pos)
19.Word embedding的实现
Word embedding应该是老生常谈了,它实际上就是一个二维浮点矩阵,里面的权重是可训练参数,我们只需要把这个矩阵构建出来就完成了word embedding的工作。
所以,具体的实现很简单:
import torch.nn as nn
embedding = nn.Embedding(vocab_size, embedding_size, padding_idx=0)# 获得输入的词嵌入编码seq_embedding = seq_embedding(inputs)*np.sqrt(d_model)
20.Position-wise Feed-Forward network是什么?
这就是一个全连接网络,包含两个线性变换和一个非线性函数(实际上就是ReLU)。公式如下:
这个线性变换在不同的位置都表现地一样,并且在不同的层之间使用不同的参数。
实现如下:
import torchimport torch.nn as nn
class PositionalWiseFeedForward(nn.Module):
def __init__(self, model_dim=512, ffn_dim=2048, dropout=0.0): super(PositionalWiseFeedForward, self).__init__() self.w1 = nn.Conv1d(model_dim, ffn_dim, 1) self.w2 = nn.Conv1d(model_dim, ffn_dim, 1) self.dropout = nn.Dropout(dropout) self.layer_norm = nn.LayerNorm(model_dim)
def forward(self, x): output = x.transpose(1, 2) output = self.w2(F.relu(self.w1(output))) output = self.dropout(output.transpose(1, 2))
# add residual and norm layer output = self.layer_norm(x + output) return output
21.Transformer的实现
至此,所有的细节都已经解释完了,现在来完成我们Transformer模型的代码。首先,我们需要实现6层的encoder和decoder。
encoder代码实现如下:
import torchimport torch.nn as nn
class EncoderLayer(nn.Module):"""Encoder的一层。"""
def __init__(self, model_dim=512, num_heads=8, ffn_dim=2018, dropout=0.0): super(EncoderLayer, self).__init__()
self.attention = MultiHeadAttention(model_dim, num_heads, dropout) self.feed_forward = PositionalWiseFeedForward(model_dim, ffn_dim, dropout)
def forward(self, inputs, attn_mask=None):
# self attention context, attention = self.attention(inputs, inputs, inputs, padding_mask)
# feed forward network output = self.feed_forward(context)
return output, attention
class Encoder(nn.Module):"""多层EncoderLayer组成Encoder。"""
def __init__(self, vocab_size, max_seq_len, num_layers=6, model_dim=512, num_heads=8, ffn_dim=2048, dropout=0.0): super(Encoder, self).__init__()
self.encoder_layers = nn.ModuleList( [EncoderLayer(model_dim, num_heads, ffn_dim, dropout) for _ in range(num_layers)])
self.seq_embedding = nn.Embedding(vocab_size + 1, model_dim, padding_idx=0) self.pos_embedding = PositionalEncoding(model_dim, max_seq_len)
def forward(self, inputs, inputs_len): output = self.seq_embedding(inputs) output += self.pos_embedding(inputs_len)
self_attention_mask = padding_mask(inputs, inputs)
attentions = [] for encoder in self.encoder_layers: output, attention = encoder(output, self_attention_mask) attentions.append(attention)
return output, attentions
通过文章前面的分析,代码不需要更多解释了。同样的,我们的decoder代码如下:
import torchimport torch.nn as nn
class DecoderLayer(nn.Module):
def __init__(self, model_dim, num_heads=8, ffn_dim=2048, dropout=0.0): super(DecoderLayer, self).__init__()
self.attention = MultiHeadAttention(model_dim, num_heads, dropout) self.feed_forward = PositionalWiseFeedForward(model_dim, ffn_dim, dropout)
def forward(self, dec_inputs, enc_outputs, self_attn_mask=None, context_attn_mask=None): # self attention, all inputs are decoder inputs dec_output, self_attention = self.attention( dec_inputs, dec_inputs, dec_inputs, self_attn_mask)
# context attention # query is decoder's outputs, key and value are encoder's inputs dec_output, context_attention = self.attention( enc_outputs, enc_outputs, dec_output, context_attn_mask)
# decoder's output, or context dec_output = self.feed_forward(dec_output)
return dec_output, self_attention, context_attention
class Decoder(nn.Module):
def __init__(self, vocab_size, max_seq_len, num_layers=6, model_dim=512, num_heads=8, ffn_dim=2048, dropout=0.0): super(Decoder, self).__init__()
self.num_layers = num_layers
self.decoder_layers = nn.ModuleList( [DecoderLayer(model_dim, num_heads, ffn_dim, dropout) for _ in range(num_layers)])
self.seq_embedding = nn.Embedding(vocab_size + 1, model_dim, padding_idx=0) self.pos_embedding = PositionalEncoding(model_dim, max_seq_len)
def forward(self, inputs, inputs_len, enc_output, context_attn_mask=None): output = self.seq_embedding(inputs) output += self.pos_embedding(inputs_len)
self_attention_padding_mask = padding_mask(inputs, inputs) seq_mask = sequence_mask(inputs) self_attn_mask = torch.gt((self_attention_padding_mask + seq_mask), 0)
self_attentions = [] context_attentions = [] for decoder in self.decoder_layers: output, self_attn, context_attn = decoder( output, enc_output, self_attn_mask, context_attn_mask) self_attentions.append(self_attn) context_attentions.append(context_attn)
return output, self_attentions, context_attentions
最后,我们把encoder和decoder组成Transformer模型!
代码如下:
import torchimport torch.nn as nn
class Transformer(nn.Module):
def __init__(self, src_vocab_size, src_max_len, tgt_vocab_size, tgt_max_len, num_layers=6, model_dim=512, num_heads=8, ffn_dim=2048, dropout=0.2): super(Transformer, self).__init__()
self.encoder = Encoder(src_vocab_size, src_max_len, num_layers, model_dim, num_heads, ffn_dim, dropout) self.decoder = Decoder(tgt_vocab_size, tgt_max_len, num_layers, model_dim, num_heads, ffn_dim, dropout)
self.linear = nn.Linear(model_dim, tgt_vocab_size, bias=False) self.softmax = nn.Softmax(dim=2)
def forward(self, src_seq, src_len, tgt_seq, tgt_len): context_attn_mask = padding_mask(tgt_seq, src_seq)
output, enc_self_attn = self.encoder(src_seq, src_len)
output, dec_self_attn, ctx_attn = self.decoder( tgt_seq, tgt_len, output, context_attn_mask)
output = self.linear(output) output = self.softmax(output)
return output, enc_self_attn, dec_self_attn, ctx_attn
至此,Transformer模型已经实现了!
普通人如何抓住AI大模型的风口?
领取方式在文末
为什么要学习大模型?
目前AI大模型的技术岗位与能力培养随着人工智能技术的迅速发展和应用 , 大模型作为其中的重要组成部分 , 正逐渐成为推动人工智能发展的重要引擎 。大模型以其强大的数据处理和模式识别能力, 广泛应用于自然语言处理 、计算机视觉 、 智能推荐等领域 ,为各行各业带来了革命性的改变和机遇 。
目前,开源人工智能大模型已应用于医疗、政务、法律、汽车、娱乐、金融、互联网、教育、制造业、企业服务等多个场景,其中,应用于金融、企业服务、制造业和法律领域的大模型在本次调研中占比超过 30%。
随着AI大模型技术的迅速发展,相关岗位的需求也日益增加。大模型产业链催生了一批高薪新职业:
人工智能大潮已来,不加入就可能被淘汰。如果你是技术人,尤其是互联网从业者,现在就开始学习AI大模型技术,真的是给你的人生一个重要建议!
最后
如果你真的想学习大模型,请不要去网上找那些零零碎碎的教程,真的很难学懂!你可以根据我这个学习路线和系统资料,制定一套学习计划,只要你肯花时间沉下心去学习,它们一定能帮到你!
大模型全套学习资料领取
这里我整理了一份AI大模型入门到进阶全套学习包,包含学习路线+实战案例+视频+书籍PDF+面试题+DeepSeek部署包和技巧,需要的小伙伴文在下方免费领取哦,真诚无偿分享!!!
vx扫描下方二维码即可
加上后会一个个给大家发
部分资料展示
一、 AI大模型学习路线图
整个学习分为7个阶段
二、AI大模型实战案例
涵盖AI大模型的理论研究、技术实现、行业应用等多个方面。无论您是科研人员、工程师,还是对AI大模型感兴趣的爱好者,皆可用。
三、视频和书籍PDF合集
从入门到进阶这里都有,跟着老师学习事半功倍。
四、LLM面试题
五、AI产品经理面试题
六、deepseek部署包+技巧大全
😝朋友们如果有需要的话,可以V扫描下方二维码联系领取~