MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / kv_cache_bytes

Function kv_cache_bytes

server/test/test_kvflash.cpp:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54size_t kv_cache_bytes(const TargetCache & c) {
55 size_t n = 0;
56 for (auto * t : c.attn_k) if (t) n += ggml_nbytes(t);
57 for (auto * t : c.attn_v) if (t) n += ggml_nbytes(t);
58 return n;
59}
60
61size_t vram_used_now() {
62 size_t free_b = 0, total_b = 0;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected