Skip to content

Commit 89d0aec

Browse files
authored
convert : support contiguous method on lora tensors (ggml-org#20489)
1 parent b9da444 commit 89d0aec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

convert_lora_to_gguf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ def size(self, dim=None):
128128
assert dim is None
129129
return self.shape
130130

131+
def contiguous(self) -> LoraTorchTensor:
132+
return LoraTorchTensor(
133+
self._lora_A.contiguous(),
134+
self._lora_B.contiguous(),
135+
)
136+
131137
def reshape(self, *shape: int | tuple[int, ...]) -> LoraTorchTensor:
132138
if isinstance(shape[0], tuple):
133139
new_shape: tuple[int, ...] = shape[0]

0 commit comments

Comments
 (0)