MCPcopy Create free account
hub / github.com/ml-explore/mlx / mlx_load_gguf_helper

Function mlx_load_gguf_helper

python/src/load.cpp:206–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206mx::GGUFLoad mlx_load_gguf_helper(nb::object file, mx::StreamOrDevice s) {
207 if (is_str_or_path(file)) { // Assume .gguf file path string
208 auto file_str = nb::cast<std::string>(nb::str(file));
209 return mx::load_gguf(file_str, s);
210 }
211
212 throw std::invalid_argument("[load_gguf] Input must be a string");
213}
214
215std::unordered_map<std::string, mx::array> mlx_load_npz_helper(
216 nb::object file,

Callers 1

mlx_load_helperFunction · 0.85

Calls 2

is_str_or_pathFunction · 0.85
load_ggufFunction · 0.50

Tested by

no test coverage detected