brianpetro / obsidian-smart-connections

Chat with your notes & see links to related content with AI embeddings. Use local models or 100+ via APIs like Claude, Gemini, ChatGPT & Llama 3
https://smartconnections.app
GNU General Public License v3.0
2.78k stars 183 forks source link

Select GPU for Embedding Process #818

Open Mingzefei opened 1 month ago

Mingzefei commented 1 month ago

My system has two GPUs:

When running the embedding process, the plugin defaults to GPU1 (the integrated GPU), which results in slower performance. I would like to utilize GPU0 instead.

Is it possible to add an option for users to select which GPU to use for the embedding process? Or, alternatively, could the plugin automatically detect and select the more powerful GPU by default?

Environment:

Thank you for your help and for the great work on this plugin!

brianpetro commented 1 month ago

Hi @Mingzefei

I don't think this is currently possible using the open-source huggingface transformers.js module that Smart Connections utilizes for local embeddings.

If the option becomes available in the future, then passing that option through as a setting to SC should be pretty straightforward.

🌴