Skip to content

Commit 9f11853

Browse files
authored
Update evaluation.md to include AOTI (#1411)
* Update evaluation.md to include AOTI Update evaluation.md to include running tests with AOTI * Update evaluation.md Fix typo * Formatting evaluation.md Fix formatting * Formatting evaluation.md
1 parent 201ffb0 commit 9f11853

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

torchchat/utils/docs/evaluation.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,51 @@ library.
2121

2222
The evaluation mode of `torchchat.py` script can be used to evaluate your language model on various tasks available in the `lm_eval` library such as "wikitext". You can specify the task(s) you want to evaluate using the `--tasks` option, and limit the evaluation using the `--limit` option. If no task is specified, the task will default to evaluating on "wikitext".
2323

24-
**Examples**
24+
## Examples
25+
26+
### Evaluation example with model in Python
2527

2628
Running wikitext for 10 iterations
2729
```
2830
python3 torchchat.py eval stories15M --tasks wikitext --limit 10
2931
```
3032

31-
Running an exported model
33+
Running wikitext with torch.compile for 10 iterations
34+
```
35+
python3 torchchat.py eval stories15M --compile --tasks wikitext --limit 10
36+
```
37+
38+
Running multiple tasks and calling eval.py directly (with torch.compile):
39+
```
40+
python3 torchchat.py eval stories15M --compile --tasks wikitext hellaswag
41+
```
42+
43+
### Evaluation with model exported to PTE with ExecuTorch
44+
45+
Running an exported model with ExecuTorch (as PTE)
3246
```
3347
python3 torchchat.py export stories15M --output-pte-path stories15M.pte
3448
python3 torchchat.py eval stories15M --pte-path stories15M.pte
3549
```
3650

37-
Running multiple tasks and calling eval.py directly:
51+
Running multiple tasks and calling eval.py directly (with PTE):
3852
```
3953
python3 torchchat.py eval stories15M --pte-path stories15M.pte --tasks wikitext hellaswag
4054
```
4155

56+
### Evaluation with model exported to DSO with AOT Inductor (AOTI)
57+
58+
Running an exported model with AOT Inductor (DSO model)
59+
```
60+
python3 torchchat.py export stories15M --dtype fast16 --output-dso-path stories15M.so
61+
python3 torchchat.py eval stories15M --dtype fast16 --dso-path stories15M.so
62+
```
63+
64+
Running multiple tasks and calling eval.py directly (with AOTI):
65+
```
66+
python3 torchchat.py eval stories15M --dso-path stories15M.so --tasks wikitext hellaswag
67+
```
68+
4269
For more information and a list of tasks/metrics see [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness).
4370

4471
[end default]: end

0 commit comments

Comments
 (0)