Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio vLLM: allow Triton non-constexpr globals so DeepSeek-OCR loads (#13264)
Daniel Han65e2314e753c
diff --git a/studio/backend/core/inference/engine_adapters.py b/studio/backend/core/inference/engine_adapters.pyindex ccf4f118449..1622088c237 100644--- a/studio/backend/core/inference/engine_adapters.py+++ b/studio/backend/core/inference/engine_adapters.py@@ -57,8 +57,13 @@ class EngineAdapter:return {"VLLM_API_KEY" if self.name == "vllm" else "UNSLOTH_ENGINE_API_KEY": key}def environment(self, gpu_count):- if self.name == "vllm" and gpu_count > 1:- return {"VLLM_HOST_IP": "127.0.0.1"}+ if self.name == "vllm":+ # vLLM 0.30+ DeepSeek-OCR encoder kernel reads a plain-float LOG2E global, a NameError on+ # Triton 3.7 (unslothai/unsloth#3911). The knob only lifts that error and is not in the cache key.+ env = {"TRITON_ALLOW_NON_CONSTEXPR_GLOBALS": "1"}+ if gpu_count > 1:+ env["VLLM_HOST_IP"] = "127.0.0.1"+ return envif self.name == "sglang" and gpu_count > 1:# Else SGLang rejects GPUs whose free memory differs >10%; KV pools size from the minimum anyway.return {diff --git a/studio/backend/tests/test_managed_engines.py b/studio/backend/tests/test_managed_engines.pyindex 9df73f5f9f2..1f2a7a10a9d 100644--- a/studio/backend/tests/test_managed_engines.py+++ b/studio/backend/tests/test_managed_engines.py@@ -1524,7 +1524,7 @@ def test_tensor_parallel_launch_stays_on_selected_local_devices(engine, size):assert ("--enable-p2p-check" in args) == (size > 1)from core.inference.engine_adapters import ADAPTERS- assert ADAPTERS[engine].environment(size) == (+ multi_gpu = ({"vllm": {"VLLM_HOST_IP": "127.0.0.1"},"sglang": {@@ -1535,6 +1535,8 @@ def test_tensor_parallel_launch_stays_on_selected_local_devices(engine, size):if size > 1else {})+ always = {"TRITON_ALLOW_NON_CONSTEXPR_GLOBALS": "1"} if engine == "vllm" else {}+ assert ADAPTERS[engine].environment(size) == {**always, **multi_gpu}@pytest.mark.parametrize("engine", ["vllm", "sglang"])