Skip to main content

Preview Python bindings for AX Engine v5

Project description

ax-engine-py

Preview Python bindings for AX Engine v4.

This crate exposes the ax_engine._ax_engine extension module and stays aligned with the v4 SDK contract rather than inventing a separate Python-only runtime surface.

Current preview scope:

  • SDK-backed Session
  • fail-closed host validation (requires M2 Max or newer, macOS 14+, 32 GB RAM)
  • runtime metadata reporting
  • mlx=True selects the repo-owned MLX runtime
  • support_tier="mlx_lm_delegated" selects explicit upstream mlx-lm text compatibility through mlx_lm_server_url
  • non-MLX inference routes to llama.cpp
  • text/chat convenience helpers over the same SDK-backed request contract
  • stepwise request control via submit(...), step(), snapshot(...), and cancel(...)
  • SDK-backed in-process stream_generate(...) lifecycle events emitted through a native incremental iterator
  • mlx-lm compatibility via mlx_lm_server_url
  • llama.cpp compatibility via llama_model_path, llama_cli_path, or llama_server_url
  • native_mode=True is retired and returns an error

Current non-goals:

  • text tokenization and decoding
  • automatic model-aware chat templating
  • transport-level remote streaming
  • broad compatibility lifecycle parity across multiple delegated adapters

For Phase 1, stepwise request-control methods support MLX preview plus the server-backed llama.cpp compatibility path. The mlx_lm_delegated path is text-only blocking generation through mlx_lm.server; token prompts, streaming, and lifecycle calls fail closed. One llama.cpp compatibility session can now hold multiple active delegated requests while step() aggregates progress across them.

Build from the repository root with maturin:

maturin develop

For a repo-owned integration smoke check that bootstraps a temporary virtual environment, installs maturin, builds the extension, runs the checked-in Python examples, and then runs both the installed-package preview tests and the wrapper tests, use:

bash scripts/check-python-preview.sh

To verify the extension-module packaging path without installing it, build from the repository root with:

cargo build -p ax-engine-py --no-default-features --features python-extension

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ax_engine-5.1.2-cp310-abi3-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file ax_engine-5.1.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ax_engine-5.1.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d47b3d1e7d74dabd2f7713bc676fa6d136aca9981b857f5c8615f31f934714c9
MD5 36f31521596579fa2cac774f2ce497d7
BLAKE2b-256 efd0db720898ea1ba529a8bff617d6075cee42863eeec1ceecf0191612c6c256

See more details on using hashes here.

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