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