From a084358394152ca77dfee4940d67d9b9596c421a Mon Sep 17 00:00:00 2001 From: anzz1 Date: Sun, 2 Apr 2023 15:40:04 +0300 Subject: [PATCH] Revert "Fix ggml_init_params in quantize" This reverts commit 64bde3ffd4aef799acb790a3eedddbd0a0612108. --- examples/quantize/quantize.cpp | 2 +- llama.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/quantize/quantize.cpp b/examples/quantize/quantize.cpp index 680757c6b..b444328ac 100644 --- a/examples/quantize/quantize.cpp +++ b/examples/quantize/quantize.cpp @@ -19,7 +19,7 @@ int main(int argc, char ** argv) { // needed to initialize f16 tables { - struct ggml_init_params params = { 0, NULL, false }; + struct ggml_init_params params = { 0, NULL }; struct ggml_context * ctx = ggml_init(params); ggml_free(ctx); } diff --git a/llama.cpp b/llama.cpp index 359f1f09e..20ade3442 100644 --- a/llama.cpp +++ b/llama.cpp @@ -315,6 +315,7 @@ void * mmap_file(const char* fname) { #endif } + static bool llama_model_load( const std::string & fname, llama_context & lctx, @@ -488,6 +489,8 @@ static bool llama_model_load( } } + + auto & ctx = model.ctx; size_t ctx_size = 0;