MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / load_gguf

Function load_gguf

smallthinker/tools/export-lora/export-lora.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static struct gguf_context * load_gguf(std::string & fname, struct ggml_context ** ctx_ggml) {
50 struct gguf_init_params params = {
51 /*.no_alloc = */ true,
52 /*.ctx = */ ctx_ggml,
53 };
54 struct gguf_context * ctx_gguf = gguf_init_from_file(fname.c_str(), params);
55 if (!ctx_gguf) {
56 throw std::runtime_error("failed to load input GGUF from " + fname);
57 }
58 return ctx_gguf;
59}
60
61struct file_input {
62 struct ggml_context * ctx_meta = nullptr;

Callers 1

file_inputMethod · 0.85

Calls 2

gguf_init_from_fileFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected