From 12ea863643fc34242c86d2da343cfe976a3cc6e2 Mon Sep 17 00:00:00 2001 From: Jack Zhang <32371937+jackzhxng@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:13:38 -0800 Subject: [PATCH] Update README and fix deps --- README.md | 43 +++++++++++++++++++++---------------------- pyproject.toml | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index b2a5112..5d4ff28 100644 --- a/README.md +++ b/README.md @@ -20,32 +20,27 @@ Optimum ExecuTorch enables efficient deployment of transformer models using Meta ## ⚡ Quick Installation -### 1. Create a virtual environment -Install [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) on your machine. Then, create a virtual environment to manage our dependencies. -``` -conda create -n optimum-executorch python=3.11 -conda activate optimum-executorch -``` - -### 2. Install optimum-executorch from source -``` -git clone https://github.com/huggingface/optimum-executorch.git -cd optimum-executorch -pip install '.[dev]' +To install the latest stable version: +```bash +pip install optimum-executorch ``` -- 🔜 Install from pypi coming soon... +
+ Other installation options -### 3. Install dependencies in dev mode - -To access every available optimization and experiment with the newest features, run: -``` -python install_dev.py -``` + ``` + # Install from source for development in editable mode + pip install -e '.[dev]' -This script will install `executorch`, `torch`, `torchao`, `transformers`, etc. from nightly builds or from source to access the latest models and optimizations. + # Install from source, using the most recent nightly Torch and Transformers dependencies. + # When a new model is released and enabled on Optimum ExecuTorch, it will usually first be + # available here as it will require installing recent Transformers from source. + python install_dev.py -To leave an existing ExecuTorch installation untouched, run `install_dev.py` with `--skip_override_torch` to prevent it from being overwritten. + # Leave existing ExecuTorch installation and other torch dependencies untouched. + python install_dev.py --skip_override_torch + ``` +
## 🎯 Quick Start @@ -127,7 +122,11 @@ Optimum transformer models utilize: - A **custom KV cache** that uses a custom op for efficient in-place cache update on CPU, boosting performance by **2.5x** compared to default static KV cache. ### Backends Delegation -Currently, **Optimum-ExecuTorch** supports the [XNNPACK Backend](https://pytorch.org/executorch/main/backends-xnnpack.html) for CPU and [CoreML Backend](https://docs.pytorch.org/executorch/stable/backends-coreml.html) for GPU on Apple devices. +Currently, **Optimum-ExecuTorch** supports the following backends: +- [XNNPACK](https://pytorch.org/executorch/main/backends-xnnpack.html) - this is the most supported backend and will work with all models. +- [CoreML](https://docs.pytorch.org/executorch/stable/backends-coreml.html) +- Cuda +- [Metal](https://docs.pytorch.org/executorch/stable/backends/mps/mps-overview.html) - current only available with `executorch >= 1.1.0.dev20251017`. Please separately install this nightly to use the Metal backend. For a comprehensive overview of all backends supported by ExecuTorch, please refer to the [ExecuTorch Backend Overview](https://pytorch.org/executorch/main/backends-overview.html). diff --git a/pyproject.toml b/pyproject.toml index d83f191..b75083a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,6 @@ dependencies = [ "executorch>=1.0.0", "transformers==4.56.1", "pytorch-tokenizers>=1.0.1", - "accelerate>=0.26.0", ] [project.optional-dependencies] @@ -46,6 +45,7 @@ dev = [ "tiktoken", "black~=23.1", "ruff==0.4.4", + "mistral-common", ] [project.urls]