MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / gguf_init_from_file

Function gguf_init_from_file

external/ggml/src/gguf.cpp:847–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_params params) {
848 FILE * file = ggml_fopen(fname, "rb");
849
850 if (!file) {
851 GGML_LOG_ERROR("%s: failed to open GGUF file '%s' (%s)\n", __func__, fname, strerror(errno));
852 return nullptr;
853 }
854
855 struct gguf_context * result = gguf_init_from_file_ptr(file, params);
856 fclose(file);
857 return result;
858}
859
860void gguf_free(struct gguf_context * ctx) {
861 if (ctx == nullptr) {

Callers 3

load_modelFunction · 0.85
magika_model_loadFunction · 0.85

Calls 2

ggml_fopenFunction · 0.85
gguf_init_from_file_ptrFunction · 0.85

Tested by

no test coverage detected