fix: explicitly exclude f8, f64 and i64 tensors from mmap (#1575)

This commit is contained in:
Wagner Bruna 2026-05-30 07:31:08 -03:00 committed by GitHub
parent 0e4ee04488
commit b54bd83a3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -865,8 +865,13 @@ std::vector<MmapTensorStore> ModelLoader::mmap_tensors(std::map<std::string, ggm
if (dst_tensor == nullptr) if (dst_tensor == nullptr)
continue; continue;
if (tensor_storage.type != dst_tensor->type) if (tensor_storage.is_f8_e4m3 ||
tensor_storage.is_f8_e5m2 ||
tensor_storage.is_f64 ||
tensor_storage.is_i64 ||
tensor_storage.type != dst_tensor->type) {
continue; continue;
}
size_t tensor_size = tensor_storage.nbytes(); size_t tensor_size = tensor_storage.nbytes();
size_t tensor_offset = tensor_storage.offset; size_t tensor_offset = tensor_storage.offset;