summaryrefslogtreecommitdiff
path: root/candle-pyo3/py_src/candle/utils
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-10-06 10:09:38 +0200
committerGitHub <noreply@github.com>2024-10-06 10:09:38 +0200
commitf856b5c3a75028d384c26e36501d429091662cd3 (patch)
tree811569350d124b23bb54f5381756ec7cd0b34278 /candle-pyo3/py_src/candle/utils
parentd2e432914ec495baff1db29799fe316b9190b0e9 (diff)
downloadcandle-f856b5c3a75028d384c26e36501d429091662cd3.tar.gz
candle-f856b5c3a75028d384c26e36501d429091662cd3.tar.bz2
candle-f856b5c3a75028d384c26e36501d429091662cd3.zip
pyo3 update. (#2545)
* pyo3 update. * Stub fix.
Diffstat (limited to 'candle-pyo3/py_src/candle/utils')
-rw-r--r--candle-pyo3/py_src/candle/utils/__init__.pyi10
1 files changed, 3 insertions, 7 deletions
diff --git a/candle-pyo3/py_src/candle/utils/__init__.pyi b/candle-pyo3/py_src/candle/utils/__init__.pyi
index c9a9f9f3..94c32283 100644
--- a/candle-pyo3/py_src/candle/utils/__init__.pyi
+++ b/candle-pyo3/py_src/candle/utils/__init__.pyi
@@ -33,9 +33,7 @@ def has_mkl() -> bool:
pass
@staticmethod
-def load_ggml(
- path: Union[str, PathLike], device: Optional[Device] = None
-) -> Tuple[Dict[str, QTensor], Dict[str, Any], List[str]]:
+def load_ggml(path, device=None) -> Tuple[Dict[str, QTensor], Dict[str, Any], List[str]]:
"""
Load a GGML file. Returns a tuple of three objects: a dictionary mapping tensor names to tensors,
a dictionary mapping hyperparameter names to hyperparameter values, and a vocabulary.
@@ -43,9 +41,7 @@ def load_ggml(
pass
@staticmethod
-def load_gguf(
- path: Union[str, PathLike], device: Optional[Device] = None
-) -> Tuple[Dict[str, QTensor], Dict[str, Any]]:
+def load_gguf(path, device=None) -> Tuple[Dict[str, QTensor], Dict[str, Any]]:
"""
Loads a GGUF file. Returns a tuple of two dictionaries: the first maps tensor names to tensors,
and the second maps metadata keys to metadata values.
@@ -60,7 +56,7 @@ def load_safetensors(path: Union[str, PathLike]) -> Dict[str, Tensor]:
pass
@staticmethod
-def save_gguf(path: Union[str, PathLike], tensors: Dict[str, QTensor], metadata: Dict[str, Any]):
+def save_gguf(path, tensors, metadata):
"""
Save quanitzed tensors and metadata to a GGUF file.
"""