Commit Graph

15 Commits

Author SHA1 Message Date
Anthony DePasquale
0c08f3a7e4 Add Gemma 2 (#88) 2024-07-01 09:35:43 -07:00
David Koski
9d74afd119 handle partially quantized models (#76)
* handle partially quantized models

- fix for #53 #71 #69 #74
- in order to test the models
	- I added a default prompt of an appropriate form
	- while working on the model configuration also added additional stop tokens (#74)
- fixed the repetitionPenalty code (#71)
2024-05-28 16:35:11 -07:00
Derek Lewis
6b224fee0c Add llama3 8B instruct model configuration and prompt (#75)
* Add model configuration for Llama 3 8B instruct model w/ prompt

* Correct typo in model configuration name
2024-05-20 08:11:32 -07:00
Sachin Desai
4d20785b5d add support for OpenELM (#63)
* add support for OpenELM
* register model configuration for bootstrap
2024-04-30 09:14:27 -07:00
Awni Hannun
b951b78eb2 phi3 (#54)
* phi3

Co-authored-by: David Koski <dkoski@apple.com>
2024-04-24 09:31:01 -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
Madroid Ma
e876e18605 update qwen2 chat template (#18) 2024-03-07 07:51:54 -08:00
David Koski
dfc9f2fc01 apply swift-format 2024-03-03 18:40:49 -08:00
John Mai
66d9202360 feat: Qwen2 support 2024-03-03 22:26:28 +08:00
David Koski
7b746cb89c allow alternate location for tokenizer 2024-03-01 23:27:03 -08:00
David Koski
ff7a615db7 improve phi prompt -- partial fix for #9 2024-03-01 22:45:01 -08:00
David Koski
c49dd73c28 swift-format, circleci setup 2024-03-01 16:10:34 -08:00
David Koski
b41f14fba7 add LLM evaluator example
- runs on iOS and macOS
- downloads a model / tokenizer from hugging face
- evaluates the given prompt
2024-03-01 16:10:00 -08:00
David Koski
2157333905 swift-format! 2024-03-01 14:47:43 -08:00
David Koski
82f6a969d4 llm improvements
- document the tokenizer used (https://github.com/huggingface/swift-transformers)
- provide a hook for tokenizer configuration, prompt augmentation
	- this isn't as rich as the python equivalents but it helps a little
2024-03-01 14:46:32 -08:00