Documentation ¶
Index ¶
- Constants
- type GGUFFile
- type GGUFFileReader
- func (r *GGUFFileReader) ReadGGUFFile() (*GGUFFile, error)
- func (r *GGUFFileReader) ReadGGUFHeader() (*GGUFHeader, error)
- func (r *GGUFFileReader) ReadGGUFTensorInfos(count uint64) ([]GGUFTensorInfo, error)
- func (r *GGUFFileReader) ReadMetadataKVs(count uint64) ([]GGUFMetadataKV, error)
- func (r *GGUFFileReader) ReadValue(typ ggufMetadataValueType) (string, error)
- type GGUFHeader
- type GGUFMetadataKV
- type GGUFString
- type GGUFTensorInfo
Constants ¶
View Source
const ( GGMLTypeF32 ggmlType = iota GGMLTypeF16 GGMLTypeQ40 GGMLTypeQ41 GGMLTypeQ50 = 6 GGMLTypeQ51 GGMLTypeQ80 GGMLTypeQ81 GGMLTypeQ2K GGMLTypeQ3K GGMLTypeQ4K GGMLTypeQ5K GGMLTypeQ6K GGMLTypeQ8K GGMLTypeI8 GGMLTypeI16 GGMLTypeI32 GGMLTypeCount )
View Source
const ( GGUFMetadataValueTypeUint8 ggufMetadataValueType = iota GGUFMetadataValueTypeInt8 GGUFMetadataValueTypeUint16 GGUFMetadataValueTypeInt16 GGUFMetadataValueTypeUint32 GGUFMetadataValueTypeInt32 GGUFMetadataValueTypeFloat32 GGUFMetadataValueTypeBool GGUFMetadataValueTypeString GGUFMetadataValueTypeArray GGUFMetadataValueTypeUint64 GGUFMetadataValueTypeInt64 GGUFMetadataValueTypeFloat64 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GGUFFile ¶
type GGUFFile struct { Header GGUFHeader MetadataKV []GGUFMetadataKV TensorInfos []GGUFTensorInfo Padding []byte TensorData []byte }
GGUFFile represents the GGUF file in Go
type GGUFFileReader ¶
type GGUFFileReader struct {
// contains filtered or unexported fields
}
GGUFFileReader represents a reader for GGUF files
func NewGGUFFileReader ¶
func NewGGUFFileReader(reader io.Reader) *GGUFFileReader
NewGGUFFileReader creates a new GGUFFileReader with the given io.Reader
func (*GGUFFileReader) ReadGGUFFile ¶
func (r *GGUFFileReader) ReadGGUFFile() (*GGUFFile, error)
ReadGGUFFile reads the entire GGUF file from the reader
func (*GGUFFileReader) ReadGGUFHeader ¶
func (r *GGUFFileReader) ReadGGUFHeader() (*GGUFHeader, error)
ReadGGUFHeader reads the GGUF header from the reader
func (*GGUFFileReader) ReadGGUFTensorInfos ¶
func (r *GGUFFileReader) ReadGGUFTensorInfos(count uint64) ([]GGUFTensorInfo, error)
ReadGGUFTensorInfos reads the GGUF tensor infos from the reader
func (*GGUFFileReader) ReadMetadataKVs ¶
func (r *GGUFFileReader) ReadMetadataKVs(count uint64) ([]GGUFMetadataKV, error)
func (*GGUFFileReader) ReadValue ¶
func (r *GGUFFileReader) ReadValue(typ ggufMetadataValueType) (string, error)
type GGUFHeader ¶
GGUFHeader represents the GGUF header in Go
type GGUFMetadataKV ¶
GGUFMetadataKV represents the GGUF metadata key-value pair in Go
type GGUFString ¶
GGUFString represents the GGUF string in Go
Click to show internal directories.
Click to hide internal directories.