mlx-examples/llms/mlx_lm
Ivan Fioravanti c45c2311bd
Add colorized output option to generate script (#347)
* Add colorized output option to generate script

Two new functions were added to the script that allow output to be colorized based on the T[0] probability. Changes were made to the `generate_step` function in utils.py to permit colorization. Additionally, an argument for colorization was introduced to the command-line parser.

* Rename 'colorize' parameter with 'return_probability' in generate_step
2024-01-23 05:25:44 -08:00
..
models refactor(qwen): moving qwen into mlx-lm (#312) 2024-01-22 15:00:07 -08:00
__init__.py Mlx llm package (#301) 2024-01-12 10:25:56 -08:00
convert.py chore: fix the convert.py script for weights are not sanitized and support quant for non-32 dimensions (#340) 2024-01-19 21:07:21 -08:00
generate.py Add colorized output option to generate script (#347) 2024-01-23 05:25:44 -08:00
README.md Mlx llm package (#301) 2024-01-12 10:25:56 -08:00
requirements.txt refactor(qwen): moving qwen into mlx-lm (#312) 2024-01-22 15:00:07 -08:00
UPLOAD.md Mlx llm package (#301) 2024-01-12 10:25:56 -08:00
utils.py Add colorized output option to generate script (#347) 2024-01-23 05:25:44 -08:00

Generate Text with MLX and 🤗 Hugging Face

This an example of large language model text generation that can pull models from the Hugging Face Hub.

For more information on this example, see the README in the parent directory.