Skip to main content

Python bindings for AX Engine

Project description

ax-engine-py

Python bindings for AX Engine.

This crate exposes the ax_engine._ax_engine extension module and stays aligned with the AX Engine 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.3-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.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ax_engine-5.1.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 625b5fecab1df799655fb88b580acc803f2adec20e8a01806025749abe2efb83
MD5 29838c88f4ce087f9bfc61ebee27b370
BLAKE2b-256 ead91b1eb2a2dc31739ac6ae88291c710735db09d6fb3f2f03c7806cc00beedf

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