From ce516fc81498b6613a7f8a14f96411152bbc1d90 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 14 Mar 2025 02:21:15 -0700 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index b062bc2d49..7e68adf0cf 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