Skip to content

Commit 0e79355

Browse files
committed
quantize : fix dataset name loading from gguf imatrix
1 parent 43cd2b3 commit 0e79355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/quantize/quantize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static int load_legacy_imatrix(const std::string & imatrix_file, std::vector<std
206206
}
207207
}
208208

209-
// latest imatrix version contains the dataset filename at the end of the file
209+
// latest legacy imatrix version contains the dataset filename at the end of the file
210210
int m_last_call = 0;
211211
if (in.peek() != EOF) {
212212
in.read((char *)&m_last_call, sizeof(m_last_call));
@@ -318,7 +318,7 @@ static int load_imatrix(const std::string & imatrix_file, std::vector<std::strin
318318
int m_last_chunk = gguf_get_val_u32(ctx_gguf, chunk_count_idx);
319319

320320
int64_t n_datasets = gguf_get_arr_n(ctx_gguf, dataset_idx);
321-
imatrix_datasets.resize(n_datasets);
321+
imatrix_datasets.reserve(n_datasets);
322322
for (int64_t i = 0; i < n_datasets; ++i) {
323323
imatrix_datasets.push_back(gguf_get_val_str(ctx_gguf, dataset_idx));
324324
}

0 commit comments

Comments
 (0)