Skip to content

Commit 4cdd2e6

Browse files
committed
Update on "[aoti-backend-consolidation 1/3] partitioners"
Differential Revision: [D85700449](https://our.internmc.facebook.com/intern/diff/D85700449/) [ghstack-poisoned]
2 parents 90ad1ca + 4fc63ce commit 4cdd2e6

File tree

9 files changed

+254
-26
lines changed

9 files changed

+254
-26
lines changed

.github/workflows/_unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
id-token: write
3333
contents: read
3434
with:
35-
runner: linux.2xlarge
35+
runner: linux.2xlarge.memory
3636
docker-image: ${{ inputs.docker-image }}
3737
submodules: 'recursive'
3838
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

.github/workflows/cuda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
echo "::endgroup::"
129129
130130
echo "::group::Setup Huggingface"
131-
pip install -U "huggingface_hub[cli]" accelerate
131+
pip install -U "huggingface_hub[cli]<1.0" accelerate
132132
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
133133
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
134134
pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
@@ -208,7 +208,7 @@ jobs:
208208
echo "::endgroup::"
209209
210210
echo "::group::Setup Huggingface"
211-
pip install -U "huggingface_hub[cli]" accelerate
211+
pip install -U "huggingface_hub[cli]<1.0" accelerate
212212
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
213213
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
214214
pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}

.github/workflows/metal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
3131
export-voxtral-metal-artifact:
3232
name: export-voxtral-metal-artifact
33+
# Skip this job if the pull request is from a fork (HuggingFace secrets are not available)
34+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
3335
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
3436
secrets: inherit
3537
with:
@@ -44,7 +46,7 @@ jobs:
4446
set -eux
4547
4648
echo "::group::Setup Huggingface"
47-
${CONDA_RUN} pip install -U "huggingface_hub[cli]" accelerate
49+
${CONDA_RUN} pip install -U "huggingface_hub[cli]<1.0" accelerate
4850
${CONDA_RUN} huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
4951
echo "::endgroup::"
5052

.github/workflows/pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ jobs:
315315
echo "::endgroup::"
316316
317317
echo "::group::Setup Huggingface"
318-
pip install -U "huggingface_hub[cli]" accelerate
318+
pip install -U "huggingface_hub[cli]<1.0" accelerate
319319
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
320320
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
321321
pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
@@ -636,7 +636,7 @@ jobs:
636636
echo "::group::Setup ExecuTorch"
637637
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "cmake"
638638
echo "::endgroup::"
639-
639+
640640
echo "::group::Setup requirements"
641641
# install phi-3-mini requirements
642642
bash examples/models/phi-3-mini/install_requirements.sh

.github/workflows/trunk.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ jobs:
626626
BUILD_TORCHAO_EXPERIMENTAL=1 TORCHAO_BUILD_CPU_AARCH64=1 TORCHAO_BUILD_KLEIDIAI=1 TORCHAO_ENABLE_ARM_NEON_DOT=1 TORCHAO_PARALLEL_BACKEND=OPENMP pip install third-party/ao
627627
fi
628628
629-
pip install -U "huggingface_hub[cli]"
629+
pip install -U "huggingface_hub[cli]<1.0"
630630
631631
bash .ci/scripts/test_torchao_huggingface_checkpoints.sh ${{ matrix.model }} ${{ matrix.model != 'phi_4_mini' && '--test_with_runner' || '' }} ${{ matrix.backend == 'torchao' && '--use_torchao_kernels' || '' }}
632632
@@ -659,7 +659,7 @@ jobs:
659659
echo "::endgroup::"
660660
661661
echo "::group::Set up Huggingface"
662-
${CONDA_RUN} pip install -U "huggingface_hub[cli]" accelerate
662+
${CONDA_RUN} pip install -U "huggingface_hub[cli]<1.0" accelerate
663663
${CONDA_RUN} huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
664664
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
665665
${CONDA_RUN} pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
@@ -834,7 +834,7 @@ jobs:
834834
echo "::endgroup::"
835835
836836
echo "::group::Setup Huggingface"
837-
pip install -U "huggingface_hub[cli]" accelerate
837+
pip install -U "huggingface_hub[cli]<1.0" accelerate
838838
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
839839
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
840840
pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
@@ -930,7 +930,7 @@ jobs:
930930
echo "::endgroup::"
931931
932932
echo "::group::Set up Huggingface"
933-
${CONDA_RUN} pip install -U "huggingface_hub[cli]" accelerate
933+
${CONDA_RUN} pip install -U "huggingface_hub[cli]<1.0" accelerate
934934
${CONDA_RUN} huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
935935
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
936936
${CONDA_RUN} pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}

docs/source/llm/export-llm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The up-to-date list of supported LLMs can be found in the code [here](https://gi
2626
`export_llm` is ExecuTorch's high-level export API for LLMs. In this tutorial, we will focus on exporting Llama 3.2 1B using this API. `export_llm`'s arguments are specified either through CLI args or through a yaml configuration whose fields are defined in [`LlmConfig`](https://github.com/pytorch/executorch/blob/main/extension/llm/export/config/llm_config.py). To call `export_llm`:
2727

2828
```
29-
python -m executorch.examples.extension.llm.export.export_llm
29+
python -m executorch.extension.llm.export.export_llm
3030
--config <path-to-config-yaml>
3131
+base.<additional-CLI-overrides>
3232
```

examples/models/voxtral/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Add the `--data_path` argument to provide the appropriate data blob to the comma
198198
- For CUDA: `--data_path path/to/aoti_cuda_blob.ptd`
199199
- For Metal: `--data_path path/to/aoti_metal_blob.ptd`
200200

201-
# Example output:
201+
### Example output:
202202
```
203203
The speaker in this audio seems to be talking about their concerns about a device called the model or maybe they're just talking about the model in general. They mention that the model was trained with the speaker for inference, which suggests that
204204
the model was trained based on the speaker's data or instructions. They also mention that the volume is quite small, which could imply that the speaker is trying to control the volume of the model's output, likely because they are concerned about how loud the model's responses might
@@ -212,7 +212,7 @@ I 00:00:24.036822 executorch:stats.h:147] Time to first generated token:
212212
I 00:00:24.036828 executorch:stats.h:153] Sampling time over 487 tokens: 0.099000 (seconds)
213213
```
214214

215-
# Generating audio input
215+
## Generating audio input
216216
You can easily produce an `.bin` for the audio input in Python like this:
217217
```
218218
# t = some torch.Tensor
@@ -235,3 +235,7 @@ say -o call_samantha_hall.aiff "Call Samantha Hall"
235235
# Convert to .wav format
236236
afconvert -f WAVE -d LEI16 call_samantha_hall.aiff call_samantha_hall.wav
237237
```
238+
239+
## Android and iOS mobile demo apps
240+
241+
We have example mobile demo apps for Android and iOS (using XNNPACK) [here](https://github.com/meta-pytorch/executorch-examples/tree/main/llm)

website/index.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html lang="en">
44
<head>
55
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
77
<title>ExecuTorch - On-Device AI Inference Powered by PyTorch</title>
88
<meta name="description" content="ExecuTorch is PyTorch's unified solution for deploying AI models on-device—from smartphones to microcontrollers. Deploy LLMs, vision, speech, and multimodal models with the same PyTorch APIs.">
99
<link rel="icon" type="image/svg+xml" href="https://raw.githubusercontent.com/dbort/executorch-logos/main/img/executorch-chip-logo.svg">
@@ -29,17 +29,18 @@
2929
<img src="https://raw.githubusercontent.com/dbort/executorch-logos/main/img/executorch-chip-logo.svg" alt="ExecuTorch Logo" height="40">
3030
<span style="color:#e0f2fe;">ExecuTorch</span>
3131
</div>
32-
<ul class="nav-links">
32+
<ul class="nav-links" id="navLinks">
3333
<li><a href="#why-ondevice">Why On-Device</a></li>
3434
<li><a href="#challenges">Challenges</a></li>
3535
<li><a href="#features">Solution</a></li>
36-
<li><a href="#performance">Performance</a></li>
36+
<li><a href="#performance">Backends</a></li>
3737
<li><a href="#partners">Partners</a></li>
3838
<li><a href="https://github.com/pytorch/executorch" target="_blank">GitHub</a></li>
3939
</ul>
4040
<form class="nav-search" action="https://docs.pytorch.org/executorch/1.0/search.html" method="get">
4141
<input type="text" placeholder="Search docs…" name="q" style="padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid #e2e8f0;">
4242
</form>
43+
<button class="nav-toggle" onclick="toggleNav()" aria-label="Toggle navigation"></button>
4344
</div>
4445
</div>
4546
</nav>
@@ -1055,13 +1056,19 @@ <h2 class="cta-title">Ready to Deploy AI at the Edge?</h2>
10551056
navLinks.classList.toggle('open');
10561057
}
10571058

1058-
// Highlight active nav link on click
1059+
// Highlight active nav link on click and close menu on mobile
10591060
document.querySelectorAll('.nav-links a').forEach(function(link) {
10601061
link.addEventListener('click', function() {
10611062
document.querySelectorAll('.nav-links a').forEach(function(l) {
10621063
l.classList.remove('active');
10631064
});
10641065
this.classList.add('active');
1066+
1067+
// Close mobile menu when clicking a link
1068+
var navLinks = document.getElementById('navLinks');
1069+
if (navLinks.classList.contains('open')) {
1070+
navLinks.classList.remove('open');
1071+
}
10651072
});
10661073
});
10671074
</script>

0 commit comments

Comments
 (0)