Versions in this module Expand all Collapse all v1 v1.4.0 Apr 28, 2023 Changes in this version type Context + func (ctx *Context) ReleaseContext() v1.3.0 Apr 23, 2023 Changes in this version type Context + MLContext *ml.Context v1.2.0 Apr 20, 2023 Changes in this version + type ModelParams struct + Antiprompt []string + BatchSize uint32 + CtxSize uint32 + Embedding bool + IgnoreEOS bool + InputPrefix string + Instruct bool + Interactive bool + InteractiveStart bool + KeepCount uint32 + MaxThreads int + MemTest bool + MemoryFP16 bool + Model string + PartsCount int + Perplexity bool + PredictCount uint32 + Prompt string + RandomPrompt bool + RepeatLastN uint32 + RepeatPenalty float32 + Seed int + Temp float32 + TopK uint32 + TopP float32 + UseAVX bool + UseColor bool + UseMLock bool + UseNEON bool + VerbosePrompt bool v1.1.0 Apr 15, 2023 Changes in this version + const LLAMA_FILE_MAGIC + const LLAMA_FILE_MAGIC_OLD + const LLAMA_FILE_MAGIC_UNVERSIONED + const LLAMA_FILE_VERSION + const SPLIT_BY_COLUMNS + const SPLIT_BY_ROWS + const SPLIT_NONE + var LLAMA_N_PARTS = map[uint32]int + func Colorize(format string, opts ...interface{}) (n int, err error) + func Eval(lctx *Context, tokens []uint32, tokensCount uint32, pastCount uint32, ...) error + func ExtractTokens(r *ring.Ring, count int) []uint32 + func Resize(slice []float32, size int) []float32 + func ResizeInplace(slice *[]float32, size int) + func SampleTopPTopK(lctx *Context, lastNTokens *ring.Ring, lastNTokensSize uint32, topK uint32, ...) uint32 + type Context struct + Embedding []float32 + Logits []float32 + LogitsAll bool + Model *Model + Vocab *ml.Vocab + func LoadModel(fileName string, silent bool) (*Context, error) + func NewContext() *Context + type ContextParams struct + CtxSize uint32 + Embedding bool + LogitsAll bool + PartsCount int + Seed int + UseLock bool + VocabOnly bool + type HParams struct + type KVCache struct + K *ml.Tensor + N uint32 + V *ml.Tensor + type Layer struct + type Model struct + Type ModelType + func NewModel() *Model + type ModelType uint8 + const MODEL_13B + const MODEL_30B + const MODEL_65B + const MODEL_7B + const MODEL_UNKNOWN