Skip to main content

CHP capability adapter — Apple Silicon native text generation via a local mlx_lm server

Project description

chp-adapter-mlx

Apple Silicon native text generation as governed CHP capabilities, backed by a local mlx_lm server. MLX is the fastest local inference path on Apple Silicon (≈2–3× Ollama, ≈1.5× llama.cpp).

mlx_lm.server is OpenAI-compatible, so this adapter mirrors chp-adapter-vllm / chp-adapter-local-llm and the gateway routes it as another inference owner for capacity-aware (GPU-utilization) routing.

Capabilities

Capability Risk Description
chp.adapters.mlx.status low Is mlx/mlx-lm installed (+ versions) and is the server reachable?
chp.adapters.mlx.list_models low Models served by mlx_lm.server (/v1/models)
chp.adapters.mlx.generate medium Single-turn completion (/v1/completions)
chp.adapters.mlx.chat medium Multi-turn chat (/v1/chat/completions)

Composition & evidence

The adapter imports no HTTP library — every server call routes through chp.adapters.http, so HTTP is its own governed evidence chain and the adapter is conformance-clean. Prompt/completion/message content is never recorded in evidence; only model id, token counts, latency, and errors are.

Running the backend (inference node)

pip install mlx-lm
# OpenAI-compatible server on :8081 (8080 collides with llama.cpp)
mlx_lm.server --model mlx-community/Qwen3-... --port 8081

Config via env: MLX_BASE_URL (default http://localhost:8081), MLX_MODEL, MLX_API_KEY. Add "mlx" to the host profile's adapters list to register it. Verify over the mesh with chp.adapters.mlx.status.

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

chp_adapter_mlx-0.26.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

chp_adapter_mlx-0.26.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file chp_adapter_mlx-0.26.0.tar.gz.

File metadata

  • Download URL: chp_adapter_mlx-0.26.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for chp_adapter_mlx-0.26.0.tar.gz
Algorithm Hash digest
SHA256 f4420f3390604dee3bfee08e0038d68f1d4d8c24cd0bff2c2df3a2677793a069
MD5 d717f3a5cd22800515fcd06668becc78
BLAKE2b-256 e7cef109713fa89f87e9ea02808621e38e75f520b6f88603009da59e53379b69

See more details on using hashes here.

File details

Details for the file chp_adapter_mlx-0.26.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chp_adapter_mlx-0.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1e79447bba03647fd3729499970559bf1cbd8af97b4441e7313389412f5b8b
MD5 af5bf36c348c323d58bf2ead66bf7883
BLAKE2b-256 e4e23072709638513b7f5ebaa4ea44d925001e2d0e220f7db68bc267852d6691

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