File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 44Dumps intermediate results of a torch model
55===========================================
66
7-
8- codellama/CodeLlama-7b-Python-hf
9- ++++++++++++++++++++++++++++++++
7+ Looking for discrepancies is quickly annoying. Discrepancies
8+ come from two results obtained with the same models
9+ implemented in two different ways, :epkg:`pytorch` and :epkg:`onnx`.
10+ Models are big so where do they come from? That's the
11+ unavoidable question. Unless there is an obious reason,
12+ the only way is to compare intermediate outputs alon the computation.
13+ The first step into that direction is to dump the intermediate results
14+ coming from :epkg:`pytorch`.
15+ We use :func:`onnx_diagnostic.helpers.torch_helper import steal_forward` for that.
16+
17+ A simple LLM Model
18+ ++++++++++++++++++
19+
20+ See :func:`onnx_diagnostic.helpers.torch_helper.dummy_llm`
21+ for its definition. It is mostly used for unit test or example.
1022
1123"""
1224
8799# | it is possible to call multiple times,
88100# | the model to store more
89101# |
90- # +--> the name given to steal forward
102+ # +--> the name given to function steal_forward
91103#
92104# The same goes for output except ``'I'`` is replaced by ``'O'``.
93105#
You can’t perform that action at this time.
0 commit comments