From 05bf3ab616a4987bed0045b2de038a48d4525e99 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 14 Apr 2023 21:38:24 +0300 Subject: [PATCH] minor : updates after rebase to latest master --- examples/common.cpp | 2 +- examples/main/main.cpp | 4 ++-- ggml.c | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index eaa5aceea8eb0..3b31a966e9484 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -101,7 +101,7 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { args_string.pop_back(); } split_args(args_string, args); - for (int j = 0; j < args.size(); j++) { + for (int j = 0; j < (int) args.size(); j++) { args[j] = unescape(args[j]); } } else { diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 68b4b2840858e..4b625efa65080 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -426,7 +426,7 @@ int main(int argc, char ** argv) { if (!params.clean_interface && !params.instruct_prefix.empty() && !antiprompt.any) { // avoid printing again user's new line (TODO: try to revert enter press and print newline) int i = params.instruct_prefix.front() == '\n' ? 1 : 0; - for (; i < inp_pfx.size(); i++) { + for (; i < (int) inp_pfx.size(); i++) { printf("%s", llama_token_to_str(ctx, inp_pfx[i])); } fflush(stdout); @@ -476,7 +476,7 @@ int main(int argc, char ** argv) { if (!params.clean_interface && !params.instruct_suffix.empty() && !antiprompt.is_stop_prompt) { // avoid printing again user's new line (TODO: try to revert enter press and print newline) int i = params.instruct_suffix.front() == '\n' ? 1 : 0; - for (; i < inp_sfx.size(); i++) { + for (; i < (int) inp_sfx.size(); i++) { printf("%s", llama_token_to_str(ctx, inp_sfx[i])); } // if (remove trailing space workaround) { diff --git a/ggml.c b/ggml.c index 885c7ed58c553..e3374149437a9 100644 --- a/ggml.c +++ b/ggml.c @@ -3040,11 +3040,12 @@ static const char * GGML_TYPE_NAME[GGML_TYPE_COUNT] = { [GGML_TYPE_F16] = "f16", [GGML_TYPE_Q4_0] = "q4_0", [GGML_TYPE_Q4_1] = "q4_1", + [GGML_TYPE_Q8_0] = "q8_0", [GGML_TYPE_I8] = "i8", [GGML_TYPE_I16] = "i16", [GGML_TYPE_I32] = "i32", }; -static_assert(GGML_TYPE_COUNT == 7, "GGML_TYPE_NAME is outdated"); +static_assert(GGML_TYPE_COUNT == 8, "GGML_TYPE_NAME is outdated"); static const char * GGML_OP_LABEL[GGML_OP_COUNT] = { "NONE", @@ -9440,6 +9441,7 @@ static void ggml_compute_forward_map_unary( } break; case GGML_TYPE_Q4_0: case GGML_TYPE_Q4_1: + case GGML_TYPE_Q8_0: case GGML_TYPE_I8: case GGML_TYPE_I16: case GGML_TYPE_I32: @@ -9495,6 +9497,7 @@ static void ggml_compute_forward_map_binary( } break; case GGML_TYPE_Q4_0: case GGML_TYPE_Q4_1: + case GGML_TYPE_Q8_0: case GGML_TYPE_I8: case GGML_TYPE_I16: case GGML_TYPE_I32: