diff --git a/llama.cpp b/llama.cpp index 227cd9d037848..d10656bb801db 100644 --- a/llama.cpp +++ b/llama.cpp @@ -7194,6 +7194,7 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s } std::ofstream fout(fname_out, std::ios::binary); + fout.exceptions(std::ofstream::failbit); // fail fast on write errors const size_t meta_size = gguf_get_meta_size(ctx_out);