From: hebangwen Date: Thu, 25 Sep 2025 15:39:30 +0000 (+0800) Subject: examples : fix typo mismatch in gpt (#1349) X-Git-Tag: v0.9.4~38 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d79210de3205fa8e1ffc5174b46e07e82f24dce9;p=pkg%2Fggml%2Fsources%2Fggml examples : fix typo mismatch in gpt (#1349) --- diff --git a/examples/gpt-2/main-alloc.cpp b/examples/gpt-2/main-alloc.cpp index 0bde9e1d..172d3eb6 100644 --- a/examples/gpt-2/main-alloc.cpp +++ b/examples/gpt-2/main-alloc.cpp @@ -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 layers; diff --git a/examples/gpt-2/main-backend.cpp b/examples/gpt-2/main-backend.cpp index 29f197a7..6c687124 100644 --- a/examples/gpt-2/main-backend.cpp +++ b/examples/gpt-2/main-backend.cpp @@ -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 layers; diff --git a/examples/gpt-2/main-batched.cpp b/examples/gpt-2/main-batched.cpp index 4d6ebe82..e907d82f 100644 --- a/examples/gpt-2/main-batched.cpp +++ b/examples/gpt-2/main-batched.cpp @@ -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 layers; diff --git a/examples/gpt-2/main-ctx.cpp b/examples/gpt-2/main-ctx.cpp index 50e4033a..fe099977 100644 --- a/examples/gpt-2/main-ctx.cpp +++ b/examples/gpt-2/main-ctx.cpp @@ -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 layers; diff --git a/examples/gpt-2/main-sched.cpp b/examples/gpt-2/main-sched.cpp index 63176029..7d789d68 100644 --- a/examples/gpt-2/main-sched.cpp +++ b/examples/gpt-2/main-sched.cpp @@ -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 layers; diff --git a/examples/gpt-j/main.cpp b/examples/gpt-j/main.cpp index 2f494e75..2c175772 100644 --- a/examples/gpt-j/main.cpp +++ b/examples/gpt-j/main.cpp @@ -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