Skip to content

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.

Update _utils.py

Daniel Han0a0934909684
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index b062bc2d49c..7e68adf0cff 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -201,7 +201,7 @@ def get_model_param_count(model, trainable_only = False):
billions = re.findall(r"([0-9]{1,})(?:b|B)", model.config.name_or_path)
if len(billions) != 0:
- billions = max(int(x) for x in billions)
+ billions = int(billions[0])
s = 1_000_000_000 * billions
pass
return s