model

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LlamaBackend           = "llama"
	BloomzBackend          = "bloomz"
	StarcoderBackend       = "starcoder"
	GPTJBackend            = "gptj"
	DollyBackend           = "dolly"
	MPTBackend             = "mpt"
	GPTNeoXBackend         = "gptneox"
	ReplitBackend          = "replit"
	Gpt2Backend            = "gpt2"
	Gpt4AllLlamaBackend    = "gpt4all-llama"
	Gpt4AllMptBackend      = "gpt4all-mpt"
	Gpt4AllJBackend        = "gpt4all-j"
	BertEmbeddingsBackend  = "bert-embeddings"
	RwkvBackend            = "rwkv"
	WhisperBackend         = "whisper"
	StableDiffusionBackend = "stablediffusion"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelLoader

type ModelLoader struct {
	ModelPath string
	// contains filtered or unexported fields
}

func NewModelLoader

func NewModelLoader(modelPath string) *ModelLoader

func (*ModelLoader) BackendLoader added in v1.7.0

func (ml *ModelLoader) BackendLoader(backendString string, modelFile string, llamaOpts []llama.ModelOption, threads uint32) (model interface{}, err error)

func (*ModelLoader) ExistsInModelPath

func (ml *ModelLoader) ExistsInModelPath(s string) bool

func (*ModelLoader) GreedyLoader added in v1.7.0

func (ml *ModelLoader) GreedyLoader(modelFile string, llamaOpts []llama.ModelOption, threads uint32) (interface{}, error)

func (*ModelLoader) ListModels

func (ml *ModelLoader) ListModels() ([]string, error)

func (*ModelLoader) LoadModel added in v1.9.0

func (ml *ModelLoader) LoadModel(modelName string, loader func(string) (interface{}, error)) (interface{}, error)

func (*ModelLoader) TemplatePrefix

func (ml *ModelLoader) TemplatePrefix(modelName string, in interface{}) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL