Skip to main content

mlx-transformer-vm

mlx-transformer-vm is a standalone Python port of Percepta's transformer-vm with the compiler stack kept in Python and the eventual model runtime targeted at MLX.

The current focus is semantic parity for the computation graph, exact evaluator, and WASM machine construction.

Status

Ported now:

Upstream Mapping

The port stays structurally close to upstream:

Upstream This repo
transformer_vm/graph/core.py mlx_transformer_vm/graph/core.py
transformer_vm/evaluator.py mlx_transformer_vm/evaluator.py
transformer_vm/wasm/interpreter.py mlx_transformer_vm/wasm/interpreter.py
transformer_vm/wasm/reference.py mlx_transformer_vm/wasm/reference.py
transformer_vm/model/weights.py mlx_transformer_vm/model/weights.py
transformer_vm/model/transformer.py mlx_transformer_vm/model/transformer.py
transformer_vm/scheduler/milp.py mlx_transformer_vm/scheduler/milp.py
transformer_vm/compilation/* mlx_transformer_vm/compilation/

Development

Install dependencies:

uv sync --extra dev

Run the fast unit tests:

uv run pytest mlx_transformer_vm/tests/test_graph_core.py

Run the parity tests against the vendored local examples:

uv run pytest mlx_transformer_vm/tests/test_parity.py

Run the evaluator on a compiled token program:

uv run wasm-eval-mlx /path/to/program.txt

Diff this port against the local examples:

uv run tvm-mlx-parity --examples hello addition collatz fibonacci

Enable the optional upstream weighted oracle explicitly:

uv run tvm-mlx-parity --weighted --examples hello addition collatz fibonacci

The upstream repository is optional and is only used for the weighted-oracle comparison path in mlx_transformer_vm/parity.py. Set TRANSFORMER_VM_UPSTREAM_ROOT to enable that path.

Metadata

Release files for mlx-transformer-vm 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlx-transformer-vm 0.2.0
File Size Uploaded Provenance Actions
mlx_transformer_vm-0.2.0.tar.gz 79.5 kB Without provenance Details for mlx_transformer_vm-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlx-transformer-vm 0.2.0
File Interpreter ABI Platform Actions
mlx_transformer_vm-0.2.0-py3-none-any.whl Python 3 none any Details for mlx_transformer_vm-0.2.0-py3-none-any.whl

Total release size: 172.6 kB

Release files / mlx_transformer_vm-0.2.0.tar.gz

Download URL mlx_transformer_vm-0.2.0.tar.gz
Size 79.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ca79e1b05cf3d7a479d072422546ac804d6251d4748480afec2e22733eea6b7e
BLAKE2b-256 checksum
How to use checksums
7b27276d72c432e85e4b8f450172139e12281a0442568c1012b46ec3c23216da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mlx_transformer_vm-0.2.0-py3-none-any.whl

Download URL mlx_transformer_vm-0.2.0-py3-none-any.whl
Size 93.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4260e29ca4bd30ae09482966209026c14f32fe937f2751098a77277fc0d0c13b
BLAKE2b-256 checksum
How to use checksums
fd08314e8ad120e1a27f9431ac7d627c55dfdb23a772ec2b8fda29aeebb58cc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mlx-transformer-vm 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page