model

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) ExistsInModelPath

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

func (*ModelLoader) ListModels

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

func (*ModelLoader) LoadGPT2Model added in v1.2.0

func (ml *ModelLoader) LoadGPT2Model(modelName string) (*gpt2.GPT2, error)

func (*ModelLoader) LoadGPTJModel

func (ml *ModelLoader) LoadGPTJModel(modelName string) (*gptj.GPTJ, error)

func (*ModelLoader) LoadLLaMAModel

func (ml *ModelLoader) LoadLLaMAModel(modelName string, opts ...llama.ModelOption) (*llama.LLama, error)

func (*ModelLoader) LoadStableLMModel added in v1.2.0

func (ml *ModelLoader) LoadStableLMModel(modelName string) (*gpt2.StableLM, 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