Skip to content

Commit 61c3a3e

Browse files
authored
Fix broken torchao documentation links (pytorch#21547)
### Problem Several documentation pages link to torchao URLs that are dead. Two of them are subtle: the URL returns HTTP 200, but the page is a stub whose only content is a meta-refresh redirect back to a 404. So a status-code check passes while a human clicking the link still lands on a 404. ### Fix Point each link at the page that actually serves the content. The pt2e tutorials now live under `pt2e_quantization/`, which is the path this repo already uses in `arm-vgf-overview.md`, `nxp-quantization.md`, and `quantization-overview.md`, so this also makes the links consistent. | Old | New | |---|---| | `ao/main/tutorials_source/pt2e_quant_ptq.html` | `ao/main/pt2e_quantization/pt2e_quant_ptq.html` | | `ao/main/tutorials_source/pt2e_quant_qat.html` | `ao/main/pt2e_quantization/pt2e_quant_qat.html` | | `ao/main/serving.html#mobile-deployment-with-executorch` | `ao/main/eager_tutorials/serving.html#mobile-deployment-with-executorch` | | `ao/stable/generated/torchao.quantization.quantize_.html` | `ao/stable/api_reference/generated/torchao.quantization.quantize_.html` | The last one now goes to the specific `quantize_` API page rather than the general quantization index. ### Verification Each target was fetched and confirmed to render the expected page, following both HTTP redirects and html meta-refresh, rather than only checking the status code. The `#mobile-deployment-with-executorch` anchor was confirmed present in the served page. ### Files xnnpack, samsung, coreml and arm-ethos-u quantization docs, the LLM export guide, and the Arm Ethos-U docgen template. 11 links total. The docgen template and its generated page are kept in sync. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani
1 parent e3571c2 commit 61c3a3e

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎backends/arm/scripts/docgen/ethos-u/backends-arm-ethos-u-overview.md.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ See [Partitioner API](arm-ethos-u-partitioner.md) for more information of the Pa
4848
## Quantization
4949

5050
Since the Ethos-U backend is integer-only, all operators intended be executed on the NPU needs to be quantized. The Ethos-U quantizer supports
51-
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html) and
52-
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_qat.html) quantization.
51+
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html) and
52+
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_qat.html) quantization.
5353

5454
For more information on quantization, see [Quantization](arm-ethos-u-quantization.md) <!-- @lint-ignore -->
5555

‎docs/source/backends/arm-ethos-u/arm-ethos-u-overview.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ See [Partitioner API](arm-ethos-u-partitioner.md) for more information of the Pa
102102
## Quantization
103103

104104
Since the Ethos-U backend is integer-only, all operators intended be executed on the NPU needs to be quantized. The Ethos-U quantizer supports
105-
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html) and
106-
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_qat.html) quantization.
105+
[Post Training Quantization (PT2E)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html) and
106+
[Quantization-Aware Training (QAT)](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_qat.html) quantization.
107107

108108
For more information on quantization, see [Quantization](arm-ethos-u-quantization.md) <!-- @lint-ignore -->
109109

‎docs/source/backends/coreml/coreml-quantization.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ quantizer = CoreMLQuantizer(weight_only_8bit_config)
9797

9898
Quantizing activations requires calibrating the model on representative data. Also note that PT2E currently requires passing at least 1 calibration sample before calling `convert_pt2e`, even for data-free weight-only quantization.
9999

100-
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html) for more information.
100+
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html) for more information.
101101

102102
### LLM quantization with quantize_
103103

‎docs/source/backends/samsung/samsung-quantization.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ et_program = to_edge_transform_and_lower( # (6)
5656
).to_executorch()
5757
```
5858

59-
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html)
59+
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html)
6060
for more information.

‎docs/source/backends/xnnpack/xnnpack-quantization.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ XNNPACK, `get_transform_passes()` is recommended in general because it runs
6262
pre-partition graph transforms that expose supported patterns to the
6363
partitioner.
6464

65-
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html) for more information.
65+
See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html) for more information.
6666

6767
### LLM quantization with quantize_
6868

@@ -71,7 +71,7 @@ The XNNPACK backend also supports quantizing models with the [torchao](https://g
7171
* Quantize embeddings with `IntxWeightOnlyConfig` (with weight_dtype torch.int2, torch.int4, or torch.int8, using PerGroup or PerAxis granularity)
7272
* Quantize linear layers with 4 bit weight and 8bit dynamic activation, use `Int8DynamicActivationIntxWeightConfig` (with weight_dtype=torch.int4, using PerGroup or PerAxis granularity)
7373

74-
Below is a simple example, but a more detailed tutorial including accuracy evaluation on popular LLM benchmarks can be found in the [torchao documentation](https://docs.pytorch.org/ao/main/serving.html#mobile-deployment-with-executorch).
74+
Below is a simple example, but a more detailed tutorial including accuracy evaluation on popular LLM benchmarks can be found in the [torchao documentation](https://docs.pytorch.org/ao/main/eager_tutorials/serving.html#mobile-deployment-with-executorch).
7575

7676
```python
7777
from torchao.quantization.granularity import PerGroup, PerAxis

‎docs/source/llm/export-llm.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ python -m extension.llm.export.export_llm \
8484

8585
## Quantization
8686
Quantization options are defined by [`QuantizationConfig`](https://github.com/pytorch/executorch/blob/main/extension/llm/export/config/llm_config.py#L283). ExecuTorch does quantization in two ways:
87-
1. TorchAO [`quantize_`](https://docs.pytorch.org/ao/stable/generated/torchao.quantization.quantize_.html) API
88-
2. [pt2e quantization](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html)
87+
1. TorchAO [`quantize_`](https://docs.pytorch.org/ao/stable/api_reference/generated/torchao.quantization.quantize_.html) API
88+
2. [pt2e quantization](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html)
8989

9090
### TorchAO (XNNPACK)
9191
TorchAO quantizes at the source code level, swapping out Linear modules for QuantizedLinear modules.
@@ -127,7 +127,7 @@ python -m extension.llm.export.export_llm \
127127
### pt2e (QNN, CoreML, and Vulkan)
128128
pt2e quantizes at the post-export graph level, swapping nodes and injecting quant/dequant nodes.
129129
**To quantize on non-CPU backends (QNN, CoreML, Vulkan), this is the quantization path to follow.**
130-
Read more about pt2e [here](https://docs.pytorch.org/ao/main/tutorials_source/pt2e_quant_ptq.html), and how ExecuTorch uses pt2e [here](https://github.com/pytorch/executorch/blob/main/docs/source/quantization-overview.md).
130+
Read more about pt2e [here](https://docs.pytorch.org/ao/main/pt2e_quantization/pt2e_quant_ptq.html), and how ExecuTorch uses pt2e [here](https://github.com/pytorch/executorch/blob/main/docs/source/quantization-overview.md).
131131

132132
*CoreML and Vulkan support for export_llm is currently experimental and limited. To read more about QNN export, please read [Running on Android (Qualcomm)](build-run-llama3-qualcomm-ai-engine-direct-backend.md).*
133133

0 commit comments

Comments
 (0)