MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / _safe_open

Method _safe_open

examples/server/server.py:10412–10420  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

10410
10411 @staticmethod
10412 def _safe_open(path: Path) -> Any:
10413 try:
10414 from safetensors import safe_open
10415 except ImportError as exc:
10416 raise RuntimeError(
10417 "model.mtmd.embedding_cache requires safetensors. "
10418 "Install it with `pip install safetensors`."
10419 ) from exc
10420 return safe_open(str(path), framework="numpy")
10421
10422 @staticmethod
10423 def _save_file(

Callers 1

loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected