server: dont error on missing tokenizer.chat_template
This commit is contained in:
parent
ce0dc33cb8
commit
05f79602f0
@ -437,11 +437,7 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio
|
||||
config.ModelFamilies = append(config.ModelFamilies, baseLayer.GGML.KV().Architecture())
|
||||
|
||||
if s := baseLayer.GGML.KV().ChatTemplate(); s != "" {
|
||||
t, err := templates.NamedTemplate(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if t, err := templates.NamedTemplate(s); err != nil {
|
||||
layer, err := NewLayer(t.Reader(), "application/vnd.ollama.image.template")
|
||||
if err != nil {
|
||||
return err
|
||||
@ -451,6 +447,7 @@ func CreateModel(ctx context.Context, name model.Name, modelFileDir, quantizatio
|
||||
layers = append(layers, layer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
layers = append(layers, baseLayer.Layer)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user