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
Update llama.py
Daniel Han0460a67ed452
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 475f82a5b1a..b5bfa3cbfae 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1684,10 +1684,10 @@ class FastLlamaModel:statistics = \f"==((====))== Unsloth {__version__}: Fast {model_patcher.__name__[4:-5]} patching. Transformers: {transformers_version}.\n"\- f" {chr(92)}{chr(92)} /| GPU: {gpu_stats.name}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\+ f" {chr(92)}{chr(92)} /| {gpu_stats.name}. Num GPUs = {torch.cuda.device_count()}. Max memory: {max_memory} GB. Platform: {platform_system}.\n"\f"O^O/ {chr(92)}_/ {chr(92)} Torch: {torch.__version__}. CUDA: {gpu_stats.major}.{gpu_stats.minor}. CUDA Toolkit: {torch.version.cuda}. Triton: {triton_version}\n"\f"{chr(92)} / Bfloat16 = {str(SUPPORTS_BFLOAT16).upper()}. FA [Xformers = {xformers_version}. FA2 = {HAS_FLASH_ATTENTION}]\n"\- f' "-____-" Free Apache license: http://github.com/unslothai/unsloth'+ f' "-____-" Free license: http://github.com/unslothai/unsloth'print(statistics)# Warn about fast transfers@@ -1879,11 +1879,11 @@ class FastLlamaModel:# Cannot use \\ since it will cause a SyntaxWarning in Python 3.12# Instead use chr(92) == \\debug_info = """debug_info = \\- f"==((====))== Unsloth - 2x faster free finetuning | Num GPUs = {args.world_size}\\n"\\- f" {chr(92)}{chr(92)} /| Num examples = {num_examples:,} | Num Epochs = {num_train_epochs:,}\\n"\\- f"O^O/ {chr(92)}_/ {chr(92)} Batch size per device = {self._train_batch_size:,} | Gradient Accumulation steps = {args.gradient_accumulation_steps}\\n"\\- f"{chr(92)} / Total batch size = {total_train_batch_size:,} | Total steps = {max_steps:,}\\n"\\- f' "-____-" Number of trainable parameters = {get_model_param_count(model, trainable_only=True):,}'+ f"==((====))== Unsloth - 2x faster free finetuning | Num GPUs used = {len(set(p.device for p in model.parameters()))}\\n"\\+ f" {chr(92)}{chr(92)} /| Num examples = {num_examples:,} | Num Epochs = {num_train_epochs:,} | Total steps = {max_steps:,}\\n"\\+ f"O^O/ {chr(92)}_/ {chr(92)} Batch size per device = {self._train_batch_size:,} | Gradient accumulation steps = {args.gradient_accumulation_steps}\\n"\\+ f"{chr(92)} / Data Parallel GPUs = {args.world_size} | Total batch size = {total_train_batch_size:,}\\n"\\+ f' "-____-" Number of trainable parameters = {get_model_param_count(model, trainable_only=True):,}/{get_model_param_count(model)}'logger.warning(debug_info)import subprocess, re, gcfor _ in range(3):