Lend part of a card from a running engine and get it back, without a park or a reload
Maintainer thường phản hồi trong vòng 1 ngày
@T-Crypt đang làm issue này rồi.
Từ ngày 23/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Project home: https://github.com/TacoTakumi/vram-lend
My setup
- Ubuntu 24.04, NVIDIA driver 610.43.02, CUDA 13.
- 2x RTX 3090 (24 GB), 1x RTX 5060 Ti (16 GB) and 2x RTX 4060 Ti (16 GB). 96 GB of VRAM, 128 GB RAM.
- llama-swap serves everything. Most models run on llama.cpp. GLM-5.3-Flash and DeepSeek V4.1 Flash run on Project Maya, Qwen 3.8 Flash Next runs on Strata.
- Right now Maya runs GLM-5.3-Flash and DSV41 as three llama-swap entries, on 2, 3 or 5 cards.
- ComfyUI runs under llama-swap on the 5060 Ti.
- VoiceManager runs on a 4060 Ti.
What I want to do
When I want ComfyUI or a voice model, I switch Maya from the 5 card entry to the 2 or 3 card entry. The model reloads and I lose the session cache. When I am done I switch back and it reloads again.
Maya keeps the experts in system RAM and a cache of them on the cards. It can already give part of that cache away inside its own process. The vision encoder starts only when a picture arrives, in VRAM that the model lends from its expert cache. I want the same thing between processes. Maya drops part of its cache on one card and keeps serving, only slower. ComfyUI or the voice model uses that memory. When the borrower is done, Maya takes the memory back and fills its cache again.
So the engine does not stop. It lends N MiB on one named card and gets it back later. Park is all or nothing and needs-mib is fixed at the grant, so neither covers this. It is close to the fit and scenes item on your roadmap, but here the holder keeps running.
Questions
- Would you take a lease that its holder can shrink and grow while it serves? The flow I have in mind:
- A borrower asks for N MiB on card X.
- Berth asks the holder to give back N MiB on card X.
- The holder answers when the memory is free. Berth checks the driver read, as it does for a release now.
- Berth grants the borrower a sized lease.
- When the borrower ends, Berth tells the holder it can take the memory back.
- Should this go in the park protocol? Something like this would work for Maya and Strata:
POST /berth/lend {"card": "0000:05:00.0", "mib": 8192} -> 200 when the memory is free, 409 if the engine cannot give that much
POST /berth/return {"card": "0000:05:00.0"} -> 200 when the engine holds it again
GET /berth/state -> {"state": "hot", "lent": {"0000:05:00.0": 8192}}
-
My model holds five cards and lends from one of them. Will the v0.4 lease table let one lease cover several cards, with a size for each card?
-
I will build this in my own forks of Berth, Maya and Strata. If the shape fits where Berth is going, would you take the Berth side back as a PR?
Thanks!
- Ngôn ngữ chính
- Go
- Star
- 226
- Fork
- 20
- Merge trung bình
- 43 phút
- Pull request đã merge (30 ngày)
- 192
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của T-Crypt/berth
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
T-Crypt/berth#204 · 11 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
T-Crypt/berth#197 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
berthd --gpu-backend amd exits at startup on a desktop session: "process VRAM exceeds card usage"Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
T-Crypt/berth#196 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của T-Crypt/berth
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: BivyĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
slavakurilyak/awesome-ai-agents#880 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
后缀带有LTX的番号无法自动匹配Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
metatube-community/metatube-sdk-go#387 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/openserverless#282 · 2 bình luận ·