From d6244ff8139200cdb43354da3dcf8c1445ee4293 Mon Sep 17 00:00:00 2001 From: mike dupont Date: Wed, 6 Dec 2023 10:05:12 -0500 Subject: [PATCH] adding missing files --- .gitignore | 2 ++ llama-layer.hpp | 38 ++++++++++++++++++++++++++++++++++++++ plugin_python.hpp | 1 + 3 files changed, 41 insertions(+) create mode 100644 llama-layer.hpp create mode 100644 plugin_python.hpp diff --git a/.gitignore b/.gitignore index f8a2a2dae..320974590 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ tests/test-tokenizer-1-bpe /#llama.cpp# #* \\#* +\\# +# diff --git a/llama-layer.hpp b/llama-layer.hpp new file mode 100644 index 000000000..12a1f2ede --- /dev/null +++ b/llama-layer.hpp @@ -0,0 +1,38 @@ +struct llama_layer { + // normalization + struct ggml_tensor * attn_norm; + struct ggml_tensor * attn_norm_b; + struct ggml_tensor * attn_norm_2; + struct ggml_tensor * attn_norm_2_b; + struct ggml_tensor * attn_q_norm; + struct ggml_tensor * attn_q_norm_b; + struct ggml_tensor * attn_k_norm; + struct ggml_tensor * attn_k_norm_b; + + // attention + struct ggml_tensor * wq; + struct ggml_tensor * wk; + struct ggml_tensor * wv; + struct ggml_tensor * wo; + struct ggml_tensor * wqkv; + + // attention bias + struct ggml_tensor * bq; + struct ggml_tensor * bk; + struct ggml_tensor * bv; + struct ggml_tensor * bo; + struct ggml_tensor * bqkv; + + // normalization + struct ggml_tensor * ffn_norm; + struct ggml_tensor * ffn_norm_b; + + // ff + struct ggml_tensor * ffn_gate; // w1 + struct ggml_tensor * ffn_down; // w2 + struct ggml_tensor * ffn_up; // w3 + + // ff bias + struct ggml_tensor * ffn_down_b; // b2 + struct ggml_tensor * ffn_up_b; // b3 +}; diff --git a/plugin_python.hpp b/plugin_python.hpp new file mode 100644 index 000000000..fca613112 --- /dev/null +++ b/plugin_python.hpp @@ -0,0 +1 @@ +std::string process_output_plugin(const std::string input);