-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Description
I am trying to convert the HuggingFaceTB/SmolVLM-256M-Instruct model using the onnxruntime-genai model builder.
I have encountered a persistent ModuleNotFoundError: No module named 'onnx_ir' error on both macOS (M2 Pro) and Windows 11. On macOS, after attempting a workaround by setting PYTHONPATH, the script then crashes with a libc++abi: terminating... error.
It seems that the installed pip package (v0.11.4) has issues with path resolution for its binary extensions and may have underlying stability problems on macOS with certain model architectures.
System Information
Hardware 1: MacBook Pro M2 (Apple Silicon)
Hardware 2: Windows 11 PC (x64)
Python Version: 3.11 (Verified on both venv and Miniconda)
Package Version: onnxruntime-genai==0.11.4 (installed via pip)
Target Model: HuggingFaceTB/SmolVLM-256M-Instruct
Steps to Reproduce
Create a clean Python 3.11 environment.
Install the package: pip install onnxruntime-genai huggingface-hub
Run the model builder command:
code
Bash
python -m onnxruntime_genai.models.builder
-m ./SmolVLM-256M-Instruct
-o ./output_int4
-p int4
-e cpu
--trust_remote_code
Error Logs
The primary error is a ModuleNotFoundError:
code
Text
Traceback (most recent call last):
...
File ".../site-packages/onnxruntime_genai/models/builder.py", line 15, in
import onnx_ir as ir
ModuleNotFoundError: No module named 'onnx_ir'
On macOS, after setting PYTHONPATH to resolve the import, a C++ crash occurs:
code
Text
libc++abi: terminating due to uncaught exception of type std::runtime_error
Context
Our technical goal is to deploy Vision-Language Models on mobile platforms (iOS/Android) for efficient, on-device inference. The model builder is a critical part of our workflow for generating the required assets (.onnx and genai_config.json). This blocker currently prevents us from proceeding with our mobile deployment pipeline.
Any guidance or a fix would be greatly appreciated.