diff --git a/api/types.go b/api/types.go index bc0296183..caf2ad702 100644 --- a/api/types.go +++ b/api/types.go @@ -293,6 +293,7 @@ type ProcessResponse struct { // ListModelResponse is a single model description in [ListResponse]. type ListModelResponse struct { Name string `json:"name"` + Model string `json:"model"` ModifiedAt time.Time `json:"modified_at"` Size int64 `json:"size"` Digest string `json:"digest"` @@ -301,6 +302,7 @@ type ListModelResponse struct { // ProcessModelResponse is a single model description in [ProcessResponse]. type ProcessModelResponse struct { + Name string `json:"name"` Model string `json:"model"` Size int64 `json:"size"` Digest string `json:"digest"` diff --git a/cmd/cmd.go b/cmd/cmd.go index 18db6eeec..2b5dd8a40 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -525,7 +525,7 @@ func ListRunningHandler(cmd *cobra.Command, args []string) error { var data [][]string for _, m := range models.Models { - if len(args) == 0 || strings.HasPrefix(m.Model, args[0]) { + if len(args) == 0 || strings.HasPrefix(m.Name, args[0]) { var procStr string switch { case m.SizeVRAM == 0: @@ -539,7 +539,7 @@ func ListRunningHandler(cmd *cobra.Command, args []string) error { cpuPercent := math.Round(float64(sizeCPU) / float64(m.Size) * 100) procStr = fmt.Sprintf("%d%%/%d%% CPU/GPU", int(cpuPercent), int(100-cpuPercent)) } - data = append(data, []string{m.Model, m.Digest[:12], format.HumanBytes(m.Size), procStr, format.HumanTime(m.ExpiresAt, "Never")}) + data = append(data, []string{m.Name, m.Digest[:12], format.HumanBytes(m.Size), procStr, format.HumanTime(m.ExpiresAt, "Never")}) } } diff --git a/llm/llama.cpp b/llm/llama.cpp index 5921b8f08..7c26775ad 160000 --- a/llm/llama.cpp +++ b/llm/llama.cpp @@ -1 +1 @@ -Subproject commit 5921b8f089d3b7bda86aac5a66825df6a6c10603 +Subproject commit 7c26775adb579e92b59c82e8084c07a1d0f75e9c diff --git a/server/routes.go b/server/routes.go index f947368b4..6fe04fd5d 100644 --- a/server/routes.go +++ b/server/routes.go @@ -747,6 +747,7 @@ func (s *Server) ListModelsHandler(c *gin.Context) { // tag should never be masked models = append(models, api.ListModelResponse{ + Model: trimLatest(n.DisplayShortest()), Name: trimLatest(n.DisplayShortest()), Size: m.Size(), Digest: m.digest, @@ -1156,6 +1157,7 @@ func (s *Server) ProcessHandler(c *gin.Context) { mr := api.ProcessModelResponse{ Model: trimLatest(model.ShortName), + Name: trimLatest(model.ShortName), Size: int64(v.estimatedTotal), SizeVRAM: int64(v.estimatedVRAM), Digest: model.Digest,