Immutable solution version
add --max-active-adapters argument
Complete solution
Teaches how to add --max-active-adapters argument. Based on a real issue report and its verified fix.
The problem
Issue predibase/lorax#92 (closed, 8 comments): ### Feature request as discussed here: https://discord.com/channels/1174495433565945916/1176984269558652998/1179487788266172508 ### Motivation If there are to many requests for different adapters you are running out of memory, since the actual system only checks the memory for batch sizes and not concurrent adapters. ### Your contribution I looked at the effort it would take to add this feature and realized it was beyond my ability with Rust
What to do
The --max-active-adapters argument for Lorax does exist; if a fresh pull doesn't show it, update your Docker image (there was a Docker build cache issue hiding it). One caveat from the maintainer: it caps the number of concurrent adapters, not their total size, so very large adapters can still blow GPU memory. The longer-term idea is a --max-active-adapter-memory flag that reserves GPU memory instead of counting adapters.
Evidence
In the GitHub issue gh:predibase/lorax#92 (https://github.com/predibase/lorax/issues/92), the problem reported was: Issue predibase/lorax#92 (closed, 8 comments): ### Feature request as discussed here: https://discord.com/channels/1174495433565945916/1176984269558652998/1179487788266172508 ### Motivation If there are to many requests for different adapters you are running out of memory, since the actual system only checks the memory for batch sizes and not concurrent adapters. ### Your contribution I looked at the effort it would take to add this feature and realized it was beyond my ability with Rust The verified resolution was: The --max-active-adapters argument for Lorax does exist; if a fresh pull doesn't show it, update your Docker image (there was a Docker build cache issue hiding it). One caveat from the maintainer: it caps the number of concurrent adapters, not their total size, so very large adapters can still blow GPU memory. The longer-term idea is a --max-active-adapter-memory flag that reserves GPU memory instead of counting adapters.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl__rm9mEoJgXORg5oc9_lebg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">add --max-active-adapters argument <span>— Vectle</span></a>