Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
LLaMA_TencentPretrain_pytorch
Commits
8abb79e9
Commit
8abb79e9
authored
Oct 27, 2023
by
zhaoying1
Browse files
Update README.md
parent
781f653f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
README.md
README.md
+3
-6
No files found.
README.md
View file @
8abb79e9
...
...
@@ -24,19 +24,16 @@ LLaMA模型具体参数:
<div
align=
"center"
>
<img
src=
"https://developer.hpccube.com/codes/modelzoo/llama_tencentpretrain_pytorch/-/blob/main/data/media/llama%E6%A8%A1%E5%9E%8B%E7%BB%93%E6%9E%84.pngg"
width=
"600"
height=
"500"
>
</div>
<img
src=
"https://developer.hpccube.com/codes/modelzoo/llama_tencentpretrain_pytorch/-/blob/main/data/media/llama%E6%A8%A1%E5%9E%8B%E7%BB%93%E6%9E%84.pngg"
alt=
"llama模型结构.png"
style=
"zoom:50%;"
/>
LLaMA 2是LLaMA的新一代版本,具有商业友好的许可证。 LLaMA 2 有 3 种不同的尺寸:7B、13B 和 70B。Llama 2训练语料相比LLaMA多出40%,上下文长度是由之前的2048升级到4096,可以理解和生成更长的文本。Llama 2采用了 Llama 1 的大部分预训练设置和模型架构,使用标准Transformer 架构,使用 RMSNorm 应用预归一化、使用 SwiGLU 激活函数和旋转位置嵌入RoPE。
## 算法原理
<div
align=
"center"
>
<img
src=
"https://developer.hpccube.com/codes/modelzoo/llama_tencentpretrain_pytorch/-/blob/main/data/media/llama%E7%AE%97%E6%B3%95%E5%8E%9F%E7%90%86.png"
width=
"300"
height=
"500"
>
</div>
<img
src=
"https://developer.hpccube.com/codes/modelzoo/llama_tencentpretrain_pytorch/-/blob/main/data/media/llama%E7%AE%97%E6%B3%95%E5%8E%9F%E7%90%86.png"
alt=
"llama算法原理.png"
style=
"zoom:50%;"
/>
以下是与原始架构的主要区别:
**预归一化**
。为了提高训练稳定性,对每个transformer 子层的输入进行归一化,而不是对输出进行归一化。使用 RMSNorm 归一化函数。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment