Fix problem up when GGUF does not have in_sum

This commit is contained in:
Ed Addario 2025-08-02 16:31:21 +01:00
parent 2097f038b0
commit 78ddb475de
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 1 additions and 2 deletions

View File

@ -825,8 +825,7 @@ bool IMatrixCollector::load_imatrix(const char * file_name) {
for (int64_t j = 0; j < ncounts; j++) {
e.counts[j] += std::lround(((const float *) counts->data)[j]);
}
// ToDo: fix blow up when GGUF does not have in_sum
if (in_sum->data != nullptr) {
if (in_sum != nullptr) {
for (int64_t j = 0; j < nval; j++) {
e.in_sum[j] += ((const float *) in_sum->data)[j];
}