class Llamero::MetaData::MetaDataReader

Overview

This class reads the meta data from a gguf model file according to the GGUF/GGML Original File Spec

Defined in:

models/meta_data/meta_data_reader.cr

Constant Summary

GGUF_METADATA_VALUE_TYPE_ARRAY = 9

Arrays can be nested, and the length of the array is the number of elements in the array, not the number of bytes.

GGUF_METADATA_VALUE_TYPE_BOOL = 7
GGUF_METADATA_VALUE_TYPE_FLOAT32 = 6
GGUF_METADATA_VALUE_TYPE_FLOAT64 = 12
GGUF_METADATA_VALUE_TYPE_INT16 = 3
GGUF_METADATA_VALUE_TYPE_INT32 = 5
GGUF_METADATA_VALUE_TYPE_INT64 = 11
GGUF_METADATA_VALUE_TYPE_INT8 = 1
GGUF_METADATA_VALUE_TYPE_STRING = 8
GGUF_METADATA_VALUE_TYPE_UINT16 = 2
GGUF_METADATA_VALUE_TYPE_UINT32 = 4
GGUF_METADATA_VALUE_TYPE_UINT64 = 10
GGUF_METADATA_VALUE_TYPE_UINT8 = 0

Constructors

Instance Method Summary

Constructor Detail

def self.new(model_file_path : Path) #

[View source]

Instance Method Detail

def bos_token : String #

[View source]
def bos_token=(bos_token : String) #

[View source]
def chat_template : String #

[View source]
def chat_template=(chat_template : String) #

[View source]
def eos_token : String #

[View source]
def eos_token=(eos_token : String) #

[View source]
def file_header : NamedTuple(magic: UInt32, version: UInt32, tensor_count: UInt64, metadata_kv_count: UInt64) #

[View source]
def file_header=(file_header : NamedTuple(magic: UInt32, version: UInt32, tensor_count: UInt64, metadata_kv_count: UInt64)) #

[View source]
def model_file_path : Path #

[View source]
def model_file_path=(model_file_path : Path) #

[View source]
def padding_token : String #

[View source]
def padding_token=(padding_token : String) #

[View source]
def read_meta_data #

[View source]
def separator_token : String #

[View source]
def separator_token=(separator_token : String) #

[View source]
def tokens_array : Array(JSON::Any) #

[View source]
def tokens_array=(tokens_array : Array(JSON::Any)) #

[View source]
def unknown_token : String #

[View source]
def unknown_token=(unknown_token : String) #

[View source]