gguf-py : allow converting multi-tensor models from read-only locations (#18100)

This commit is contained in:
Yuri Khrustalev 2025-12-16 20:27:03 -05:00 committed by GitHub
parent d0794e89d9
commit 2973a65ecb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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: