File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ Model Zoo
18
18
* :ref: `torch_compile_transformer `: Compiling a Transformer model using ``torch.compile ``
19
19
* :ref: `torch_compile_stable_diffusion `: Compiling a Stable Diffusion model using ``torch.compile ``
20
20
* :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 ``
21
22
* :ref: `_torch_export_gpt2 `: Compiling a GPT2 model using AOT workflow (`ir=dynamo `)
22
23
* :ref: `_torch_export_llama2 `: Compiling a Llama2 model using AOT workflow (`ir=dynamo `)
23
24
* :ref: `_torch_export_sam2 `: Compiling SAM2 model using AOT workflow (`ir=dynamo `)
24
25
* :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 1
1
"""
2
- .. _torch_compile_phi3_vision :
2
+ .. _torch_compile_phi4 :
3
3
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
5
5
======================================================
6
6
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.
8
8
"""
9
9
10
10
# %%
21
21
# Load the pre-trained model weights from Hugging Face
22
22
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
23
24
- model_id = "microsoft/Phi-3-vision-128k -instruct"
24
+ model_id = "microsoft/Phi-4-multimodal -instruct"
25
25
processor = AutoProcessor .from_pretrained (model_id , trust_remote_code = True )
26
26
model = AutoModelForCausalLM .from_pretrained (
27
27
model_id , trust_remote_code = True , torch_dtype = "auto"
You can’t perform that action at this time.
0 commit comments