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
dcff3c4d
Commit
dcff3c4d
authored
Oct 27, 2023
by
zhaoying1
Browse files
update
parent
ad357486
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
README.md
README.md
+5
-2
data/media/llama_alg.png
data/media/llama_alg.png
+0
-0
data/media/llama_arc.png
data/media/llama_arc.png
+0
-0
No files found.
README.md
View file @
dcff3c4d
...
...
@@ -25,7 +25,7 @@ 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
.png"
width=
"500"
height=
"400"
>
<img
src=
"
data/media/llama_arc
.png"
width=
"500"
height=
"400"
>
</div>
LLaMA 2是LLaMA的新一代版本,具有商业友好的许可证。 LLaMA 2 有 3 种不同的尺寸:7B、13B 和 70B。Llama 2训练语料相比LLaMA多出40%,上下文长度是由之前的2048升级到4096,可以理解和生成更长的文本。Llama 2采用了 Llama 1 的大部分预训练设置和模型架构,使用标准Transformer 架构,使用 RMSNorm 应用预归一化、使用 SwiGLU 激活函数和旋转位置嵌入RoPE。
...
...
@@ -35,7 +35,10 @@ LLaMA 2是LLaMA的新一代版本,具有商业友好的许可证。 LLaMA 2
## 算法原理
<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"
style=
"zoom:50%;"
/>
<div
align=
"center"
>
<img
src=
"data/media/llama_alg.png"
width=
"300"
height=
"400"
>
</div>
以下是与原始架构的主要区别:
**预归一化**
。为了提高训练稳定性,对每个transformer 子层的输入进行归一化,而不是对输出进行归一化。使用 RMSNorm 归一化函数。
...
...
data/media/llama
算法原理
.png
→
data/media/llama
_alg
.png
View file @
dcff3c4d
File moved
data/media/llama
模型结构
.png
→
data/media/llama
_arc
.png
View file @
dcff3c4d
File moved
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