Skip to content

Commit 935636d

Browse files
authored
Merge branch 'main' into add-meta-tags
2 parents 6280e14 + 67e0ae9 commit 935636d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

beginner_source/onnx/intro_onnx.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@
3939
4040
- `ONNX <https://onnx.ai>`_ standard library
4141
- `ONNX Script <https://onnxscript.ai>`_ library that enables developers to author ONNX operators,
42-
functions and models using a subset of Python in an expressive, and yet simple fashion.
42+
functions and models using a subset of Python in an expressive, and yet simple fashion
43+
- `ONNX Runtime <https://onnxruntime.ai>`_ accelerated machine learning library.
4344
4445
They can be installed through `pip <https://pypi.org/project/pip/>`_:
4546
4647
.. code-block:: bash
4748
48-
pip install --upgrade onnx onnxscript
49+
pip install --upgrade onnx onnxscript onnxruntime
4950
5051
To validate the installation, run the following commands:
5152

prototype_source/gpu_quantization_torchao_tutorial.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@
3535
#
3636
# Segment Anything Model checkpoint setup:
3737
#
38-
# 1. Go to the `segment-anything repo <checkpoint https://github.com/facebookresearch/segment-anything/tree/main#model-checkpoints>`_ and download the ``vit_h`` checkpoint. Alternatively, you can just use ``wget``: `wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth --directory-prefix=<path>
38+
# 1. Go to the `segment-anything repo checkpoint <https://github.com/facebookresearch/segment-anything/tree/main#model-checkpoints>`_ and download the ``vit_h`` checkpoint. Alternatively, you can use ``wget`` (for example, ``wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth --directory-prefix=<path>``).
3939
# 2. Pass in that directory by editing the code below to say:
4040
#
41-
# .. code-block::
42-
#
43-
# {sam_checkpoint_base_path}=<path>
41+
# .. code-block:: bash
4442
#
45-
# This was run on an A100-PG509-200 power limited to 330.00 W
43+
# {sam_checkpoint_base_path}=<path>
4644
#
4745

4846
import torch
@@ -297,7 +295,7 @@ def get_sam_model(only_one_block=False, batchsize=1):
297295
# -----------------
298296
# In this tutorial, we have learned about the quantization and optimization techniques
299297
# on the example of the segment anything model.
300-
298+
#
301299
# In the end, we achieved a full-model apples to apples quantization speedup
302300
# of about 7.7% on batch size 16 (677.28ms to 729.65ms). We can push this a
303301
# bit further by increasing the batch size and optimizing other parts of

0 commit comments

Comments
 (0)