mlx-examples/llms/mlx_lm
Madroid Ma 8eee4399f4
LoRA: Add printing and callbacks for learning rate during training (#457)
* LoRA:Refactor TrainingCallback to enhance flexibility and extensibility

This commit refactors the TrainingCallback class to accept a dictionary parameter for both on_train_loss_report and on_val_loss_report methods. By switching from multiple parameters to a single dict parameter, this change significantly improves the class's flexibility and makes it easier to extend with new training or validation metrics in the future without altering the method signatures. This approach simplifies the addition of new information to be logged or processed and aligns with best practices for scalable and maintainable code design.

* LoRA: Add printing and callbacks for learning rate during training
2024-02-20 13:07:21 -08:00
..
examples Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
models Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
tuner LoRA: Add printing and callbacks for learning rate during training (#457) 2024-02-20 13:07:21 -08:00
__init__.py Mlx llm package (#301) 2024-01-12 10:25:56 -08:00
convert.py feat: move lora into mlx-lm (#337) 2024-01-23 08:44:37 -08:00
fuse.py feat(mlx-lm): add de-quant for fuse.py (#365) 2024-01-25 18:59:32 -08:00
generate.py fix the chinese character generation as same as PR #321 (#342) 2024-01-23 12:44:23 -08:00
LORA.md Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
lora.py Change argument name in lora.py (#453) 2024-02-18 06:04:49 -08:00
MERGE.md Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
merge.py Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
py.typed Add py.typed to support PEP-561 (type-hinting) (#389) 2024-01-30 21:17:38 -08:00
README.md feat: move lora into mlx-lm (#337) 2024-01-23 08:44:37 -08:00
requirements.txt Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
SERVER.md Support for slerp merging models (#455) 2024-02-19 20:37:15 -08:00
server.py feat(mlx-lm): add openAI like api server (#429) 2024-02-18 14:01:28 -08:00
UPLOAD.md Mlx llm package (#301) 2024-01-12 10:25:56 -08:00
utils.py Add Repetitive penalty to LLM inference - mlx-lm (#399) 2024-02-16 21:58:17 -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.

This package also supports fine tuning with LoRA or QLoRA. For more information see the LoRA documentation.