Skip to content

Commit c0c0f5e

Browse files
committed
Update base for Update on "Update phi-3-mini to use the export library"
as title. Note: exporting model from HF is currently blocked by this issue, https://fburl.com/qpaapajr. We need to apply the following trick to export the model. ``` model = torch.export._trace._export( model, example_inputs, dynamic_shapes=dynamic_shape, strict=False, pre_dispatch=False, ) ``` Differential Revision: [D59503255](https://our.internmc.facebook.com/intern/diff/D59503255/) [ghstack-poisoned]
1 parent 349dcbb commit c0c0f5e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/models/phi-3-mini/export_phi-3-mini.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
XNNPACKQuantizer,
2121
)
2222

23-
from transformers import ( # @manual=fbsource//third-party/pypi/transformers:transformers
24-
Phi3ForCausalLM,
25-
)
23+
# pyre-ignore: Undefined attribute [16]: Module `transformers` has no attribute `Phi3ForCausalLM`
24+
from transformers import Phi3ForCausalLM
2625

2726

2827
def main() -> None:

0 commit comments

Comments
 (0)