Documentation
¶
Index ¶
- type ModelLoader
- func (ml *ModelLoader) ExistsInModelPath(s string) bool
- func (ml *ModelLoader) ListModels() ([]string, error)
- func (ml *ModelLoader) LoadGPT2Model(modelName string) (*gpt2.GPT2, error)
- func (ml *ModelLoader) LoadGPTJModel(modelName string) (*gptj.GPTJ, error)
- func (ml *ModelLoader) LoadLLaMAModel(modelName string, opts ...llama.ModelOption) (*llama.LLama, error)
- func (ml *ModelLoader) LoadStableLMModel(modelName string) (*gpt2.StableLM, error)
- func (ml *ModelLoader) TemplatePrefix(modelName string, in interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelLoader ¶
type ModelLoader struct {
// 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)
Click to show internal directories.
Click to hide internal directories.