]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
examples : fix typo mismatch in gpt (#1349)
authorhebangwen <redacted>
Thu, 25 Sep 2025 15:39:30 +0000 (23:39 +0800)
committerGitHub <redacted>
Thu, 25 Sep 2025 15:39:30 +0000 (18:39 +0300)
examples/gpt-2/main-alloc.cpp
examples/gpt-2/main-backend.cpp
examples/gpt-2/main-batched.cpp
examples/gpt-2/main-ctx.cpp
examples/gpt-2/main-sched.cpp
examples/gpt-j/main.cpp

index 0bde9e1d1ba52d16db00ca6bd423b63dbd0f53c5..172d3eb6edcbb37a341207c26106f0171ce33c60 100644 (file)
@@ -60,8 +60,8 @@ struct gpt2_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte;     // position embedding
-    struct ggml_tensor * wpe;     //    token embedding
+    struct ggml_tensor * wte;     //    token embedding
+    struct ggml_tensor * wpe;     // position embedding
     struct ggml_tensor * lm_head; // language model head
 
     std::vector<gpt2_layer> layers;
index 29f197a7c3ea5367d1f523df71a23def5f4ecc0f..6c68712477878b890d249512a60ce81030542bf0 100644 (file)
@@ -77,8 +77,8 @@ struct gpt2_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte;     // position embedding
-    struct ggml_tensor * wpe;     //    token embedding
+    struct ggml_tensor * wte;     //    token embedding
+    struct ggml_tensor * wpe;     // position embedding
     struct ggml_tensor * lm_head; // language model head
 
     std::vector<gpt2_layer> layers;
index 4d6ebe829eb584bffbac1ecabf7e8d1859ebf5b3..e907d82fdf3138663e74381878b83a765ffe5105 100644 (file)
@@ -109,8 +109,8 @@ struct gpt2_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte;     // position embedding
-    struct ggml_tensor * wpe;     //    token embedding
+    struct ggml_tensor * wte;     //    token embedding
+    struct ggml_tensor * wpe;     // position embedding
     struct ggml_tensor * lm_head; // language model head
 
     std::vector<gpt2_layer> layers;
index 50e4033a65a18b3977aba14df412d485328d689e..fe099977a798d03206f07d0f211733c0c57888e1 100644 (file)
@@ -57,8 +57,8 @@ struct gpt2_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte;     // position embedding
-    struct ggml_tensor * wpe;     //    token embedding
+    struct ggml_tensor * wte;     //    token embedding
+    struct ggml_tensor * wpe;     // position embedding
     struct ggml_tensor * lm_head; // language model head
 
     std::vector<gpt2_layer> layers;
index 63176029f8a9b719ebe40c1675d08657b1809295..7d789d68acd69e3e6e889e4e1c75973276f84fe9 100644 (file)
@@ -81,8 +81,8 @@ struct gpt2_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte;     // position embedding
-    struct ggml_tensor * wpe;     //    token embedding
+    struct ggml_tensor * wte;     //    tkoen embedding
+    struct ggml_tensor * wpe;     // position embedding
     struct ggml_tensor * lm_head; // language model head
 
     std::vector<gpt2_layer> layers;
index 2f494e75b4323d894bc6fc13b8268b4c4137c66a..2c175772d1cea37217965893e16e772ca0ded752 100644 (file)
@@ -57,7 +57,7 @@ struct gptj_model {
     struct ggml_tensor * ln_f_g;
     struct ggml_tensor * ln_f_b;
 
-    struct ggml_tensor * wte; // position embedding
+    struct ggml_tensor * wte; // token embedding
 
     struct ggml_tensor * lmh_g; // language model head
     struct ggml_tensor * lmh_b; // language model bias