Commit Graph

171 Commits

Author SHA1 Message Date
Josh Soref
a14e19704f spelling: destination
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
61aa86623c spelling: dependency
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
c249816488 spelling: default
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
8cae2e18f4 spelling: declaration
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
b647328f9e spelling: corresponding
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
e34205b9cc spelling: correctly
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
30e9fdcf74 spelling: conversions
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
0f34dc11af spelling: constructing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
956cac58fc spelling: consider
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
2a5a690b92 spelling: computation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
d26e758aa0 spelling: committing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
272f6952ba spelling: combinations
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
76ac49cac3 spelling: collision
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
35c5530ea1 spelling: coefficients
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
d81a841ae8 spelling: class
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
edc830dcd3 spelling: buffer
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
16046082f6 spelling: broadcast
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
94f71e5832 spelling: bounds
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
c8c2d6c4de spelling: bfloat
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
acde6e476a spelling: basically
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
9ad62ea6a0 spelling: axes
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
f28bcda866 spelling: available
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
5097cd7bca spelling: at least
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
27f640e7c9 spelling: array
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 23:06:40 -05:00
Josh Soref
7057f13b5f spelling: among
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 22:38:57 -05:00
Josh Soref
33be1a27af spelling: against
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 22:38:57 -05:00
Josh Soref
b698ce39f7 spelling: additional
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 22:38:57 -05:00
Josh Soref
73272bb87d spelling: across
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 22:38:57 -05:00
Josh Soref
647f80d09c spelling: accumulates
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-01-01 22:38:57 -05:00
mutexuan
350095ce6e
fix type cast error in item() for bfloat16 (#339)
Co-authored-by: xuan <xuan@apple.com>
2024-01-01 19:02:04 -08:00
Nripesh Niketan
e09bf35b28
feat: Add Dropout3d layer to nn.layers (#313)
* feat: Add Dropout3d layer to nn.layers

* acknowledgement

* Add dropout tests to test_nn.py

* run pre-commit

* Add activation functions and dropout3d ops

* Add dropout tests for bfloat16 and float16
2023-12-31 14:01:21 -08:00
Daniel Strobusch
99c20f523e
fix typos (#327) 2023-12-31 06:06:47 -08:00
Hazem Essam
e3b8da2a49
Added implementation for Scaled RoPE. (#261)
* Added scale for RoPE

* Ran pre-commit

* Added RoPE scaling test

* Added docstring for scale parameter

* Modified docstrings
2023-12-31 06:06:01 -08:00
Angelos Katharopoulos
a020a2d49d
Improve repeat using broadcasting and reshape (#318) 2023-12-29 21:40:20 -08:00
Nripesh Niketan
930b159885
Fix: typo in README.md (#316) 2023-12-29 12:58:00 -08:00
Nripesh Niketan
5ad8fb7268
feat: add softsign, softmax, hardswish, logsoftmax activation function (#309)
* feat: add softsign activation function

* run pre-commit

* Add Softsign activation function

* Add Softsign activation function

* Add documentation for ReLU6, Softplus, and Softsign activations

* Update activation functions in neural network layers

* Add LogSoftmax and Hardswish activations

* run pre-commit

* Update activations.py

* Added acknowledgements

* Fix activation function comments

* Fix activation functions in neural network layers
2023-12-29 11:49:36 -08:00
Chunyang Wen
2aedf3e791
Minor refactor for tree_map and tree_unflatten (#311)
* Minor refact for tree_map and tree_unflatten

* Remove the if statement

---------

Co-authored-by: Chunyang Wen <chunyang_wen@apple.com>
2023-12-28 20:55:10 -08:00
Chunyang Wen
473b6b43b4
Use defaultdict (#307)
Co-authored-by: Chunyang Wen <chunyang_wen@apple.com>
2023-12-28 14:46:13 -08:00
Angelos Katharopoulos
d29770eeaa
Update batchnorm to have the running stats in parameters (#305) 2023-12-28 14:31:10 -08:00
Chunyang Wen
040c3bafab
Add missing f str (#306)
Co-authored-by: Chunyang Wen <chunyang_wen@apple.com>
2023-12-28 06:09:34 -08:00
Chunyang Wen
05767b026f
Add information for dropout probability (#304)
Co-authored-by: Chunyang Wen <chunyang_wen@apple.com>
2023-12-27 21:51:30 -08:00
Diogo
a83d5d60bd
Addition in acknowledgements (#302) 2023-12-27 13:46:47 -08:00
Bahaa
ff2b58e299
Add support for repeat (#278)
* add repeat function

* fix styling

* optimizing repeat

* fixed minor issues

* not sure why that folder is there xD

* fixed now for sure

* test repeat not repeat test

* Fixed

---------

Co-authored-by: Bahaa Eddin tabbakha <bahaa@Bahaas-MacBook-Pro.local>
2023-12-27 13:11:38 -08:00
YUN, Junwoo
4417e37ede
Transformer fix (#167)
* add transformer with dropout, fix transformer ffm, layernorm order

* precommit changes

* precommit changes

* add docstring, activation, norm_first

* run precommit

* run precommit

* add doctstring

* precommit

* style nits in docs

---------

Co-authored-by: junwoo-yun <junwoo.yun@bagelcode.com>
Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-27 08:48:36 -08:00
Angelos Katharopoulos
79c95b6919
Fix load compilation (#298) 2023-12-27 06:20:45 -08:00
Diogo
1f6ab6a556
Safetensor support (#215)
Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-27 02:06:55 -08:00
Gabrijel Boduljak
6b0d30bb85
linalg.norm (#187)
* implemented vector_norm in cpp

added linalg to mlx

* implemented vector_norm python binding

* renamed vector_norm to norm, implemented norm without provided ord

* completed the implementation of the norm

* added tests

* removed unused import in linalg.cpp

* updated python bindings

* added some tests for python bindings

* handling inf, -inf as numpy does, more extensive tests of compatibility with numpy

* added better docs and examples

* refactored mlx.linalg.norm bindings

* reused existing util for implementation of linalg.norm

* more tests

* fixed a bug with no ord and axis provided

* removed unused imports

* some style and API consistency updates to linalg norm

* remove unused includes

* fix python tests

* fixed a bug with frobenius norm of a complex-valued matrix

* complex for vector too

---------

Co-authored-by: Awni Hannun <awni@apple.com>
2023-12-26 19:42:04 -08:00
Angelos Katharopoulos
447bc089b9
Fix tolerance in de-/quantization test (#295) 2023-12-26 19:21:05 -08:00
Yutaka Kondo
fc4e5b476b
Fix llama link in README.md (#289) 2023-12-25 20:53:20 -08:00
Daniel Strobusch
d58ac083f3
expose itemsize and nbytes as for numpy arrays (#284)
see:
  * https://numpy.org/doc/stable/reference/generated/numpy.ndarray.nbytes.html
  * https://numpy.org/doc/stable/reference/generated/numpy.ndarray.itemsize.html

relates to https://github.com/ml-explore/mlx-examples/pull/174
2023-12-25 10:34:28 -08:00