Upload folder using huggingface_hub
Browse files- saves/checkpoint/final_model.pt +3 -0
- saves/checkpoint/num_steps_90000.pt +3 -0
- saves/ffnn/FeedForward_Network +21 -0
- saves/ffnn/FeedForward_Network.png +0 -0
- saves/mha/multihead_attention_flow +32 -0
- saves/mha/multihead_attention_flow.png +0 -0
- saves/smollm/smollm_visualization +22 -0
- saves/smollm/smollm_visualization.png +0 -0
- saves/text_samples_10000_44c46ef0860634d197e0.table.json +1 -0
- saves/tokenizer/bpe_tokenizer_16k_n1000000.pkl +3 -0
- saves/tokenizer/essential_web_500k_tokens.pkl +3 -0
- saves/transformer/Transformer_Block +22 -0
- saves/transformer/Transformer_Block.png +0 -0
saves/checkpoint/final_model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a6420bc0e4f6f90da4b294c70472353230f45f19e203d263edbc58a63785acc
|
| 3 |
+
size 72399768
|
saves/checkpoint/num_steps_90000.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e7ccc794185d9efa15fb1622aa883213f1a4a1bbca7055afb1b8fac968b4366
|
| 3 |
+
size 217200386
|
saves/ffnn/FeedForward_Network
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
digraph {
|
| 2 |
+
Input [label="Input
|
| 3 |
+
[B,Seq_Len,Dim_Model]" shape=box]
|
| 4 |
+
FC1 [label="Linear
|
| 5 |
+
(dim_model---->dim_ff)" shape=box]
|
| 6 |
+
Split [label="Split(x--->x1, x2)" shape=box]
|
| 7 |
+
SiLU [label="SiLU(x1)" shape=box]
|
| 8 |
+
Gate [label="SiLU(x1) * x2
|
| 9 |
+
(SwiGLU)" shape=box]
|
| 10 |
+
FC2 [label="Linear
|
| 11 |
+
(dim_ff---->dim_model)" shape=box]
|
| 12 |
+
Output [label="Output
|
| 13 |
+
[B,Seq_len,Dim_model]" shape=box]
|
| 14 |
+
Input -> FC1
|
| 15 |
+
FC1 -> Split
|
| 16 |
+
Split -> SiLU
|
| 17 |
+
Split -> Gate
|
| 18 |
+
SiLU -> Gate
|
| 19 |
+
Gate -> FC2
|
| 20 |
+
FC2 -> Output
|
| 21 |
+
}
|
saves/ffnn/FeedForward_Network.png
ADDED
|
saves/mha/multihead_attention_flow
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
digraph {
|
| 2 |
+
x [label="Input x
|
| 3 |
+
[B,Seq_len,Dim_Model]"]
|
| 4 |
+
qkv [label="QKV Projection
|
| 5 |
+
[B,Seq_len,3*Dim_Model]"]
|
| 6 |
+
reshape [label="Reshape
|
| 7 |
+
[3,B,H,Seq_len,Dim_k]"]
|
| 8 |
+
Q [label="Query
|
| 9 |
+
[B,H,Seq_len,Dim_Key]"]
|
| 10 |
+
K [label="Key
|
| 11 |
+
[B,H,Seq_len,Dim_Key]"]
|
| 12 |
+
V [label="Value
|
| 13 |
+
[B,H,Seq_len,Dim_Key]"]
|
| 14 |
+
rope [label="Rotary Positional Embedding"]
|
| 15 |
+
attn [label="Flash Attention
|
| 16 |
+
[B, H, Seq_len, Dim_k]"]
|
| 17 |
+
merge [label="Merge Heads
|
| 18 |
+
[B, Seq_len, Dim_model]"]
|
| 19 |
+
out_proj [label="Output Linear
|
| 20 |
+
[B, Seq_len, Dim_model]"]
|
| 21 |
+
x -> qkv
|
| 22 |
+
qkv -> reshape
|
| 23 |
+
reshape -> Q
|
| 24 |
+
reshape -> K
|
| 25 |
+
reshape -> V
|
| 26 |
+
Q -> rope
|
| 27 |
+
K -> rope
|
| 28 |
+
rope -> attn [label="Q, K"]
|
| 29 |
+
V -> attn [label=V]
|
| 30 |
+
attn -> merge
|
| 31 |
+
merge -> out_proj
|
| 32 |
+
}
|
saves/mha/multihead_attention_flow.png
ADDED
|
saves/smollm/smollm_visualization
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
digraph {
|
| 2 |
+
size=15
|
| 3 |
+
Tokens [label="Input Tokens
|
| 4 |
+
[B, Seq_len]" shape=box]
|
| 5 |
+
Embed [label="Token Embedding
|
| 6 |
+
[B, Seq_len, Dim_model]" shape=ellipse]
|
| 7 |
+
Scale [label="Scale by sqrt(dim_model)" shape=ellipse]
|
| 8 |
+
Mask [label="Causal Mask
|
| 9 |
+
[seq_len * seq_len]" shape=diamond]
|
| 10 |
+
Transformer_Stack [label="8 Transformer Blocks" shape=box3d]
|
| 11 |
+
Norm [label=RMSNorm shape=ellipse]
|
| 12 |
+
Output [label="Linear Projection
|
| 13 |
+
[B, Seq_len, Vocab_size]" shape=box]
|
| 14 |
+
Logits [label=Logits shape=box]
|
| 15 |
+
Tokens -> Embed
|
| 16 |
+
Embed -> Scale
|
| 17 |
+
Scale -> Transformer_Stack
|
| 18 |
+
Mask -> Transformer_Stack [label="(Optional)" style=dashed]
|
| 19 |
+
Transformer_Stack -> Norm
|
| 20 |
+
Norm -> Output
|
| 21 |
+
Output -> Logits
|
| 22 |
+
}
|
saves/smollm/smollm_visualization.png
ADDED
|
saves/text_samples_10000_44c46ef0860634d197e0.table.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"columns": ["Step", "Prompt", "Generated"], "data": [[10000, "Wednesday, May 25, 2011\n\n", "Wednesday, May 25, 2011\n\nThe foliina Niemenkari, 2011 Muslims are two of the whole wise to small cadets, a job. The"]]}
|
saves/tokenizer/bpe_tokenizer_16k_n1000000.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69be2d907b6d9dc0986fcb980188eb7fcb3b0a8e92bc925573ad7fb68d685fd9
|
| 3 |
+
size 194466
|
saves/tokenizer/essential_web_500k_tokens.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:264cbebdca2392db70f693520d53203baf61f725ca1894c35f8e65bff976904c
|
| 3 |
+
size 349894
|
saves/transformer/Transformer_Block
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
digraph {
|
| 2 |
+
Input [label="Input
|
| 3 |
+
[B,Seq_len,D_Model]" shape=box]
|
| 4 |
+
Norm1 [label=RMSNorm shape=ellipse]
|
| 5 |
+
MHA [label="Multi-Head Attention" shape=box]
|
| 6 |
+
Res1 [label="Residual Connection" shape=diamond]
|
| 7 |
+
Norm2 [label=RMSNorm shape=ellipse]
|
| 8 |
+
FFNN [label="Feed-Forward
|
| 9 |
+
(SwiGLU)" shape=box]
|
| 10 |
+
Res2 [label="Residual Connection" shape=diamond]
|
| 11 |
+
Output [label="Output
|
| 12 |
+
[B,Seq_len,Dim_model]" shape=box]
|
| 13 |
+
Input -> Norm1
|
| 14 |
+
Input -> Res1
|
| 15 |
+
Norm1 -> MHA
|
| 16 |
+
MHA -> Res1
|
| 17 |
+
Res1 -> Norm2
|
| 18 |
+
Res1 -> Res2
|
| 19 |
+
Norm2 -> FFNN
|
| 20 |
+
FFNN -> Res2
|
| 21 |
+
Res2 -> Output
|
| 22 |
+
}
|
saves/transformer/Transformer_Block.png
ADDED
|