Skip to content

Mtmd: add a way to select device for vision encoder #14236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stduhpf
Copy link
Contributor

@stduhpf stduhpf commented Jun 17, 2025

Adds a way to chose which backend device to use for Clip/vision encoder by setting the MTMD_BACKEND_DEVICE env variable to the device name.

@stduhpf
Copy link
Contributor Author

stduhpf commented Jun 26, 2025

@ngxson Can you take a look at this? I think it's very easy to review and can be useful in some situations.

@hjc4869
Copy link
Contributor

hjc4869 commented Jun 26, 2025

It's indeed a useful feature. In my configuration I have two GPUs running different layers of the model with -ot and the current implementation use both of them to run vision encoder. In my use case it would be nice if it is possible to pin it to a specific device.

hjc4869 added a commit to hjc4869/llama.cpp that referenced this pull request Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants