Optimum-CLI Export ONNX failing with segmentation fault
optimum-cli export onnx --opset 20 -m microsoft/Phi-4-mini-instruct phi4_mini_instruct_fp32
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.20s/it]
/home/devcloud/envs/ort/lib/python3.12/site-packages/transformers/modeling_attn_mask_utils.py:285: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
elif sliding_window is None or key_value_length < sliding_window:
/home/devcloud/envs/ort/lib/python3.12/site-packages/transformers/models/phi3/modeling_phi3.py:812: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if attention_mask.shape[-1] > target_length:
/home/devcloud/envs/ort/lib/python3.12/site-packages/transformers/models/phi3/modeling_phi3.py:395: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if seq_len > original_max_position_embeddings:
Segmentation fault (core dumped)