Skip to content

Commit 336ae30

Browse files
committed
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]
2 parents c25d01a + a857e8d commit 336ae30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
PT2EQuantOptions,
1515
)
1616

17-
# pyre-ignore: Undefined attribute [16]: Module `transformers` has no attribute `Phi3ForCausalLM`
1817
from transformers import Phi3ForCausalLM
1918

2019

2120
def main() -> None:
2221
torch.manual_seed(42)
2322

23+
# pyre-ignore: Undefined attribute [16]: Module `transformers` has no attribute `Phi3ForCausalLM`
2424
model = Phi3ForCausalLM.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
2525

2626
modelname = "phi-3-mini"

0 commit comments

Comments
 (0)