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.27.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.27.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chp_adapter_mlx-0.27.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.27.0.tar.gz
Algorithm Hash digest
SHA256 e6a7f343744219eab94c92fab8e13e3cbecd382b899e7ce8269e3a0c9f5f361e
MD5 91f47987221b52735d5b6449560ef5d3
BLAKE2b-256 8963997a3325a4da0ea651f50e05538bb78dd2e55f2e3cc9ef11ea8e0a74a1d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chp_adapter_mlx-0.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bfd4355353505a2863600563616673807d4859fb4d6b9894947e380bae4c06a
MD5 a9302a2b62c9e14799dec685da368f1c
BLAKE2b-256 b766db6251064cff9b35a971c0445fb11598e60490e5f560d569f6c692094456

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