Skip to content

Commit 4755afd

Browse files
authored
llama : fix integer overflow during quantization (#6063)
1 parent 6e0438d commit 4755afd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11977,7 +11977,7 @@ static ggml_type llama_tensor_get_type(quantize_state_internal & qs, ggml_type n
1197711977
return new_type;
1197811978
}
1197911979

11980-
static int32_t llama_tensor_quantize_internal(enum ggml_type new_type, const float * f32_data, void * new_data, const int chunk_size, int nrows, int n_per_row, const float * imatrix, std::vector<std::thread> & workers, const int nthread) {
11980+
static size_t llama_tensor_quantize_internal(enum ggml_type new_type, const float * f32_data, void * new_data, const int chunk_size, int nrows, int n_per_row, const float * imatrix, std::vector<std::thread> & workers, const int nthread) {
1198111981
std::mutex mutex;
1198211982
int counter = 0;
1198311983
size_t new_size = 0;

0 commit comments

Comments
 (0)