bofeng huang
41ab0cd055
Fix benchmark ( #200 )
2023-12-28 11:29:39 -08:00
Sunbir Gill
ab576be362
Fix generate example in README ( #197 )
2023-12-27 13:11:10 -08:00
Jiří Moravčík
de759fc6b1
fix: Add numpy to CIFAR's requirements.txt ( #192 )
2023-12-26 15:18:59 -08:00
Sushant
89757a7f8a
Fixed the return type for the __call__ method in Attention ( #190 )
2023-12-26 09:32:43 -08:00
Daniel Strobusch
c63517bbb3
shard llama model after conversion and unshard on loading ( #174 )
2023-12-25 11:19:43 -08:00
Yifan
447abb2b0f
QWEN: Fix unsupported ScalarType BFloat16 ( #187 )
...
Fix unsupported ScalarType BFloat16.
2023-12-25 06:10:01 -08:00
Vidyasagar Bhargava
c190af6dc6
updated README ( #184 )
2023-12-24 06:19:53 -08:00
devonthomas35
efa9837195
Mixtral: Stop at EOS token ( #183 )
...
* Stop at EOS token
* Precommit format files
* Fix precommit hooks
* Fix precommit hooks
2023-12-23 21:25:42 -08:00
Kashif Rasul
909a1e6909
fashion-mnist example ( #180 )
...
* fashion mnist example
* fix from review
2023-12-23 07:34:45 -08:00
Daniel Strobusch
ebadac12e8
use non-zero exit code on error ( #177 )
2023-12-23 07:10:13 -08:00
Daniel Strobusch
5320c4ff1f
fix bad convert parameter ( #178 )
2023-12-23 07:09:49 -08:00
Alvaro Bartolome
88df9691b3
Align CLI args and some smaller fixes ( #167 )
...
* Add `.DS_Store` files to `.gitignore`
* Fix variable naming of `config` in `mixtral/convert.py`
* Align CLI args and minor fixes
* standardize
* one more
---------
Co-authored-by: Awni Hannun <awni@apple.com >
2023-12-22 14:34:32 -08:00
Vaibhav Srivastav
7ca5bd7208
Fix conversion + inference errors. - Mistral ( #176 )
...
* Fix conversion + inference errors.
* wire rope_theta throuugh to nn.RoPE
---------
Co-authored-by: Awni Hannun <awni@apple.com >
2023-12-22 14:10:25 -08:00
Todsaporn Banjerdkit
ce7815b931
feat: add mistral tps ( #173 )
...
* feat: add mistral tps
* eval params before timing + format
---------
Co-authored-by: Awni Hannun <awni@apple.com >
2023-12-22 07:55:57 -08:00
Daniel Strobusch
e7b7c4fa92
fix typo ( #169 )
2023-12-21 14:17:11 -08:00
Awni Hannun
e1d0c254d6
Quantize example ( #162 )
...
* testing quantization
* conversion + quantization working
* one config processor
* quantization in mistral / nits in llama
* args for quantization
* llama / mistral conversion in good shape
* phi2 quantized
* mixtral
* qwen conversion
2023-12-21 12:59:37 -08:00
Juarez Bochi
17d0967617
Add support for byt5 models ( #161 )
...
* Add support for byt5 models
* Remove unused import
2023-12-21 08:46:36 -08:00
Deven Mistry
3914b149a5
update path to load weights ( #164 )
2023-12-21 06:31:17 -08:00
Sarthak Yadav
be121ba181
updated results ( #165 )
2023-12-21 06:30:17 -08:00
wyanzhao
18f0a96cee
1. Add user warning for sequences over 2048 tokens in iterate_batches. ( #166 )
2023-12-21 06:29:31 -08:00
Daniel Strobusch
58f409feb0
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
df44fc5008
fix typo in readme ( #163 )
2023-12-20 19:47:41 -08:00
Pedro Cuenca
6c13c072b2
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
b3f23a7191
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
3c64f1a1dc
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
920bd13668
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
06b7c45c59
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
03720a270e
Add --model_path
to phi-2 example script ( #152 )
2023-12-20 06:14:35 -08:00
Sarthak Yadav
0fb147650f
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
50a703eb3b
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
b439b96aa1
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
b5ff25716f
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
9063f1a1e3
fix use for llama 2 from meta ( #144 )
2023-12-18 19:33:17 -08:00
Daniel Strobusch
60c3bd9bc7
Pass few shot file name to --few-shot arg( #141 )
2023-12-18 13:30:04 -08:00
Awni Hannun
fd00c22224
Citation + contributor acknowledgments section ( #136 )
...
* citation + acks section
* nits
2023-12-18 10:12:35 -08:00
Daniel Strobusch
ca5a8ec273
fix renamed arg ( #140 )
2023-12-18 10:11:51 -08:00
Awni Hannun
17d2efaebe
support for tiny llama ( #129 )
2023-12-18 07:47:55 -08:00
Awni Hannun
6ae68777aa
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
376b273b2f
Merge pull request #115 from ml-explore/lora_custom
...
Customize dataset with lora
2023-12-15 13:54:58 -08:00
Awni Hannun
ad77bc4c3b
minimum version
2023-12-15 13:54:31 -08:00
Pawel Kowalski
4c88163941
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
fc13e96e6c
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
e709b846ff
32 GB example
2023-12-15 12:20:15 -08:00
Awni Hannun
24a6de2acb
32 GB example
2023-12-15 12:18:29 -08:00
Sam Coward
a5bacfd04f
Pass along temp argument to generate()
2023-12-15 15:16:41 -05:00
Awni Hannun
f019d836ee
keep base weights in fp16
2023-12-15 10:42:18 -08:00
Awni Hannun
6dc067d30c
use lower precision base weights
2023-12-15 10:29:42 -08:00
Awni Hannun
4444c7a4a5
more nits
2023-12-15 10:06:14 -08:00
Awni Hannun
c889e09773
fix readme
2023-12-15 09:59:07 -08:00
Awni Hannun
9550e1de17
custom data with lora
2023-12-15 09:56:10 -08:00