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
Fix GPU name
Daniel Hanc9274533d20e
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 874f5d91d02..6abd4922208 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1878,18 +1878,21 @@ class FastLlamaModel:if DEVICE_TYPE == "cuda":gpu_stats = torch.cuda.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "NVIDIA GPU Device. "gpu_version = torch.version.cudagpu_stats_snippet = f"CUDA: {gpu_stats.major}.{gpu_stats.minor}. CUDA Toolkit: {gpu_version}."try: vllm_version = f" vLLM: {importlib_version('vllm')}."except: vllm_version = ""elif DEVICE_TYPE == "hip":gpu_stats = torch.cuda.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "AMD GPU Device. "gpu_version = torch.version.hipgpu_stats_snippet = f"ROCm Toolkit: {gpu_version}."try: vllm_version = f" vLLM: {importlib_version('vllm')}."except: vllm_version = ""elif DEVICE_TYPE == "xpu":gpu_stats = torch.xpu.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "Intel XPU Device. "gpu_version = torch.version.xpugpu_stats_snippet = f"Intel Toolkit: {gpu_version}."try: vllm_version = f" vLLM: {importlib_version('vllm')}."@@ -1901,7 +1904,7 @@ class FastLlamaModel:statistics = \f"==((====))== Unsloth {__version__}: Fast {model_patcher.__name__[4:-5]} patching. Transformers: {transformers_version}.{vllm_version}\n"\- f" {chr(92)}{chr(92)} /| {gpu_stats.name}. Num GPUs = {DEVICE_COUNT}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\+ f" {chr(92)}{chr(92)} /| {gpu_stats_name}Num GPUs = {DEVICE_COUNT}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\f"O^O/ {chr(92)}_/ {chr(92)} Torch: {torch.__version__}. {gpu_stats_snippet} Triton: {triton_version}\n"\f"{chr(92)} / Bfloat16 = {str(SUPPORTS_BFLOAT16).upper()}. FA [Xformers = {xformers_version}. FA2 = {HAS_FLASH_ATTENTION}]\n"\f' "-____-" Free license: http://github.com/unslothai/unsloth'diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex d6322d77f2d..2e6bd88c79d 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -374,21 +374,24 @@ class FastBaseModel:if DEVICE_TYPE == "cuda":gpu_stats = torch.cuda.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "NVIDIA GPU Device. "gpu_version = torch.version.cudagpu_stats_snippet = f"CUDA: {gpu_stats.major}.{gpu_stats.minor}. CUDA Toolkit: {gpu_version}."try: vllm_version = f" vLLM: {importlib_version('vllm')}."except: vllm_version = ""elif DEVICE_TYPE == "hip":gpu_stats = torch.cuda.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "AMD GPU Device. "gpu_version = torch.version.hipgpu_stats_snippet = f"ROCm Toolkit: {gpu_version}."try: vllm_version = f" vLLM: {importlib_version('vllm')}."except: vllm_version = ""elif DEVICE_TYPE == "xpu":gpu_stats = torch.xpu.get_device_properties(0)+ gpu_stats_name = gpu_stats.name + ". " if gpu_stats.name != "" else "Intel XPU Device. "gpu_version = torch.version.xpugpu_stats_snippet = f"Intel Toolkit: {gpu_version}."- # TODO: After adding vLLM support for XPU, changed this+ # [TODO] After adding vLLM support for XPU, change thisvllm_version = ""else:raise ValueError(f"Unsloth: Unsupported device type: {DEVICE_TYPE}")@@ -397,7 +400,7 @@ class FastBaseModel:statistics = \f"==((====))== Unsloth {__version__}: Fast {model_type_arch.title()} patching. Transformers: {transformers_version}.{vllm_version}\n"\- f" {chr(92)}{chr(92)} /| {gpu_stats.name}. Num GPUs = {DEVICE_COUNT}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\+ f" {chr(92)}{chr(92)} /| {gpu_stats_name}Num GPUs = {DEVICE_COUNT}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\f"O^O/ {chr(92)}_/ {chr(92)} Torch: {torch.__version__}. {gpu_stats_snippet} Triton: {triton_version}\n"\f"{chr(92)} / Bfloat16 = {str(SUPPORTS_BFLOAT16).upper()}. FA [Xformers = {xformers_version}. FA2 = {HAS_FLASH_ATTENTION}]\n"\f' "-____-" Free license: http://github.com/unslothai/unsloth'