Skip to content

Commit

Permalink
quantize : fail fast on write errors (ggerganov#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
cebtenzzre authored Oct 7, 2023
1 parent c26765a commit f1782c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f1782c6

Please sign in to comment.