mlx


Namemlx JSON
Version 0.17.3 PyPI version JSON
download
home_pagehttps://github.com/ml-explore/mlx
SummaryA framework for machine learning on Apple silicon.
upload_time2024-09-12 23:50:42
maintainerNone
docs_urlNone
authorMLX Contributors
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MLX

[**Quickstart**](#quickstart) | [**Installation**](#installation) |
[**Documentation**](https://ml-explore.github.io/mlx/build/html/index.html) |
[**Examples**](#examples) 

[![CircleCI](https://circleci.com/gh/ml-explore/mlx.svg?style=svg)](https://circleci.com/gh/ml-explore/mlx)

MLX is an array framework for machine learning research on Apple silicon,
brought to you by Apple machine learning research.

Some key features of MLX include:

 - **Familiar APIs**: MLX has a Python API that closely follows NumPy.  MLX
   also has fully featured C++, [C](https://github.com/ml-explore/mlx-c), and
   [Swift](https://github.com/ml-explore/mlx-swift/) APIs, which closely mirror
   the Python API.  MLX has higher-level packages like `mlx.nn` and
   `mlx.optimizers` with APIs that closely follow PyTorch to simplify building
   more complex models.

 - **Composable function transformations**: MLX supports composable function
   transformations for automatic differentiation, automatic vectorization,
   and computation graph optimization.

 - **Lazy computation**: Computations in MLX are lazy. Arrays are only
   materialized when needed.

 - **Dynamic graph construction**: Computation graphs in MLX are constructed
   dynamically. Changing the shapes of function arguments does not trigger
   slow compilations, and debugging is simple and intuitive.

 - **Multi-device**: Operations can run on any of the supported devices
   (currently the CPU and the GPU).

 - **Unified memory**: A notable difference from MLX and other frameworks
   is the *unified memory model*. Arrays in MLX live in shared memory.
   Operations on MLX arrays can be performed on any of the supported
   device types without transferring data.

MLX is designed by machine learning researchers for machine learning
researchers. The framework is intended to be user-friendly, but still efficient
to train and deploy models. The design of the framework itself is also
conceptually simple. We intend to make it easy for researchers to extend and
improve MLX with the goal of quickly exploring new ideas. 

The design of MLX is inspired by frameworks like
[NumPy](https://numpy.org/doc/stable/index.html),
[PyTorch](https://pytorch.org/), [Jax](https://github.com/google/jax), and
[ArrayFire](https://arrayfire.org/).

## Examples

The [MLX examples repo](https://github.com/ml-explore/mlx-examples) has a
variety of examples, including:

- [Transformer language model](https://github.com/ml-explore/mlx-examples/tree/main/transformer_lm) training.
- Large-scale text generation with
  [LLaMA](https://github.com/ml-explore/mlx-examples/tree/main/llms/llama) and
  finetuning with [LoRA](https://github.com/ml-explore/mlx-examples/tree/main/lora).
- Generating images with [Stable Diffusion](https://github.com/ml-explore/mlx-examples/tree/main/stable_diffusion).
- Speech recognition with [OpenAI's Whisper](https://github.com/ml-explore/mlx-examples/tree/main/whisper).

## Quickstart

See the [quick start
guide](https://ml-explore.github.io/mlx/build/html/usage/quick_start.html)
in the documentation.

## Installation

MLX is available on [PyPI](https://pypi.org/project/mlx/). To install the Python API, run:

**With `pip`**:

```
pip install mlx
```

**With `conda`**:

```
conda install -c conda-forge mlx
```

Checkout the
[documentation](https://ml-explore.github.io/mlx/build/html/install.html#)
for more information on building the C++ and Python APIs from source.

## Contributing 

Check out the [contribution guidelines](https://github.com/ml-explore/mlx/tree/main/CONTRIBUTING.md) for more information
on contributing to MLX. See the
[docs](https://ml-explore.github.io/mlx/build/html/install.html) for more
information on building from source, and running tests.

We are grateful for all of [our
contributors](https://github.com/ml-explore/mlx/tree/main/ACKNOWLEDGMENTS.md#Individual-Contributors). If you contribute
to MLX and wish to be acknowledged, please add your name to the list in your
pull request.

## Citing MLX

The MLX software suite was initially developed with equal contribution by Awni
Hannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. If you find
MLX useful in your research and wish to cite it, please use the following
BibTex entry:

```
@software{mlx2023,
  author = {Awni Hannun and Jagrit Digani and Angelos Katharopoulos and Ronan Collobert},
  title = {{MLX}: Efficient and flexible machine learning on Apple silicon},
  url = {https://github.com/ml-explore},
  version = {0.0},
  year = {2023},
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ml-explore/mlx",
    "name": "mlx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "MLX Contributors",
    "author_email": "mlx@group.apple.com",
    "download_url": null,
    "platform": null,
    "description": "# MLX\n\n[**Quickstart**](#quickstart) | [**Installation**](#installation) |\n[**Documentation**](https://ml-explore.github.io/mlx/build/html/index.html) |\n[**Examples**](#examples) \n\n[![CircleCI](https://circleci.com/gh/ml-explore/mlx.svg?style=svg)](https://circleci.com/gh/ml-explore/mlx)\n\nMLX is an array framework for machine learning research on Apple silicon,\nbrought to you by Apple machine learning research.\n\nSome key features of MLX include:\n\n - **Familiar APIs**: MLX has a Python API that closely follows NumPy.  MLX\n   also has fully featured C++, [C](https://github.com/ml-explore/mlx-c), and\n   [Swift](https://github.com/ml-explore/mlx-swift/) APIs, which closely mirror\n   the Python API.  MLX has higher-level packages like `mlx.nn` and\n   `mlx.optimizers` with APIs that closely follow PyTorch to simplify building\n   more complex models.\n\n - **Composable function transformations**: MLX supports composable function\n   transformations for automatic differentiation, automatic vectorization,\n   and computation graph optimization.\n\n - **Lazy computation**: Computations in MLX are lazy. Arrays are only\n   materialized when needed.\n\n - **Dynamic graph construction**: Computation graphs in MLX are constructed\n   dynamically. Changing the shapes of function arguments does not trigger\n   slow compilations, and debugging is simple and intuitive.\n\n - **Multi-device**: Operations can run on any of the supported devices\n   (currently the CPU and the GPU).\n\n - **Unified memory**: A notable difference from MLX and other frameworks\n   is the *unified memory model*. Arrays in MLX live in shared memory.\n   Operations on MLX arrays can be performed on any of the supported\n   device types without transferring data.\n\nMLX is designed by machine learning researchers for machine learning\nresearchers. The framework is intended to be user-friendly, but still efficient\nto train and deploy models. The design of the framework itself is also\nconceptually simple. We intend to make it easy for researchers to extend and\nimprove MLX with the goal of quickly exploring new ideas. \n\nThe design of MLX is inspired by frameworks like\n[NumPy](https://numpy.org/doc/stable/index.html),\n[PyTorch](https://pytorch.org/), [Jax](https://github.com/google/jax), and\n[ArrayFire](https://arrayfire.org/).\n\n## Examples\n\nThe [MLX examples repo](https://github.com/ml-explore/mlx-examples) has a\nvariety of examples, including:\n\n- [Transformer language model](https://github.com/ml-explore/mlx-examples/tree/main/transformer_lm) training.\n- Large-scale text generation with\n  [LLaMA](https://github.com/ml-explore/mlx-examples/tree/main/llms/llama) and\n  finetuning with [LoRA](https://github.com/ml-explore/mlx-examples/tree/main/lora).\n- Generating images with [Stable Diffusion](https://github.com/ml-explore/mlx-examples/tree/main/stable_diffusion).\n- Speech recognition with [OpenAI's Whisper](https://github.com/ml-explore/mlx-examples/tree/main/whisper).\n\n## Quickstart\n\nSee the [quick start\nguide](https://ml-explore.github.io/mlx/build/html/usage/quick_start.html)\nin the documentation.\n\n## Installation\n\nMLX is available on [PyPI](https://pypi.org/project/mlx/). To install the Python API, run:\n\n**With `pip`**:\n\n```\npip install mlx\n```\n\n**With `conda`**:\n\n```\nconda install -c conda-forge mlx\n```\n\nCheckout the\n[documentation](https://ml-explore.github.io/mlx/build/html/install.html#)\nfor more information on building the C++ and Python APIs from source.\n\n## Contributing \n\nCheck out the [contribution guidelines](https://github.com/ml-explore/mlx/tree/main/CONTRIBUTING.md) for more information\non contributing to MLX. See the\n[docs](https://ml-explore.github.io/mlx/build/html/install.html) for more\ninformation on building from source, and running tests.\n\nWe are grateful for all of [our\ncontributors](https://github.com/ml-explore/mlx/tree/main/ACKNOWLEDGMENTS.md#Individual-Contributors). If you contribute\nto MLX and wish to be acknowledged, please add your name to the list in your\npull request.\n\n## Citing MLX\n\nThe MLX software suite was initially developed with equal contribution by Awni\nHannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. If you find\nMLX useful in your research and wish to cite it, please use the following\nBibTex entry:\n\n```\n@software{mlx2023,\n  author = {Awni Hannun and Jagrit Digani and Angelos Katharopoulos and Ronan Collobert},\n  title = {{MLX}: Efficient and flexible machine learning on Apple silicon},\n  url = {https://github.com/ml-explore},\n  version = {0.0},\n  year = {2023},\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A framework for machine learning on Apple silicon.",
    "version": "0.17.3",
    "project_urls": {
        "Homepage": "https://github.com/ml-explore/mlx"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1561f4ce5ae8dc037694f494cfd059523f325d2c1314641099f1c5ddd883ee2e",
                "md5": "5755fd17deab5887315974965e6f8906",
                "sha256": "e90c1573b7af61c71a0e4dd9600b732164b46c42d6384df859f5c028b85f448a"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp310-cp310-macosx_13_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "5755fd17deab5887315974965e6f8906",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 22164034,
            "upload_time": "2024-09-12T23:50:42",
            "upload_time_iso_8601": "2024-09-12T23:50:42.388771Z",
            "url": "https://files.pythonhosted.org/packages/15/61/f4ce5ae8dc037694f494cfd059523f325d2c1314641099f1c5ddd883ee2e/mlx-0.17.3-cp310-cp310-macosx_13_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cec5a01341cc693157edd00781f610aa1e902fbd531ebfcec75c68a92a13144b",
                "md5": "13c1aa3717e7c6f3da3c364fe0495804",
                "sha256": "d178dec9b02b8c7d20f631fb4ebddae588244dbc49d8e40398612975a5ec5765"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp310-cp310-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "13c1aa3717e7c6f3da3c364fe0495804",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 21449819,
            "upload_time": "2024-09-12T23:49:33",
            "upload_time_iso_8601": "2024-09-12T23:49:33.725193Z",
            "url": "https://files.pythonhosted.org/packages/ce/c5/a01341cc693157edd00781f610aa1e902fbd531ebfcec75c68a92a13144b/mlx-0.17.3-cp310-cp310-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99e51e8e792790b47f568e85a87601949bb8d2c5c0e5c168b11832bd3bbf987c",
                "md5": "bd35a19aaa56a6a332aba15fbb8fa77c",
                "sha256": "cc9926aa1ae71eaaafdaaf70f039428497b928cbb3642b6d5e66bd717677b626"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp311-cp311-macosx_13_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "bd35a19aaa56a6a332aba15fbb8fa77c",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 22164781,
            "upload_time": "2024-09-12T23:50:42",
            "upload_time_iso_8601": "2024-09-12T23:50:42.243068Z",
            "url": "https://files.pythonhosted.org/packages/99/e5/1e8e792790b47f568e85a87601949bb8d2c5c0e5c168b11832bd3bbf987c/mlx-0.17.3-cp311-cp311-macosx_13_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18f610eabe209741ba828d93a39fdc90a83c50b9d9842fde4fb0cc8ff83df78a",
                "md5": "4a6d7186f91936f131a3d65818d10e07",
                "sha256": "8e4dc58abfbf27a2f7cab63b0a5e9f21ef1014f986b97c0dd222702eaf89401c"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp311-cp311-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "4a6d7186f91936f131a3d65818d10e07",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 21450551,
            "upload_time": "2024-09-12T23:49:41",
            "upload_time_iso_8601": "2024-09-12T23:49:41.603985Z",
            "url": "https://files.pythonhosted.org/packages/18/f6/10eabe209741ba828d93a39fdc90a83c50b9d9842fde4fb0cc8ff83df78a/mlx-0.17.3-cp311-cp311-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d1177a11968fb555847080024537d7efd3af458d306b0c65ed819b037f3cee2",
                "md5": "a5898b81ebee82a8153ecf129d95d0d6",
                "sha256": "e8a52a0be3d9fd35bd3cf26d41edc4fa48640a6cf301e61c8b5eefb6e507c7a2"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp312-cp312-macosx_13_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "a5898b81ebee82a8153ecf129d95d0d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 22165814,
            "upload_time": "2024-09-12T23:49:34",
            "upload_time_iso_8601": "2024-09-12T23:49:34.836852Z",
            "url": "https://files.pythonhosted.org/packages/0d/11/77a11968fb555847080024537d7efd3af458d306b0c65ed819b037f3cee2/mlx-0.17.3-cp312-cp312-macosx_13_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6609276a1d73b908bc9fc88e15049a2949bbbf2b065b3e58ddaf9b284f440ebe",
                "md5": "e65f2c731719159b4d55273886212d28",
                "sha256": "54aa0cada31009ad38d7401ac363774e9e5bbdde828217e45168d8b64c1427b0"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp312-cp312-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "e65f2c731719159b4d55273886212d28",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 21451589,
            "upload_time": "2024-09-12T23:49:22",
            "upload_time_iso_8601": "2024-09-12T23:49:22.326707Z",
            "url": "https://files.pythonhosted.org/packages/66/09/276a1d73b908bc9fc88e15049a2949bbbf2b065b3e58ddaf9b284f440ebe/mlx-0.17.3-cp312-cp312-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b30a0003cbbdb0e6454431902f57100f42cb7d498754eb18a1df91dd6c0390a6",
                "md5": "db352cae8797ba23fbb970a363a8d5e2",
                "sha256": "bf509eff1d4afd291651439e41d4e3944e91baf68a9ca536d38ee3180a69dca8"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp38-cp38-macosx_13_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "db352cae8797ba23fbb970a363a8d5e2",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 22164579,
            "upload_time": "2024-09-12T23:50:40",
            "upload_time_iso_8601": "2024-09-12T23:50:40.557579Z",
            "url": "https://files.pythonhosted.org/packages/b3/0a/0003cbbdb0e6454431902f57100f42cb7d498754eb18a1df91dd6c0390a6/mlx-0.17.3-cp38-cp38-macosx_13_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "692e242a0c4de3065dff07c27aefc092d3794b43d3cfcee34055e70b16f4b649",
                "md5": "e45e72d845d1a5d6ad8dc1a3007c715b",
                "sha256": "f5d3d299ce43ce00a29fccbe22702dd18d1c0a13e2c86aefd00d8290cedb35c4"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp38-cp38-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "e45e72d845d1a5d6ad8dc1a3007c715b",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 21450272,
            "upload_time": "2024-09-12T23:50:45",
            "upload_time_iso_8601": "2024-09-12T23:50:45.128454Z",
            "url": "https://files.pythonhosted.org/packages/69/2e/242a0c4de3065dff07c27aefc092d3794b43d3cfcee34055e70b16f4b649/mlx-0.17.3-cp38-cp38-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de0eec8dd54bc52dd480136962c3cffbd424dfe8d404a844cd44421bb6318ff1",
                "md5": "33ae1a9eededca83026cba55ca42e891",
                "sha256": "7e168557d6cb0ecbdcfddcdc2d9aaf21ecc1e3c56d3ca659c566a1e8f1bb0997"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp39-cp39-macosx_13_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "33ae1a9eededca83026cba55ca42e891",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 22165212,
            "upload_time": "2024-09-12T23:50:55",
            "upload_time_iso_8601": "2024-09-12T23:50:55.012359Z",
            "url": "https://files.pythonhosted.org/packages/de/0e/ec8dd54bc52dd480136962c3cffbd424dfe8d404a844cd44421bb6318ff1/mlx-0.17.3-cp39-cp39-macosx_13_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0c0652a69c0b31dae62a4f464155592ca5d8e8f674209f69ee640d704e6b63a",
                "md5": "d02e71bcca636cc071269ada7ed7bd9e",
                "sha256": "2252897a5210ad4b4fb4a88d5713e324f8daa1437f7655b4e36b4b4c9198455d"
            },
            "downloads": -1,
            "filename": "mlx-0.17.3-cp39-cp39-macosx_14_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "d02e71bcca636cc071269ada7ed7bd9e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 21450911,
            "upload_time": "2024-09-12T23:49:30",
            "upload_time_iso_8601": "2024-09-12T23:49:30.338101Z",
            "url": "https://files.pythonhosted.org/packages/d0/c0/652a69c0b31dae62a4f464155592ca5d8e8f674209f69ee640d704e6b63a/mlx-0.17.3-cp39-cp39-macosx_14_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 23:50:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ml-explore",
    "github_project": "mlx",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "mlx"
}
        
Elapsed time: 0.33960s