Skip to content

Commit b54bd83

Browse files
authored
fix: explicitly exclude f8, f64 and i64 tensors from mmap (#1575)
1 parent 0e4ee04 commit b54bd83

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/model.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,13 @@ std::vector<MmapTensorStore> ModelLoader::mmap_tensors(std::map<std::string, ggm
865865
if (dst_tensor == nullptr)
866866
continue;
867867

868-
if (tensor_storage.type != dst_tensor->type)
868+
if (tensor_storage.is_f8_e4m3 ||
869+
tensor_storage.is_f8_e5m2 ||
870+
tensor_storage.is_f64 ||
871+
tensor_storage.is_i64 ||
872+
tensor_storage.type != dst_tensor->type) {
869873
continue;
874+
}
870875

871876
size_t tensor_size = tensor_storage.nbytes();
872877
size_t tensor_offset = tensor_storage.offset;

0 commit comments

Comments
 (0)