| 401 | } |
| 402 | |
| 403 | static bool write_file(const std::string & path, const std::vector<char> & data) { |
| 404 | std::ofstream f(path, std::ios::binary | std::ios::trunc); |
| 405 | if (!f.good()) { |
| 406 | return false; |
| 407 | } |
| 408 | f.write(data.data(), (std::streamsize)data.size()); |
| 409 | return f.good(); |
| 410 | } |
| 411 | |
| 412 | // HuggingFace file auto-detection and HTTP download |
| 413 | static std::pair<long, std::vector<char>> gguf_http_get( |
no test coverage detected