Skip to content

Commit 27e7476

Browse files
committed
support phi4
1 parent aae7692 commit 27e7476

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/dynamo/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Model Zoo
1818
* :ref:`torch_compile_transformer`: Compiling a Transformer model using ``torch.compile``
1919
* :ref:`torch_compile_stable_diffusion`: Compiling a Stable Diffusion model using ``torch.compile``
2020
* :ref:`_torch_compile_gpt2`: Compiling a GPT2 model using ``torch.compile``
21+
* :ref:`_torch_compile_phi4`: Compiling a Phi4 model from Hugging Face using ``torch.compile``
2122
* :ref:`_torch_export_gpt2`: Compiling a GPT2 model using AOT workflow (`ir=dynamo`)
2223
* :ref:`_torch_export_llama2`: Compiling a Llama2 model using AOT workflow (`ir=dynamo`)
2324
* :ref:`_torch_export_sam2`: Compiling SAM2 model using AOT workflow (`ir=dynamo`)
2425
* :ref:`_torch_export_flux_dev`: Compiling FLUX.1-dev model using AOT workflow (`ir=dynamo`)
25-
* :ref:`_torch_compile_phi3_vision`: Compiling a Phi 3 vision model from Hugging Face using ``torch.compile``

examples/dynamo/torch_compile_phi3_vision.py renamed to examples/dynamo/torch_compile_phi4.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
.. _torch_compile_phi3_vision:
2+
.. _torch_compile_phi4:
33
4-
Compiling Phi 3 vision model from Hugging Face using the Torch-TensorRT `torch.compile` Backend
4+
Compiling Phi 4 model from Hugging Face using the Torch-TensorRT `torch.compile` Backend
55
======================================================
66
7-
This script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a Phi 3 vision model from Hugging Face.
7+
This script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a Phi 4 model from Hugging Face.
88
"""
99

1010
# %%
@@ -21,7 +21,7 @@
2121
# Load the pre-trained model weights from Hugging Face
2222
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323

24-
model_id = "microsoft/Phi-3-vision-128k-instruct"
24+
model_id = "microsoft/Phi-4-multimodal-instruct"
2525
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
2626
model = AutoModelForCausalLM.from_pretrained(
2727
model_id, trust_remote_code=True, torch_dtype="auto"

0 commit comments

Comments
 (0)