GgmlType

enum class GgmlType : Enum<GgmlType> (source)

ggml_type tensor element types with their block layout, as defined by the pinned ggml (ggml/include/ggml.h, block structs in ggml/src/ggml-common.h).

A tensor of n elements occupies n / blockSize * typeSize bytes; n must be a multiple of blockSize.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Types

Link copied to clipboard
object Companion

Constants and factory functions of GgmlType.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard
fun valueOf(value: String): GgmlType

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard

elements per quantization block (1 for plain scalar types).

Link copied to clipboard
val id: Int

the numeric ggml_type value stored in GGUF tensor infos and Whisper tensor headers.

Link copied to clipboard

Whether this is a block-quantized type (as opposed to a plain float/int type).

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard

bytes per block.

Functions

Link copied to clipboard
fun byteSize(elementCount: Long): Long

Bytes needed for elementCount elements of this type.