From: Georgi Gerganov Date: Wed, 27 Mar 2024 07:16:02 +0000 (+0200) Subject: llama2c : open file as binary (#6332) X-Git-Tag: upstream/0.0.4488~1942 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2ab4f00d25c0682a74472412d66454df211e4b0e;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama2c : open file as binary (#6332) --- diff --git a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp index 6b5c6653..746c3fbe 100644 --- a/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp +++ b/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp @@ -880,7 +880,7 @@ int main(int argc, char ** argv) { TransformerWeights weights = {}; { LOG("%s: Loading llama2c model from %s\n", __func__, params.fn_llama2c_model); - FILE *file = fopen(params.fn_llama2c_model, "r"); + FILE * file = fopen(params.fn_llama2c_model, "rb"); if (!file) { LOG("%s: Unable to open the checkpoint file %s!\n", __func__, params.fn_llama2c_model); return 1;