| 204 | } |
| 205 | |
| 206 | mx::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 | |
| 215 | std::unordered_map<std::string, mx::array> mlx_load_npz_helper( |
| 216 | nb::object file, |
no test coverage detected