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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chp_adapter_mlx-0.24.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.24.0.tar.gz
Algorithm Hash digest
SHA256 15b67d5d73e31d00b0bac825851a23637fe8abb0d22c1222d6730cb0df2dfd39
MD5 ff0045aaf7b68ac19618ba3ea6f917a7
BLAKE2b-256 e1e27e5d63804086d586251958d2c7dc18c69f3fb3ae84e4e061a3a615a5f777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chp_adapter_mlx-0.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06276675e9652e69528b1b9ffc50d7c1dded08a06d2077710aa851cf524d9b9f
MD5 ed1e6431c1bca1e8a1e32a277be0c748
BLAKE2b-256 bc33a87f88e04ca264a758645c94057b770f9fc428a0d606af23007b3431594b

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