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

Function gguf_init_empty

ggml.c:19439–19457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19437}
19438
19439struct gguf_context * gguf_init_empty(void) {
19440 struct gguf_context * ctx = GGML_ALIGNED_MALLOC(sizeof(struct gguf_context));
19441
19442 memcpy(ctx->header.magic, GGUF_MAGIC, sizeof(ctx->header.magic));
19443 ctx->header.version = GGUF_VERSION;
19444 ctx->header.n_tensors = 0;
19445 ctx->header.n_kv = 0;
19446
19447 ctx->kv = NULL;
19448 ctx->infos = NULL;
19449
19450 ctx->alignment = GGUF_DEFAULT_ALIGNMENT;
19451 ctx->offset = 0;
19452 ctx->size = 0;
19453
19454 ctx->data = NULL;
19455
19456 return ctx;
19457}
19458
19459struct gguf_context * gguf_init_empty_sparse(void) {
19460 struct gguf_context * ctx = gguf_init_empty();

Callers 9

gguf_init_empty_sparseFunction · 0.70
export_loraFunction · 0.50
clip_model_quantizeFunction · 0.50
save_llama_model_fileFunction · 0.50
save_checkpoint_fileFunction · 0.50
save_as_llama_modelFunction · 0.50
gguf_ex_writeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected