From 2973a65ecb6c884ca609de6eb5f1b6dc08631aaf Mon Sep 17 00:00:00 2001 From: Yuri Khrustalev Date: Tue, 16 Dec 2025 20:27:03 -0500 Subject: [PATCH] gguf-py : allow converting multi-tensor models from read-only locations (#18100) --- gguf-py/gguf/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gguf-py/gguf/utility.py b/gguf-py/gguf/utility.py index c9401a1c0..7907e706d 100644 --- a/gguf-py/gguf/utility.py +++ b/gguf-py/gguf/utility.py @@ -288,7 +288,7 @@ class LocalTensor: data_range: LocalTensorRange def mmap_bytes(self) -> np.ndarray: - return np.memmap(self.data_range.filename, offset=self.data_range.offset, shape=self.data_range.size) + return np.memmap(self.data_range.filename, mode='r', offset=self.data_range.offset, shape=self.data_range.size) class SafetensorsLocal: