From: LostRuins Date: Mon, 10 Apr 2023 07:47:47 +0000 (+0800) Subject: gpt : initialize f16 tables during quantization (#77) X-Git-Tag: upstream/0.0.1642~1561 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=42cbb07a6a415d041a76138dc1d47f3d6697e501;p=pkg%2Fggml%2Fsources%2Fggml gpt : initialize f16 tables during quantization (#77) --- diff --git a/examples/gpt-2/quantize.cpp b/examples/gpt-2/quantize.cpp index 693b0787..2ef21ad3 100644 --- a/examples/gpt-2/quantize.cpp +++ b/examples/gpt-2/quantize.cpp @@ -289,6 +289,13 @@ int main(int argc, char ** argv) { return 1; } + // needed to initialize f16 tables + { + struct ggml_init_params params = { 0, NULL }; + struct ggml_context * ctx = ggml_init(params); + ggml_free(ctx); + } + const std::string fname_inp = argv[1]; const std::string fname_out = argv[2]; diff --git a/examples/gpt-j/quantize.cpp b/examples/gpt-j/quantize.cpp index 29b92cfe..170b3942 100644 --- a/examples/gpt-j/quantize.cpp +++ b/examples/gpt-j/quantize.cpp @@ -290,6 +290,13 @@ int main(int argc, char ** argv) { return 1; } + // needed to initialize f16 tables + { + struct ggml_init_params params = { 0, NULL }; + struct ggml_context * ctx = ggml_init(params); + ggml_free(ctx); + } + const std::string fname_inp = argv[1]; const std::string fname_out = argv[2];