Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
gguf_metadata.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
33#pragma once
34
35#include <cstdint>
36#include <string>
37
38namespace entropic {
39
49struct GgufShape {
50 bool known = false;
51 std::string architecture;
52 int block_count = 0;
53 int expert_count = 0;
54
63
69
72
80 if (!known || block_count <= 0) { return 0; }
81 return block_bytes / static_cast<uint64_t>(block_count);
82 }
83
91 if (!known || block_count <= 0) { return 0; }
92 return expert_bytes / static_cast<uint64_t>(block_count);
93 }
94};
95
109GgufShape read_gguf_shape(const std::string& path);
110
111} // namespace entropic
Activate model on GPU (WARM → ACTIVE).
@ optional
optional: every escape asks the host's path approver
GgufShape read_gguf_shape(const std::string &path)
Read a GGUF's shape from its metadata, without loading tensor data.
A GGUF's shape, as far as its metadata states it.
std::string architecture
general.architecture, "" when absent.
uint64_t bytes_per_block() const
Average bytes per transformer block.
int block_count
<arch>.block_count — the real layer count.
uint64_t non_block_bytes
Bytes not attributable to any block — always resident.
bool known
False = read failed; fields are meaningless.
int expert_count
<arch>.expert_count; 0 = dense, >0 = MoE.
uint64_t block_bytes
Total bytes of tensors that belong to a numbered block.
uint64_t expert_bytes
Bytes of expert (MoE FFN) tensors inside block_bytes.
uint64_t expert_bytes_per_block() const
Average expert bytes per block — what one cpu_moe_layers buys.