Skip to content

Failed to export Voxtral to Metal #15621

@seyeong-han

Description

@seyeong-han

🐛 Describe the bug

I found that Voxtral export example doesn't work for Metal support.

I tried to install the optimum-executorch with both ways, but none of them worked.

# Torch 2.9.0
pip install optimum-executorch
----------------------------------
# Torch 2.10.0
git clone https://github.com/huggingface/optimum-executorch.git
cd optimum-executorch
python install_dev.py

Error Message

1. Error with Torch 2.9.0

pip list | grep torch

executorch             1.0.0
optimum-executorch     0.1.0
pytorch_tokenizers     1.0.1
torch                  2.9.0
torchao                0.14.0
optimum-cli export executorch \
  --model "mistralai/Voxtral-Mini-3B-2507" \
  --task "multimodal-text-to-text" \
  --recipe "metal" \
  --dtype bfloat16 \
  --max_seq_len 1024 \
  --output_dir="voxtral"

Skipping import of cpp extensions due to incompatible torch version 2.9.0 for torchao version 0.14.0         Please see GitHub issue #2919 for more info
W1105 13:31:25.839000 33875 site-packages/torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 15.45it/s]
`torch_dtype` is deprecated! Use `dtype` instead!
WARNING:coremltools:scikit-learn version 1.7.1 is not supported. Minimum required version: 0.17. Maximum required version: 1.5.1. Disabling scikit-learn conversion API.
WARNING:coremltools:Torch version 2.9.0 has not been tested with coremltools. You may run into unexpected errors. Torch 2.7.0 is the most recent version that has been tested.
Traceback (most recent call last):
  File "/Users/younghan/miniconda3/envs/executorch/bin/optimum-cli", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/commands/optimum_cli.py", line 208, in main
    service.run()
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/commands/export/executorch.py", line 230, in run
    main_export(
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/exporters/executorch/__main__.py", line 145, in main_export
    return export_to_executorch(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/exporters/executorch/convert.py", line 80, in export_to_executorch
    executorch_progs = recipe_func(model, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

2. Error with Torch 2.10.0.dev20251104

This Torch was installed by this automatically.

git clone https://github.com/huggingface/optimum-executorch.git
cd optimum-executorch
python install_dev.py

pip list | grep torch
executorch             1.1.0.dev20251003
optimum-executorch     0.2.0.dev0
pytorch_tokenizers     1.0.1
torch                  2.10.0.dev20251104
torchao                0.15.0.dev20251104+cpu
torchaudio             2.10.0.dev20251104
torchvision            0.25.0.dev20251104
optimum-cli export executorch \      
  --model "mistralai/Voxtral-Mini-3B-2507" \
  --task "multimodal-text-to-text" \
  --recipe "metal" \
  --dtype bfloat16 \
  --max_seq_len 1024 \
  --output_dir="voxtral"
W1105 13:53:46.873000 83783 site-packages/torch/distributed/elastic/multiprocessing/redirects.py:29] NOTE: Redirects are currently not supported in Windows or MacOs.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00,  7.30it/s]
`torch_dtype` is deprecated! Use `dtype` instead!
WARNING:coremltools:scikit-learn version 1.7.1 is not supported. Minimum required version: 0.17. Maximum required version: 1.5.1. Disabling scikit-learn conversion API.
WARNING:coremltools:Torch version 2.10.0.dev20251104 has not been tested with coremltools. You may run into unexpected errors. Torch 2.7.0 is the most recent version that has been tested.
Traceback (most recent call last):
  File "/Users/younghan/miniconda3/envs/executorch/bin/optimum-cli", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/commands/optimum_cli.py", line 208, in main
    service.run()
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/commands/export/executorch.py", line 230, in run
    main_export(
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/exporters/executorch/__main__.py", line 145, in main_export
    return export_to_executorch(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/younghan/miniconda3/envs/executorch/lib/python3.12/site-packages/optimum/exporters/executorch/convert.py", line 80, in export_to_executorch
    executorch_progs = recipe_func(model, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

Versions

PyTorch version: 2.10.0.dev20251104
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 15.7.1 (arm64)
GCC version: Could not collect
Clang version: 17.0.0 (clang-1700.3.19.1)
CMake version: version 4.0.3
Libc version: N/A

Python version: 3.12.12 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 20:07:49) [Clang 20.1.8 ] (64-bit runtime)
Python platform: macOS-15.7.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M3 Pro

Versions of relevant libraries:
[pip3] executorch==1.1.0.dev20251003
[pip3] mypy_extensions==1.1.0
[pip3] numpy==2.3.4
[pip3] optimum-executorch==0.2.0.dev0
[pip3] pytorch_tokenizers==1.0.1
[pip3] torch==2.10.0.dev20251104
[pip3] torchao==0.15.0.dev20251104+cpu
[pip3] torchaudio==2.10.0.dev20251104
[pip3] torchvision==0.25.0.dev20251104
[conda] executorch 1.1.0.dev20251003 pypi_0 pypi
[conda] numpy 2.3.4 pypi_0 pypi
[conda] optimum-executorch 0.2.0.dev0 pypi_0 pypi
[conda] pytorch-tokenizers 1.0.1 pypi_0 pypi
[conda] torch 2.10.0.dev20251104 pypi_0 pypi
[conda] torchao 0.15.0.dev20251104+cpu pypi_0 pypi
[conda] torchaudio 2.10.0.dev20251104 pypi_0 pypi
[conda] torchvision 0.25.0.dev20251104 pypi_0 pypi

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions