lmstudio-ai / configs

LM Studio JSON configuration file format and a collection of example config files.
MIT License
188 stars 32 forks source link

Can't choose GPU when multiple GPUs exist #26

Open inshua opened 6 months ago

inshua commented 6 months ago

Here is faraday did:

image

and Jan image

However I cannot select GPU in LM Studio, and it always use my CPU and memory on board.

inshua commented 6 months ago

LM studio, v0.2.16 image

chrisk314 commented 6 months ago

I'm also hitting this issue. I'm running on a laptop with an Intel Iris XE GPU integrated with the CPU and a discrete Nvidia GPU. In Windows Task Manager the integrated GPU is GPU:0 and the discrete GPU is GPU:1. I can see from the LM-Studio task in Task Manager that it is using GPU:0, despite the "Detected GPU type" displaying "Nvidia GPU" as in the screenshot from inshua.

Is there a way to configure this via the gpu-preferences.json file?

LM Studio v0.2.17

chrisk314 commented 6 months ago

In my case I resolved the issue by setting the gpuType to nvidia in the gpu-preferences.json file. It was previously set to unknown. I now see GPU:1 GPU memory usage increase in Task Manager when loading the model and the output generation is much faster.

{
  "gpuType": "nvidia",
  "modelFileFormat": "gguf"
}
inshua commented 6 months ago

In my case I resolved the issue by setting the gpuType to nvidia in the gpu-preferences.json file. It was previously set to unknown. I now see GPU:1 GPU memory usage increase in Task Manager when loading the model and the output generation is much faster.

{
  "gpuType": "nvidia",
  "modelFileFormat": "gguf"
}

You're lucky that 1 GPU is Intel and another is NVDIA.

Jeevan-J commented 2 months ago

In the latest version 0.2.28, where can we find gpu-preferences.json?

wgabrys88 commented 2 months ago

In the latest version 0.2.28, where can we find gpu-preferences.json?

"#{HOME}/.cache/lm-studio/gpu-preferences.json"

It may not be there if you have problems with GPU from the start - you will have to create that file manually.

inshua commented 2 months ago

In the latest version 0.2.28, where can we find gpu-preferences.json?

Do you know how to specify which GPU in this gpu-preferences.json?

wgabrys88 commented 2 months ago

In the latest version 0.2.28, where can we find gpu-preferences.json?

Do you know how to specify which GPU in this gpu-preferences.json?

Hi, I have tried manually but failed. However, problem is no more - on the latest LM Studio version the iGPU is working again. They have added Vulcan drivers.

PS. My suggestion is to download and store somewhere the installer, just in case they will break iGPU in the future :)