Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Magic constant for `ggml` files (unversioned). FILE_MAGIC_GGML = 0x67676d6c // Magic constant for `ggml` files (versioned, ggmf). FILE_MAGIC_GGMF = 0x67676d66 // Magic constant for `ggml` files (versioned, ggjt). FILE_MAGIC_GGJT = 0x67676a74 // Magic constant for `ggla` files (LoRA adapter). FILE_MAGIC_GGLA = 0x67676C61 // Magic constant for `gguf` files (versioned, gguf) FILE_MAGIC_GGUF_LE = 0x46554747 FILE_MAGIC_GGUF_BE = 0x47475546 )
Variables ¶
View Source
var ErrUnsupportedFormat = errors.New("unsupported model format")
Functions ¶
Types ¶
type DetokenizeRequest ¶ added in v0.0.18
type DetokenizeRequest struct {
Tokens []int `json:"tokens"`
}
type DetokenizeResponse ¶ added in v0.0.18
type DetokenizeResponse struct {
Content string `json:"content"`
}
type EmbeddingRequest ¶ added in v0.0.18
type EmbeddingRequest struct {
Content string `json:"content"`
}
type EmbeddingResponse ¶ added in v0.0.18
type EmbeddingResponse struct {
Embedding []float64 `json:"embedding"`
}
type GGML ¶
type GGML struct { Size int64 // contains filtered or unexported fields }
func DecodeGGML ¶
func DecodeGGML(r io.ReadSeeker) (*GGML, error)
type LLM ¶
type PredictOpts ¶ added in v0.1.14
type PredictResult ¶ added in v0.1.14
type TokenizeRequest ¶ added in v0.0.18
type TokenizeRequest struct {
Content string `json:"content"`
}
type TokenizeResponse ¶ added in v0.0.18
type TokenizeResponse struct {
Tokens []int `json:"tokens"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.