mirror of
https://github.com/ollama/ollama.git
synced 2025-07-03 19:11:08 +02:00
implement loading ggml lora adapters through the modelfile
This commit is contained in:
@ -19,7 +19,7 @@ type LLM interface {
|
||||
Close()
|
||||
}
|
||||
|
||||
func New(model string, opts api.Options) (LLM, error) {
|
||||
func New(model string, adapters []string, opts api.Options) (LLM, error) {
|
||||
if _, err := os.Stat(model); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -66,7 +66,7 @@ func New(model string, opts api.Options) (LLM, error) {
|
||||
|
||||
switch ggml.ModelFamily {
|
||||
case ModelFamilyLlama:
|
||||
return newLlama(model, opts)
|
||||
return newLlama(model, adapters, opts)
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown ggml type: %s", ggml.ModelFamily)
|
||||
}
|
||||
|
Reference in New Issue
Block a user