19 Commits
Author SHA1 Message Date
David KoskiandGitHub 7957378077 pin gzip dependency (#87)
- later versions have compile issues: https://github.com/1024jp/GzipSwift/issues/65

fixes: https://github.com/ml-explore/mlx-swift-examples/issues/85
2024-06-27 13:48:11 -07:00
David KoskiandGitHub 61c0703c91 switch to tags where possible (#80) 2024-06-10 15:44:36 -07:00
David KoskiandGitHub 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
David KoskiandGitHub e5ea144fe3 update deps (#67) 2024-05-08 12:00:31 -07:00
David KoskiandGitHub dfd79d0542 try to fix #59 and #57 (#60) 2024-04-26 00:09:22 -07:00
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
David KoskiandGitHub 96b94b0df6 prepare for lora branch (#47)
- remove async llm generation -- this is just doubling our work
	- and does not match the style used in the example applications
- package generation parameters into a struct
- refactor command line arguments into distinct pieces based on their use
	- this will be reusable in the lora commands
2024-04-10 10:56:18 -07:00
David KoskiandGitHub cedf73421f make it _much_ easier to run command line tools from the command line (#49) 2024-04-09 12:23:42 -07:00
0199407d93 LLMEval performance (#40)
* notes about performance and some performance improvements (don't update the display for every token)

* swift-format

* Update Applications/LLMEval/README.md

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

* Update Applications/LLMEval/README.md

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>

---------

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
2024-03-28 12:00:52 -07:00
David KoskiandGitHub 452b49aef0 fixed height for the progress view, produce more tokens (#33) 2024-03-19 08:56:37 -07:00
David KoskiandGitHub 857a10de91 make the mnist app/library targets match each other (#32)
* make the mnist app/library targets match each other
* switch mnist tool to 14.2 as well
2024-03-19 08:56:22 -07:00
David KoskiandGitHub 0af2efe8a0 switch swift-tokenizers to main, remove some workarounds (#26)
* switch swift-tokenizers to main, remove some workarounds

- swift-tokenizers is getting a lot of updates and fixes, let's track main for now
- remove some workarounds that are no longer needed

- https://github.com/huggingface/swift-transformers/issues/63
2024-03-14 13:18:57 -07:00
David KoskiandGitHub ac273a14ea fix float types in Phi (use float16) (#25)
- per suggestions in #23 ensure that the values that go into the cache are float16
2024-03-14 13:18:40 -07:00
David KoskiandGitHub a1431e7155 scroll to bottom when text is generated (#24)
- also restore circleci
2024-03-14 13:18:28 -07:00
David KoskiandGitHub 0fb74cbfdc adopt MLXFast.scaledDotProductAttention (#23) 2024-03-12 14:04:43 -07:00
David KoskiandGitHub 61105bf0c4 use memory limit API (#13)
* add buffer cache limit

* swift-format

* a more reasonable size

* add memory stats to command line tool, update to final api

* add note about changing models
2024-03-05 15:22:12 -08:00
David KoskiandGitHub 430b464c8d pick up ios build fix (#15) 2024-03-04 20:26:37 -08:00
David KoskiandGitHub 0f454999a4 Merge pull request #11 from maiqingqiang/feat-qwen2
feat: Qwen2 support
2024-03-03 18:37:29 -08:00
David KoskiandGitHub 599661774a Merge pull request #6 from rudro/rudro_fixmain
Fix position of @main annotation
2024-02-27 13:32:39 -08:00