From 1fd2bfa5f5651e5b7a710c9e47829ad0b7481d91 Mon Sep 17 00:00:00 2001 From: Ivan Fioravanti Date: Wed, 11 Dec 2024 06:17:33 +0100 Subject: [PATCH] Fix for stream_generate() takes 3 positional arguments but 4 were given --- llms/mlx_lm/chat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llms/mlx_lm/chat.py b/llms/mlx_lm/chat.py index 5a8245ef..f1d5b198 100644 --- a/llms/mlx_lm/chat.py +++ b/llms/mlx_lm/chat.py @@ -76,9 +76,9 @@ def main(): messages, tokenize=False, add_generation_prompt=True ) for response in stream_generate( - model, - tokenizer, - prompt, + model=model, + tokenizer=tokenizer, + prompt=prompt, max_tokens=args.max_tokens, sampler=make_sampler(args.temp, args.top_p), prompt_cache=prompt_cache,