|
ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
|
Complete representation of a GGUF file's contents. More...
#include <gguf_structs.h>

Public Member Functions | |
| GGUFData () | |
| ~GGUFData () | |
| GGUFData (const GGUFData &)=delete | |
| GGUFData & | operator= (const GGUFData &)=delete |
| GGUFData (GGUFData &&other) noexcept | |
| GGUFData & | operator= (GGUFData &&other) noexcept |
Public Attributes | |
| GGUFHeader | header |
| std::map< std::string, GGUFMetadataValue > | metadata |
| std::vector< GGUFTensorInfo > | tensor_infos |
| std::map< std::string, GGUFTensorInfo > | tensor_infos_map |
| std::vector< std::string > | tokenizer_tokens |
| std::vector< float > | tokenizer_scores |
| std::vector< uint32_t > | tokenizer_token_types |
| std::vector< std::string > | tokenizer_merges |
| int | file_descriptor = -1 |
| void * | mapped_tensor_data = nullptr |
| size_t | mapped_tensor_data_size = 0 |
| uint64_t | data_alignment = 32 |
| size_t | offset_diff_for_mmap = 0 |
| std::vector< uint8_t > | tensor_data |
Static Public Attributes | |
| static const void * | MMapFailure = MAP_FAILED |
Complete representation of a GGUF file's contents.
This structure contains all the data from a GGUF file, including header information, metadata, tensor information, and the actual tensor data. It also includes tokenizer-specific data that may be present in the file.
Definition at line 80 of file gguf_structs.h.
|
inline |
Definition at line 111 of file gguf_structs.h.
|
inline |
Definition at line 117 of file gguf_structs.h.
References file_descriptor, j, mapped_tensor_data, mapped_tensor_data_size, MMapFailure, and offset_diff_for_mmap.
|
inlinenoexcept |
Definition at line 149 of file gguf_structs.h.
References j.
Definition at line 183 of file gguf_structs.h.
References data_alignment, file_descriptor, header, j, mapped_tensor_data, mapped_tensor_data_size, metadata, MMapFailure, offset_diff_for_mmap, tensor_data, tensor_infos, tensor_infos_map, tokenizer_merges, tokenizer_scores, tokenizer_token_types, and tokenizer_tokens.
| uint64_t GGUFData::data_alignment = 32 |
Alignment requirement for tensor data
Definition at line 103 of file gguf_structs.h.
Referenced by operator=().
| int GGUFData::file_descriptor = -1 |
File descriptor for POSIX mmap
Definition at line 94 of file gguf_structs.h.
Referenced by operator=(), and ~GGUFData().
| GGUFHeader GGUFData::header |
Pointer to memory-mapped tensor data block
Definition at line 101 of file gguf_structs.h.
Referenced by operator=(), and ~GGUFData().
| size_t GGUFData::mapped_tensor_data_size = 0 |
Size of the mapped tensor data block in bytes
Definition at line 102 of file gguf_structs.h.
Referenced by operator=(), and ~GGUFData().
| std::map<std::string, GGUFMetadataValue> GGUFData::metadata |
|
static |
POSIX mmap failure indicator - DECLARED here, DEFINED in .cpp
Definition at line 95 of file gguf_structs.h.
Referenced by load_gguf_meta(), operator=(), and ~GGUFData().
| size_t GGUFData::offset_diff_for_mmap = 0 |
Difference between aligned mmap offset and actual data start
Definition at line 104 of file gguf_structs.h.
Referenced by operator=(), and ~GGUFData().
| std::vector<uint8_t> GGUFData::tensor_data |
Tensor data loaded into memory (non-mmap mode)
Definition at line 107 of file gguf_structs.h.
Referenced by operator=().
| std::vector<GGUFTensorInfo> GGUFData::tensor_infos |
| std::map<std::string, GGUFTensorInfo> GGUFData::tensor_infos_map |
Map of tensor names to information
Definition at line 84 of file gguf_structs.h.
Referenced by ember_ir::build_ir_from_gguf(), and operator=().
| std::vector<std::string> GGUFData::tokenizer_merges |
| std::vector<float> GGUFData::tokenizer_scores |
| std::vector<uint32_t> GGUFData::tokenizer_token_types |
| std::vector<std::string> GGUFData::tokenizer_tokens |
Vocabulary tokens
Definition at line 87 of file gguf_structs.h.
Referenced by ember_ir::build_ir_from_gguf(), tinyllama::TinyLlamaSession::gguf_tokens(), and operator=().