Offload mmproj to RAM and swap with LLM layers to VRAM at runtime to allow more VRAM for the LLM #20246
Interpause
started this conversation in
Ideas
Replies: 1 comment
|
This would be huge, since swapping on an image request would be much faster for me too. On CPU, an image request takes about a minute for me at the moment :/ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Given
gpu-layers, I assume there is a mechanism that swaps LLM layers from VRAM to RAM at runtime. Having mmproj for vision capability is useful, but I don't want to have reload models to toggle it, leaving VRAM wasted by mmproj when unused.Hence I propose:
Why the above approach?
Alternatives:
EDIT:
I got mmproj offload to RPC ROCm to work using Lemonade's ROCm llama.cpp build. Specifically for my AMD 780M iGPU, I had to set env var
HSA_OVERRIDE_GFX_VERSION=11.0.0. Currently testing mmproj speed and if it has the Vulkan quality degradation issue. After testing on the problematic images, ROCm proves to have no numerical errors. But its image processing takes 22s... CPU takes 30s and vulkan around 6s. Yet btop shows that the iGPU is hammered (rather than the CPU, so its not like rpc-server is offloading to CPU). And I specified ROCm0 specifically for the rpc-server, could it be RPC overhead? NVM its dependent on image complexity and how much tokens it resolves to, i think further testing is needed.All reactions