Commit Graph

7 Commits

Author SHA1 Message Date
Anthony DePasquale
0c08f3a7e4 Add Gemma 2 (#88) 2024-07-01 09:35:43 -07:00
David Koski
6c0b66f90a implement LoRA / QLoRA (#46)
* implement LoRA / QLoRA

- example of using MLX to fine-tune an LLM with low rank adaptation (LoRA) for a target task
- see also https://arxiv.org/abs/2106.09685
- based on https://github.com/ml-explore/mlx-examples/tree/main/lora

* add some command line flags I found useful during use
- --quiet -- don't print decorator text, just the generated text
- --prompt @/tmp/file.txt -- load prompt from file

* user can specify path to model OR model identifier in huggingface

* update mlx-swift reference

Co-authored-by: Ashraful Islam <ashraful.meche@gmail.com>
Co-authored-by: JustinMeans <46542161+JustinMeans@users.noreply.github.com>
2024-04-22 09:30:12 -07:00
Awni Hannun
15b38cd146 Use fast (#38)
* update to latest mlx swift and use fast norms
* gpu usage -> memory usage
2024-03-27 16:37:35 -07:00
David Koski
0fb74cbfdc adopt MLXFast.scaledDotProductAttention (#23) 2024-03-12 14:04:43 -07:00
David Koski
c7919cf7fe fix rmsnorm for gemma 2024-02-26 14:09:48 -08:00
David Koski
bb7bacc077 fix for #2 -- CodeLlama crashes
- add replacement tokenizer class for unknown tokenizers
- fix quantization for models that don't have lm_head quantized

Requires https://github.com/ml-explore/mlx-swift/pull/28
2024-02-26 10:38:05 -08:00
David Koski
b6d1e14465 initial commit 2024-02-22 10:41:02 -08:00