LM Studio 0.3.14:多 GPU 控制 🎛️

LM Studio 0.3.14 针对双 GPU 及更多 GPU 设置引入了新的控制功能
LM Studio 0.3.14 引入了针对多 GPU 设置的全新精细控制功能。新功能包括:启用/禁用特定 GPU 的能力,选择分配策略(平均分配、优先顺序),以及将模型权重限制在专用 GPU 内存中。
如果您的系统中拥有多于 1 个 GPU,您可能不再被认为是“GPU 贫民”。但能力越大,责任越大。您需要明智地管理您的 GPU,以发挥它们的最大性能。
在 LM Studio 0.3.14 中,我们引入了新的调节选项,以帮助您更好、更有目的地管理您的 GPU 资源。其中一些新功能目前仅适用于 NVIDIA GPU。我们正在积极努力将其引入 AMD GPU。

使用 Ctrl+Shift+Alt+H 在新窗口中弹出它们。
要打开 GPU 控制,在 Windows 或 Linux 上按 Ctrl+Shift+H,在 Mac 上按 Cmd+Shift+H。您也可以通过按 Ctrl+Alt+Shift+H/Cmd+Option+Shift+H 在弹出窗口中打开 GPU 控制。
随着我们对最佳配置的了解加深,我们的目标是在手动控制的基础上增加自动模式。这些功能通过 LM Studio 的 GUI 提供,并将在未来通过 lms CLI 提供。
使用每个 GPU 旁边的开关来启用或禁用它。禁用 GPU 意味着 LM Studio 不会使用它。这在您混合使用强大和较弱 GPU 的情况下,或者您想为其他任务保留一个 GPU 时非常有用。
该视频演示了禁用 GPU 1,然后加载模型。模型仅加载到 GPU 0 上,GPU 1 上没有任何活动。
禁用 GPU 1,仅在 GPU 0 上加载模型
目前仅限 CUDA
LLM 可能非常占用内存。通常占用最多的是模型权重和对话上下文缓冲区。在模型权重过大无法完全放入一个 GPU 的专用内存中的情况下,您的操作系统可能会在共享 GPU 内存中分配内存。这可能会大大降低速度。
视频首先展示此选项为“关闭”状态,导致内存分配到专用和共享内存。然后,该选项被设置为“开启”,模型仅加载到专用内存中。
将模型卸载限制到专用 GPU 内存
“将模型卸载限制到专用 GPU 内存”模式确保模型权重仅加载到专用 GPU 内存中。如果模型权重过大无法完全放入专用 GPU 内存,LM Studio 将自动减小 GPU 卸载大小,以将模型权重适应专用 GPU 内存,其余部分放入系统 RAM。
根据我们的测试,在专用 GPU 内存和系统 RAM之间分割模型权重比使用共享 GPU 内存更快。如果您的体验不同,请告诉我们!
上下文缓冲区可能仍使用共享内存。假设模型的权重可以放入专用 GPU 内存并留有一些空间。模型将以全速运行,直到上下文增长超出剩余的专用内存。当上下文溢出到共享内存时,性能将逐渐减慢。这种方法可以实现快速的初始性能,而不是将所有上下文限制在较慢的 RAM 中。
目前仅限 CUDA
您现在可以设置 GPU 的优先级顺序。这意味着什么
视频演示了加载多个模型。请注意 LM Studio 是如何先完全填满 GPU 0,然后才开始在 GPU 1 上进行分配的。
按顺序填充模式:按照您指定的 GPU 优先级序列分配模型
我们正在寻找用户,他们可以帮助我们测试并提供关于新功能在这种设置下如何工作的反馈。如果您有 3 个或更多 GPU 的设置(Windows 或 Linux),请通过 [email protected] 联系我们。谢谢!
**Build 1** - New: GPU Controls 🎛️ - On multi-GPU setups, customize how models are offloaded onto your GPUs - Enable/disable individual GPUs - CUDA-specific features: - "Priority order" mode: The system will try to allocate more on GPUs listed first - "Limit Model Offload to Dedicated GPU memory" mode: The system will limit offload of model weights to dedicated GPU memory and RAM only. Context may still use shared memory - How to open GPU controls: - Windows: `Ctrl+Shift+H` - Mac: `Cmd+Shift+H` - How to open GPU controls in a pop-out window: - Windows: `Ctrl+Alt+Shift+H` - Mac: `Cmd+Option+Shift+H` - Benefit: Manage GPU settings while models are loading - LG AI EXAONE Deep reasoning model support - Improved model loader UI in small window sizes - Improve Llama model family tool call reliability through LM Studio SDK and OpenAI compatible streaming API - [SDK] Added support for GBNF grammar when using structured generation - [SDK/RESTful API] Added support for specifying presets - Fixed a bug where sometimes the last couple fragments of a prediction are lost **Build 2** - Optimized "Limit Model Offload to Dedicated GPU memory" mode in long context situations on single GPU setups - Speculative decoding draft model now respects GPU controls - [CUDA] Fixed a bug where model would crash with message "Invalid device index" - [Windows ARM] Fixed chat with document sometimes not working **Build 3** - [Advanced GPU controls] Fixed a bug where intermediate buffers were being allocated on disabled GPUs - Fixed "OpenSquareBracket !== CloseStatement" bug with Nemotron model - Fixed a bug where Nemotron GGUF model metadata was not being read properly - [Windows] Fixed: Make sure the LM Studio.exe executable is also signed. Should help with anti-virus false positives **Build 4** - [Advanced GPU controls] Allow disabling all GPUs with any engine - [Advanced GPU controls] Fix bug where disabling a GPU would cause incorrect offloading when > 2 gpus - [Advanced GPU controls][CUDA] Improved stability of"Limit Model Offload to Dedicated GPU memory" mode - Added GPU controls logging to "Developer Logs" - Fixed a bug where sometimes editing model config inside the model loader popover does not take effect - Fixed a bug related to renaming state focus on chat cells **Build 5** - [Advanced GPU controls] Enlarge GPU controls pop-out window