gguf-py : use copy-on-write mode for localtensor (#18162)
This commit is contained in:
parent
54189c0d39
commit
ec7b9329ae
|
|
@ -288,7 +288,7 @@ class LocalTensor:
|
||||||
data_range: LocalTensorRange
|
data_range: LocalTensorRange
|
||||||
|
|
||||||
def mmap_bytes(self) -> np.ndarray:
|
def mmap_bytes(self) -> np.ndarray:
|
||||||
return np.memmap(self.data_range.filename, mode='r', offset=self.data_range.offset, shape=self.data_range.size)
|
return np.memmap(self.data_range.filename, mode='c', offset=self.data_range.offset, shape=self.data_range.size)
|
||||||
|
|
||||||
|
|
||||||
class SafetensorsLocal:
|
class SafetensorsLocal:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue