Skip to content

Commit 28e4851

Browse files
committed
documentation
1 parent 3352388 commit 28e4851

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

_doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
("py:class", "torch.utils._pytree.Context"),
116116
("py:class", "torch.utils._pytree.KeyEntry"),
117117
("py:class", "torch.utils._pytree.TreeSpec"),
118+
("py:class", "transformers.GenerationMixin.generate"),
118119
("py:class", "transformers.LlamaConfig"),
119120
("py:class", "transformers.cache_utils.Cache"),
120121
("py:class", "transformers.cache_utils.DynamicCache"),

_doc/examples/plot_export_with_dynamic_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Export with DynamicCache and dynamic shapes
66
===========================================
77
8-
Every LLMs implemented in :epkg:`trasnformers` use cache.
8+
Every LLMs implemented in :epkg:`transformers` use cache.
99
One of the most used is :class:`transformers.cache_utils.DynamicCache`.
1010
The cache size is dynamic to cope with the growing context.
1111
The example shows a tool which determines the dynamic shapes

onnx_diagnostic/export/dynamic_shapes.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ def forward(self, x, y):
4545
ds = mi.guess_dynamic_shapes()
4646
pprint.pprint(ds)
4747
48-
import pprint
49-
import torch
50-
from onnx_diagnostic.export import ModelInputs
51-
5248
**kwargs**
5349
5450
.. runpython::
5551
:showcode:
5652
53+
import pprint
54+
import torch
55+
from onnx_diagnostic.export import ModelInputs
56+
5757
class Model(torch.nn.Module):
5858
def forward(self, x, y):
5959
return x + y
@@ -69,15 +69,15 @@ def forward(self, x, y):
6969
ds = mi.guess_dynamic_shapes()
7070
pprint.pprint(ds)
7171
72-
import pprint
73-
import torch
74-
from onnx_diagnostic.export import ModelInputs
75-
7672
**and and kwargs**
7773
7874
.. runpython::
7975
:showcode:
8076
77+
import pprint
78+
import torch
79+
from onnx_diagnostic.export import ModelInputs
80+
8181
class Model(torch.nn.Module):
8282
def forward(self, x, y):
8383
return x + y

0 commit comments

Comments
 (0)