Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Library: SERVED BY / EST VRAM never populate when a llama-swap model ID differs from the GGUF file stem

Đã đóng
#197 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
57/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend, search

Hướng nghiên cứu

Read internal/engines/engines.go around llamaSwap and internal/harbor/web/library.js around matchScore to trace how running model data reaches library rows. Inspect the /running payload’s cmd field and the existing engine model representation; the issue proposes extracting the --model path and matching its file stem, with name matching as fallback. Done means resident models with IDs that differ from their GGUF stems show the correct SERVED BY and EST VRAM values.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment: v0.3.6 (origin/main @ 437ac1b), Windows 11, one llama-swap engine at http://127.0.0.1:1233, library root F:\AI\.lmstudio\models.

In the Harbor library, the SERVED BY and EST VRAM columns show - for every row, including rows for models an engine reports resident with a learned footprint. berth status on the same node, same moment:

ENGINE      TYPE        UP       MODELS                                                  ...   EST. VRAM
llama-swap  llama-swap  yes      qwen-3.8-27b,text-embedding-qwen3-embedding-0.6b        ...   14365 MiB

Root cause: the library joins engine models to library rows by substring name match. matchScore in internal/harbor/web/library.js scores 2 when the lowercased names are equal, 1 when either contains the other, 0 otherwise. A llama-swap model ID is whatever the operator named the model in llama-swap; the library name is the GGUF file stem. Two live examples from the same node:

engine model ID library row result
qwen-3.8-27b Qwen3.8-27B-UD-IQ4_XS score 0 — the ID's hyphen (qwen-3.8) breaks containment against the stem (qwen3.8)
text-embedding-qwen3-embedding-0.6b Qwen3-Embedding-0.6B-Q8_0 score 0 — neither name contains the other

Both rows render - in SERVED BY and EST VRAM while the models are loaded and serving (decode/prefill counters moving, tokens accruing).

Why substring is the wrong key: llama-swap's /running payload already carries the exact file path for each model in its cmd field — e.g. --model "F:\AI\.lmstudio\models\unsloth\Qwen3.8-27B-GGUF\Qwen3.8-27B-UD-IQ4_XS.gguf" — but Berth's reader picks up only model, state, and proxy (llamaSwap in internal/engines/engines.go, lines 575–586). Suggested direction: parse the --model path from /running (or have llama-swap expose it as an explicit field), carry it on the engine model, and join library rows on the file stem with the name match as fallback. An operator-maintained model→name alias map in the engine config would also work, but puts the bookkeeping on every user.

This affects any engine whose model names diverge from file stems; for llama-swap that is the common case, since the ID is operator-chosen and is usually shorter than the stem. Workaround until fixed: name the llama-swap model IDs identically to the GGUF stems (which changes the model IDs in API traffic).

Note: the CACHED column on Windows is a separate, by-design gap (internal/pagecache/other.go returns ErrUnsupported off-Linux), not part of this defect.

Ngôn ngữ chính
Go
Star
226
Fork
20
Merge trung bình
51 phút
Pull request đã merge (30 ngày)
225

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của T-Crypt/berth

Tất cả issue của T-Crypt/berth

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.