From 1b05b51dc533cff377713aa5edbe2bdc69cbcf16 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Wed, 9 Oct 2024 19:13:33 -0700 Subject: [PATCH] don't throw if no metal --- llms/mlx_lm/server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llms/mlx_lm/server.py b/llms/mlx_lm/server.py index 47a72599..eadf951b 100644 --- a/llms/mlx_lm/server.py +++ b/llms/mlx_lm/server.py @@ -31,10 +31,8 @@ from .utils import generate_step, load def get_system_fingerprint(): - return ( - f"{__version__}-{mx.__version__}-{platform.platform()}-" - f"{mx.metal.device_info().get('architecture', '')}" - ) + gpu_arch = mx.metal.device_info()["architecture"] if mx.metal.is_available() else "" + return f"{__version__}-{mx.__version__}-{platform.platform()}-{gpu_arch}" class StopCondition(NamedTuple):