From 83bc764e78be78e9b493ed8fdecb72420dd7eca8 Mon Sep 17 00:00:00 2001 From: Neil Mehta Date: Tue, 26 Nov 2024 16:46:08 -0500 Subject: [PATCH] Fix formatting --- llms/mlx_lm/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llms/mlx_lm/utils.py b/llms/mlx_lm/utils.py index 7329d626..f439ca99 100644 --- a/llms/mlx_lm/utils.py +++ b/llms/mlx_lm/utils.py @@ -321,7 +321,9 @@ def stream_generate( tokenizer = TokenizerWrapper(tokenizer) if not isinstance(prompt, mx.array): - prompt = mx.array(prompt if isinstance(prompt, list) else tokenizer.encode(prompt)) + prompt = mx.array( + prompt if isinstance(prompt, list) else tokenizer.encode(prompt) + ) detokenizer = tokenizer.detokenizer