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

Function get_kv_str

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

Source from the content-addressed store, hash-verified

19};
20
21static std::string get_kv_str(struct gguf_context * ctx_gguf, const std::string & key){
22 int id = gguf_find_key(ctx_gguf, key.c_str());
23 return id < 0 ? "" : std::string(gguf_get_val_str(ctx_gguf, id));
24}
25
26static float get_kv_f32(struct gguf_context * ctx_gguf, const std::string & key) {
27 int id = gguf_find_key(ctx_gguf, key.c_str());

Callers 2

check_metadata_loraMethod · 0.85

Calls 4

gguf_find_keyFunction · 0.50
stringClass · 0.50
gguf_get_val_strFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected