Skip to main content

Convert ONNX models into MLX callables for inference on Apple Silicon.

Project description

onnx2mlx

Muna logo

Convert ONNX models into MLX callables for accelerating inference on Apple Silicon.

Setup Instructions

Open a terminal and run the following command:

# Install onnx2mlx
$ pip install --upgrade onnx2mlx

Converting from ONNX to MLX

Use the onnx2mlx function to create a callable that uses MLX to run the model:

import mlx.core as mx
import onnx
from onnx2mlx import onnx2mlx

# Load an ONNX model
model = onnx.load("model.onnx")

# Convert to MLX
model_mlx = onnx2mlx(onnx_model)

# Run the MLX model
outputs = model_mlx(mx.array(...))

Useful Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onnx2mlx-0.0.2.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onnx2mlx-0.0.2-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file onnx2mlx-0.0.2.tar.gz.

File metadata

  • Download URL: onnx2mlx-0.0.2.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onnx2mlx-0.0.2.tar.gz
Algorithm Hash digest
SHA256 816a92b80d0a676ac0fd522894d9ab241ebbe14ae5fef6517a6d9088600b4e8d
MD5 da41b687d350478bd9facdc4cbe37518
BLAKE2b-256 1669d51a151ee21f4960b4430d539dc51df72812be958ed71f307ff25abcab20

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.2.tar.gz:

Publisher: pypi.yml on muna-ai/onnx2mlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx2mlx-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: onnx2mlx-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onnx2mlx-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d59bfea48ef7af8893835a17c1c07fe96852c875c05e76ff029b7691909addc
MD5 4b0868aa62725a3a20d2ef605b8be5bb
BLAKE2b-256 5aec694c3a62003de9d5982339e8396e83473026589d98a0d045b76043a51a2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.2-py3-none-any.whl:

Publisher: pypi.yml on muna-ai/onnx2mlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page