Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ onnx-diagnostic: investigate onnx models
.. image:: https://codecov.io/gh/sdpython/onnx-diagnostic/branch/main/graph/badge.svg?token=Wb9ZGDta8J
:target: https://codecov.io/gh/sdpython/onnx-diagnostic

Helps investigating onnx models, exporting modes into onnx.
See `documentation of onnx-diagnostic <https://sdpython.github.io/doc/onnx-diagnostic/dev/>`_.
The main feature is about `patches <https://github.com/sdpython/onnx-diagnostic/tree/main/onnx_diagnostic/torch_export_patches>`_:
it helps exporting **pytorch models into ONNX**, mostly designed for LLMs using dynamic caches.

.. code-block:: python

with bypass_export_some_errors(patch_transformers=True) as f:
ep = torch.export.export(model, args, kwargs=kwargs, dynamic_shapes=dynamic_shapes)
# ...

It also implements tools to investigate, validate exported models (ExportedProgramm, ONNXProgram, ...).
See `documentation of onnx-diagnostic <https://sdpython.github.io/doc/onnx-diagnostic/dev/>`_ and
`bypass_export_some_errors <https://sdpython.github.io/doc/onnx-diagnostic/dev/api/torch_export_patches/index.html#onnx_diagnostic.torch_export_patches.bypass_export_some_errors>`_.

Getting started
+++++++++++++++
Expand Down
16 changes: 12 additions & 4 deletions _doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ onnx-diagnostic: investigate onnx models
.. image:: https://codecov.io/gh/sdpython/onnx-diagnostic/branch/main/graph/badge.svg?token=Wb9ZGDta8J
:target: https://codecov.io/gh/sdpython/onnx-diagnostic

**onnx-diagnostic** helps investigating onnx models, exporting models into onnx.
It implements tools used to understand issues.
The main feature is about `patches <https://github.com/sdpython/onnx-diagnostic/tree/main/onnx_diagnostic/torch_export_patches>`_:
it helps exporting **pytorch models into ONNX**, mostly designed for LLMs using dynamic caches.

Source are `sdpython/onnx-diagnostic
<https://github.com/sdpython/onnx-diagnostic>`_.
.. code-block:: python

with bypass_export_some_errors(patch_transformers=True) as f:
ep = torch.export.export(model, args, kwargs=kwargs, dynamic_shapes=dynamic_shapes)
# ...

It also implements tools to investigate, validate exported models (ExportedProgramm, ONNXProgram, ...).
:func:`onnx_diagnostic.torch_export_patches.bypass_export_some_errors`.

.. toctree::
:maxdepth: 1
Expand Down Expand Up @@ -166,6 +172,8 @@ Size of the package:
Older versions
++++++++++++++

* `0.4.0 <../v0.4.0/index.html>`_
* `0.3.0 <../v0.3.0/index.html>`_
* `0.2.2 <../v0.2.2/index.html>`_
* `0.2.1 <../v0.2.1/index.html>`_
* `0.2.0 <../v0.2.0/index.html>`_
Expand Down
Loading