Skip to content

Commit b2e18fa

Browse files
committed
doc
1 parent fdced7a commit b2e18fa

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

_doc/cmds/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Command Lines
99
:maxdepth: 1
1010

1111
config
12+
validate

_doc/cmds/validate.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
-m onnx_diagnostic validate ... validate a model id
2+
===================================================
3+
4+
Description
5+
+++++++++++
6+
7+
The command lines validate a model id
8+
available on :epkg:`HuggingFace` but not only.
9+
It creates dummy inputs, runs the models on them,
10+
exports the model, measures the discrepancies...
11+
12+
.. runpython::
13+
14+
from onnx_diagnostic._command_lines_parser import get_parser_validate
15+
16+
get_parser_validate().print_help()
17+
18+
Get the list of supported tasks
19+
+++++++++++++++++++++++++++++++
20+
21+
.. code-block::
22+
23+
python -m onnx_diagnostic validate
24+
25+
.. runpython::
26+
27+
from onnx_diagnostic._command_lines_parser import main
28+
29+
main(["validate"])
30+
31+
32+
Get the default inputs for a specific task
33+
++++++++++++++++++++++++++++++++++++++++++
34+
35+
.. code-block::
36+
37+
python -m onnx_diagnostic validate -t text-generation
38+
39+
.. runpython::
40+
41+
from onnx_diagnostic._command_lines_parser import main
42+
43+
main("validate -t text-generation".split())
44+
45+
Validate a model
46+
++++++++++++++++
47+
48+
.. code-block::
49+
50+
python -m onnx_diagnostic validate -m arnir0/Tiny-LLM --run -v 1
51+
52+
.. runpython::
53+
54+
from onnx_diagnostic._command_lines_parser import main
55+
56+
main("validate -m arnir0/Tiny-LLM --run -v 1".split())

0 commit comments

Comments
 (0)