Skip to content

Commit 146ca1b

Browse files
authored
Swap mha (#6719)
* Swap mha Move to extension/llm/modules Lint Add tests * Fix tests * Delete old file
1 parent 7fcd0af commit 146ca1b

File tree

3 files changed

+561
-10
lines changed

3 files changed

+561
-10
lines changed

extension/llm/modules/README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
## Export Friendly Modules
1+
## Export-friendly Modules
22

3-
Modules in this directory are:
4-
* Extending `torch.nn.Module`.
5-
* Guranteed to work out of the box with `torch.export.export()` and `torch.aot_compile()`.
6-
* Guranteed to be able to work with ExecuTorch.
3+
Modules in this directory:
4+
* Extend `torch.nn.Module`.
5+
* Are guaranteed to work out of the box with `torch.export.export()`.
6+
* Should work out of the box with `torch.aot_compile()`.
7+
* Should be able to workt with ExecuTorch.
78

89
All modules should be covered by unit tests to make sure they are:
9-
1. giving the same output as the reference implementation in PyTorch or torchtune
10-
2. export friendly
11-
3. AOTI friendly
12-
4. ExecuTorch friendly
10+
1. Give the output as the reference eager model in PyTorch or TorrchTune
11+
2. Export-friendly
1312

14-
Notice that these modules are subject to change (may upstream to torchtune) so proceed with caution.
13+
Additionally, we aim to make these modules:
14+
3. AOTI-friendly
15+
4. ExecuTorch-friendly
16+
17+
These modules are subject to change (may upstream to TorchTune) so proceed with caution.

0 commit comments

Comments
 (0)