File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff 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 ``
Original file line number Diff line number Diff line change 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# %%
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"
2525processor = AutoProcessor .from_pretrained (model_id , trust_remote_code = True )
2626model = AutoModelForCausalLM .from_pretrained (
2727 model_id , trust_remote_code = True , torch_dtype = "auto"
You can’t perform that action at this time.
0 commit comments