wyanzhao
22620de3ee
1. Add user warning for sequences over 2048 tokens in iterate_batches. ( #166 )
2023-12-21 06:29:31 -08:00
Daniel Strobusch
43b6522af2
rename --model_path to --model-path ( #151 )
...
use same argument convention for mistral/mixtral as for llama convert.
2023-12-21 06:28:57 -08:00
Deven Mistry
3efb1cc2cc
fix typo in readme ( #163 )
2023-12-20 19:47:41 -08:00
Pedro Cuenca
ce30cc3d8f
Use config.json in llama ( #159 )
...
* Use config.json in llama
* Fix pop
* Fix convert
* Typo
2023-12-20 10:34:44 -08:00
Awni Hannun
27c0a8c002
Add llms subdir + update README ( #145 )
...
* add llms subdir + update README
* nits
* use same pre-commit as mlx
* update readmes a bit
* format
2023-12-20 10:22:25 -08:00
Vaibhav Srivastav
aed14618ca
Add config.json to Mixtral. ( #158 )
...
* Add config.json to Mixtral.
* Update mixtral/mixtral.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
---------
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2023-12-20 09:47:23 -08:00
Pedro Cuenca
730c50d00a
Use config.json, add model_type ( #157 )
...
* Use config.json, add model_type
* Update convert to generate config.json
2023-12-20 08:39:37 -08:00
Vaibhav Srivastav
4b7e11bd31
Add URLs to HF MLX-Community org. ( #153 )
...
* up
* Add ref to MLX org on the README.
* nit: language.
* Standardise org name.
2023-12-20 06:57:13 -08:00
Pedro Cuenca
d8e14c858e
Add --model_path
to phi-2 example script ( #152 )
2023-12-20 06:14:35 -08:00
Sarthak Yadav
b6e62caf2e
Added Keyword Spotting Transformer + SpeechCommands example ( #123 )
...
* Added Keyword Transformer + SpeechCommands
* minor fixes in README
* some updates / simplifications
* nits
* fixed kwt skip connections
* readme + format
* updated acknowledgements
---------
Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-19 14:17:48 -08:00
Juarez Bochi
ebbb7083cc
T5: Change default dtype to bfloat16 ( #147 )
...
* T5: Change default to bfloat16
* Add myself to contributors
* t5: Change convert.py default to float32
2023-12-19 13:44:36 -08:00
Junyi Mei
62b455f801
Add Qwen example ( #134 )
...
* Add qwen model draft
* Add readme and requirements for qwen example
* Add model and tokenizer options
* Fix convert and tokenizer
* some updates / style consistency
* move to llm subdir
* readme nit
---------
Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-19 13:06:19 -08:00
Juarez Bochi
10a7b99e83
Add T5 and Flan-T5 example ( #113 )
...
* Add skeleton
* Load all encoder weights
* Pass config to all modules, fix ln
* Load position bias embeddings
* Load decoder weights
* Move position biases to attention module
* translate pytorch to mx
* Fix default prompt
* Fix relative_attention_max_distance config
* No scaling, no encoder mask
* LM head
* Decode (broken after 1st token)
* Use position bias in all layers
* Utils to compare encoder output
* Fix layer norm
* Fix decoder mask
* Use position bias in decoder
* Concatenate tokens
* Remove prints
* Stop on eos
* Measure tokens/s
* with cache
* bug fix with bidirectional only for encoder, add offset to position bias
* format
* Fix T5.__call__
* Stream output
* Add argument to generate float16 npz
* Load config from HF to support any model
* Uncomment bidirectional param
* Add gitignore
* Add readme.md for t5
* Fix relative position scale
* Fix --encode-only
* Run hf_t5 with any model
* Add hf generation for comparison
* Fix type for attention mask
* Increase hf max_length
* Rescale output before projecting on vocab
* readme updates
* nits
* Pass ln2 to cross attention
* Fix example
* Fix attention for 3b model
* fp16, abstract tokenizer a bit, format
* clamp for low precision
* higher clipping, remove non-helpful casts
* default to fp32 for now
* Adds support for flan-t5
* Update t5 docs on variant support
* readme flan
* nit
---------
Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-18 20:25:34 -08:00
Awni Hannun
1e7f4a5921
fix use for llama 2 from meta ( #144 )
2023-12-18 19:33:17 -08:00
Daniel Strobusch
1d62b3ecc1
Pass few shot file name to --few-shot arg( #141 )
2023-12-18 13:30:04 -08:00
Awni Hannun
517f5808fc
Citation + contributor acknowledgments section ( #136 )
...
* citation + acks section
* nits
2023-12-18 10:12:35 -08:00
Daniel Strobusch
f0e14b6341
fix renamed arg ( #140 )
2023-12-18 10:11:51 -08:00
Awni Hannun
44b546d446
support for tiny llama ( #129 )
2023-12-18 07:47:55 -08:00
Awni Hannun
08e862336a
Rope theta to support Coda Llama ( #121 )
...
* rope theta for llama model
* llama chat/code
* nit
2023-12-15 19:51:51 -08:00
Awni Hannun
db134d976d
Merge pull request #115 from ml-explore/lora_custom
...
Customize dataset with lora
2023-12-15 13:54:58 -08:00
Awni Hannun
8df211869e
minimum version
2023-12-15 13:54:31 -08:00
Pawel Kowalski
fc1495abaa
Stable diffusion - check model weights shape and support int for "attention_head_dim" ( #85 )
...
* Allow integer as attention_head_dim
* Reshape downloaded weights to match model if there is a mismatch
2023-12-15 13:01:02 -08:00
Awni Hannun
86cae9ba57
Merge pull request #116 from idoru/fix-phi-2-temp-arg
...
phi-2: fix --temp/--seed arguments.
2023-12-15 12:29:19 -08:00
Awni Hannun
ff0f172363
32 GB example
2023-12-15 12:20:15 -08:00
Awni Hannun
ee2ee0f8e5
32 GB example
2023-12-15 12:18:29 -08:00
Sam Coward
877f88dfea
Pass along temp argument to generate()
2023-12-15 15:16:41 -05:00
Awni Hannun
8c8f9d6440
keep base weights in fp16
2023-12-15 10:42:18 -08:00
Awni Hannun
84f02ef58b
use lower precision base weights
2023-12-15 10:29:42 -08:00
Awni Hannun
d108c558fc
more nits
2023-12-15 10:06:14 -08:00
Awni Hannun
fa51553f09
fix readme
2023-12-15 09:59:07 -08:00
Awni Hannun
985f413f99
custom data with lora
2023-12-15 09:56:10 -08:00
Awni Hannun
126b99d8be
Merge pull request #112 from ml-explore/fix_mixtral
...
[Bugfix] Fix RoPE base bug in Mixtral example
2023-12-15 08:39:02 -08:00
Awni Hannun
71b40c474c
Merge pull request #108 from devonthomas35/phi2_eos
...
Phi-2: Stop generating at eos token
2023-12-15 07:34:11 -08:00
Awni Hannun
ec11763527
fix RoPE bug + minor updates
2023-12-14 21:45:25 -08:00
devonthomas35
d74d9453dd
Refactor EOS check
2023-12-14 21:11:23 -08:00
Awni Hannun
a3ecda22fe
Merge pull request #107 from ml-explore/hf_mixtral
...
Use official HF for mixtral
2023-12-14 16:57:19 -08:00
Awni Hannun
b863e7cca0
format
2023-12-14 16:56:50 -08:00
devonthomas35
d7d7aabded
Remove unnecessary return
2023-12-14 15:52:22 -08:00
devonthomas35
4549dcbbd0
Stop generating at eos token
2023-12-14 15:50:59 -08:00
Awni Hannun
e434e7e5c2
incude instruct option
2023-12-14 15:40:38 -08:00
Awni Hannun
078fed3d8d
use official HF for mixtral
2023-12-14 15:30:32 -08:00
Awni Hannun
67a208b13e
Merge pull request #106 from fahnub/main
...
minor dependency fix in phi-2
2023-12-14 14:15:19 -08:00
Fahad Nadeem
9b887cef08
minor dep fix in phi
2023-12-15 03:09:33 +05:00
Awni Hannun
09fff84a85
Merge pull request #77 from SarthakYadav/main
...
Added CIFAR-10 + ResNet example
2023-12-14 12:19:40 -08:00
Awni Hannun
b9439ce74e
typo / nits
2023-12-14 12:14:01 -08:00
Awni Hannun
b1b9b11801
updates + format
2023-12-14 12:09:10 -08:00
Awni Hannun
0e88a6afa1
Merge pull request #103 from arpitingle/patch-1
...
added phi in readme
2023-12-14 10:19:40 -08:00
arpit
5b08da2395
Update README.md
2023-12-14 23:40:50 +05:30
Awni Hannun
92efa32060
Merge pull request #97 from jbarrow/main
...
Phi-2
2023-12-14 09:21:26 -08:00
Awni Hannun
8f60d60814
cleanup conversion to use single qkv matrix
2023-12-14 09:19:44 -08:00