Skip to content

Commit e8e93ba

Browse files
committed
[quant][2.1] fix formatting for the tutorial
Summary: . Test Plan: visual inspection of generated docs Reviewers: Subscribers: Tasks: Tags:
1 parent 646c8b6 commit e8e93ba

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

prototype_source/pt2e_quant_ptq_static.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,23 @@ this flow is expected to have significantly higher model coverage
1010
(`88% on 14K models <https://github.com/pytorch/pytorch/issues/93667#issuecomment-1601171596>`_),
1111
better programmability, and a simplified UX.
1212

13-
Exportable by `torch._export.export` is a prerequisite to use the flow, you can
13+
Exportable by `torch.export.export` is a prerequisite to use the flow, you can
1414
find what are the constructs that's supported in `Export DB <https://pytorch.org/docs/main/generated/exportdb/index.html>`_.
1515

1616
The high level architecture of quantization 2.0 with quantizer could look like
1717
this:
1818

1919
::
2020

21-
float_model(Python) Input
21+
float_model(Python) Example Input
2222
\ /
2323
\ /
2424
—-------------------------------------------------------
25-
| Export |
25+
| export |
2626
—-------------------------------------------------------
2727
|
28-
FX Graph in ATen XNNPACKQuantizer,
29-
| or X86InductorQuantizer,
30-
| or <Other Backend Quantizer>
31-
| /
28+
FX Graph in ATen Backend Specific Quantizer
29+
| /
3230
—--------------------------------------------------------
3331
| prepare_pt2e |
3432
—--------------------------------------------------------
@@ -441,8 +439,7 @@ we offer in the long term might change based on feedback from PyTorch users.
441439

442440
* Q/DQ Representation (default)
443441

444-
Previous documentation for `representations <https://github.com/pytorch/rfcs/blob/master/RFC-0019-
445-
Extending-PyTorch-Quantization-to-Custom-Backends.md>`_ all quantized operators are represented as ``dequantize -> fp32_op -> qauntize``.
442+
Previous documentation for `representations <https://github.com/pytorch/rfcs/blob/master/RFC-0019-Extending-PyTorch-Quantization-to-Custom-Backends.md>`_ all quantized operators are represented as ``dequantize -> fp32_op -> qauntize``.
446443

447444
.. code-block:: python
448445
@@ -457,7 +454,9 @@ we offer in the long term might change based on feedback from PyTorch users.
457454
out_fp32, out_scale, out_zero_point, out_quant_min, out_quant_max, torch.int8)
458455
return out_i8
459456
460-
* Reference Quantized Model Representation (WIP, expected to be ready at end of August): we have special representation for selected ops (for example, quantized linear), other ops are represented as (``dq -> float32_op -> q``), and ``q/dq`` are decomposed into more primitive operators.
457+
* Reference Quantized Model Representation (available in nightlies)
458+
459+
We will have special representation for selected ops (for example, quantized linear), other ops are represented as (``dq -> float32_op -> q``), and ``q/dq`` are decomposed into more primitive operators.
461460

462461
You can get this representation by using ``convert_pt2e(..., use_reference_representation=True)``.
463462

@@ -515,7 +514,7 @@ Now we can compare the size and model accuracy with baseline model.
515514
If you want to get better accuracy or performance, try configuring
516515
``quantizer`` in different ways, and each ``quantizer`` will have its own way
517516
of configuration, so please consult the documentation for the
518-
quantization you are using to learn more about how you can have more control
517+
quantizer you are using to learn more about how you can have more control
519518
over how to quantize a model.
520519

521520
Save and Load Quantized Model

0 commit comments

Comments
 (0)