do not reload the running llm when runtime params change (#840)

- only reload the running llm if the model has changed, or the options for loading the running model have changed
- rename loaded llm to runner to differentiate from loaded model image
- remove logic which keeps the first system prompt in the generation context
This commit is contained in:
Bruce MacDonald
2023-10-19 10:39:58 -04:00
committed by GitHub
parent 235e43d7f6
commit fe6f3b48f7
3 changed files with 66 additions and 86 deletions

View File

@@ -45,7 +45,6 @@ type Model struct {
System string
License []string
Digest string
ConfigDigest string
Options map[string]interface{}
}
@@ -166,12 +165,11 @@ func GetModel(name string) (*Model, error) {
}
model := &Model{
Name: mp.GetFullTagname(),
ShortName: mp.GetShortTagname(),
Digest: digest,
ConfigDigest: manifest.Config.Digest,
Template: "{{ .Prompt }}",
License: []string{},
Name: mp.GetFullTagname(),
ShortName: mp.GetShortTagname(),
Digest: digest,
Template: "{{ .Prompt }}",
License: []string{},
}
for _, layer := range manifest.Layers {