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
vLLM Windows CUDA support [tested] (#2158)
feng lui48cb9c724c76
diff --git a/unsloth/models/__init__.py b/unsloth/models/__init__.pyindex 99db55c0867..fb3fc5c4551 100644--- a/unsloth/models/__init__.py+++ b/unsloth/models/__init__.py@@ -20,5 +20,5 @@ from .qwen3 import FastQwen3Modelfrom .qwen3_moe import FastQwen3MoeModelfrom .granite import FastGraniteModelfrom .dpo import PatchDPOTrainer, PatchKTOTrainer-from ._utils import is_bfloat16_supported, __version__-from .rl import PatchFastRL, vLLMSamplingParams+from ._utils import is_bfloat16_supported, is_vLLM_available, __version__+from .rl import PatchFastRL, vLLMSamplingParams\ No newline at end of filediff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 82a1d02fce1..4b9e2cce068 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -17,6 +17,7 @@ __version__ = "2025.5.1"__all__ = ["SUPPORTS_BFLOAT16","is_bfloat16_supported",+ "is_vLLM_available","prepare_model_for_kbit_training","xformers",@@ -800,6 +801,9 @@ def is_bfloat16_supported():return SUPPORTS_BFLOAT16pass+def is_vLLM_available():+ return _is_package_available("vllm")+pass# Patches models to add RoPE Scalingdef patch_linear_scaling(diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 2145571ae1e..207540abf5c 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1661,9 +1661,8 @@ class FastLlamaModel:)passif fast_inference:- import platform- if platform.system().lower() == 'windows':- print("Unsloth: vLLM does not work in Windows! Will use Unsloth inference!")+ if not is_vLLM_available():+ print("Unsloth: vLLM is not installed! Will use Unsloth inference!")fast_inference = Falsemajor_version, minor_version = torch.cuda.get_device_capability()if major_version < 7:diff --git a/unsloth/models/loader.py b/unsloth/models/loader.pyindex 7e904471bc7..c93c5d2742b 100644--- a/unsloth/models/loader.py+++ b/unsloth/models/loader.py@@ -14,6 +14,7 @@from ._utils import (is_bfloat16_supported,+ is_vLLM_available,HAS_FLASH_ATTENTION,HAS_FLASH_ATTENTION_SOFTCAPPING,USE_MODELSCOPE,@@ -351,9 +352,8 @@ class FastLanguageModel(FastLlamaModel):passif fast_inference:- import platform- if platform.system().lower() == 'windows':- print("Unsloth: vLLM does not work in Windows! Will use Unsloth inference!")+ if not is_vLLM_available():+ print("Unsloth: vLLM is not installed! Will use Unsloth inference!")fast_inference = Falsepassfrom unsloth_zoo.vllm_utils import (