Skip to content

Commit

Permalink
Stub fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Oct 6, 2024
1 parent c50e750 commit d29d2ab
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions candle-pyo3/py_src/candle/utils/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,15 @@ 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.
"""
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.
Expand All @@ -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.
"""
Expand Down

0 comments on commit d29d2ab

Please sign in to comment.