Skip to content

Commit a861294

Browse files
authored
Install torchao by default (#7470)
Summary: Now that torchao is not experimental anymore, we can rely on torchao directly via git submodule. Part of #7460
1 parent 3ef78ee commit a861294

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

examples/models/llama/install_requirements.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
# Install sentencepiece for llama tokenizer
1010
pip install snakeviz sentencepiece
1111

12-
# Install torchao.
13-
pip install "$(dirname "$0")/../../../third-party/ao"
14-
1512
# Install lm-eval for Model Evaluation with lm-evalution-harness
1613
# Install tiktoken for tokenizer
1714
pip install lm_eval==0.4.5

examples/models/llama3_2_vision/install_requirements.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ NIGHTLY_VERSION="dev20241112"
99

1010
# Install torchtune nightly for model definitions.
1111
pip install --pre torchtune==0.4.0.${NIGHTLY_VERSION} --extra-index-url https://download.pytorch.org/whl/nightly/cpu --no-cache-dir
12-
13-
# Install torchao.
14-
pip install "$(dirname "$0")/../../../third-party/ao"

examples/models/phi-3-mini-lora/install_requirements.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@
88
pip install torchvision
99
pip install torchtune
1010
pip install tiktoken
11-
12-
# Install torchao.
13-
pip install "$(dirname "$0")/../../../third-party/ao"

install_requirements.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,23 @@ def python_is_compatible():
170170
check=True,
171171
)
172172

173+
LOCAL_REQUIREMENTS = [
174+
"third-party/ao", # We need the latest kernels for fast iteration, so not relying on pypi.
175+
]
176+
177+
# Install packages directly from local copy instead of pypi.
178+
# This is usually not recommended.
179+
subprocess.run(
180+
[
181+
sys.executable,
182+
"-m",
183+
"pip",
184+
"install",
185+
*LOCAL_REQUIREMENTS,
186+
],
187+
check=True,
188+
)
189+
173190
#
174191
# Install executorch pip package. This also makes `flatc` available on the path.
175192
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a

0 commit comments

Comments
 (0)