]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
convert : support contiguous method on lora tensors (#20489)
authorSigbjørn Skjæret <redacted>
Sun, 15 Mar 2026 11:15:12 +0000 (12:15 +0100)
committerGitHub <redacted>
Sun, 15 Mar 2026 11:15:12 +0000 (12:15 +0100)
convert_lora_to_gguf.py

index b0adde8a8b4fa5840c85d7eaab0af6de99f37175..871ce824226e3e862d0eda67653abaa3949e365a 100755 (executable)
@@ -128,6 +128,12 @@ class LoraTorchTensor:
         assert dim is None
         return self.shape
 
+    def contiguous(self) -> LoraTorchTensor:
+        return LoraTorchTensor(
+            self._lora_A.contiguous(),
+            self._lora_B.contiguous(),
+        )
+
     def reshape(self, *shape: int | tuple[int, ...]) -> LoraTorchTensor:
         if isinstance(shape[0], tuple):
             new_shape: tuple[int, ...] = shape[0]