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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chp_adapter_mlx-0.25.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.25.0.tar.gz
Algorithm Hash digest
SHA256 0c16005413d5f814d5bd28e38bfbeee310413d632dcbbf9976121ef59b54b712
MD5 9db0cd2b34171fa665ca7145a3ce3e40
BLAKE2b-256 fae09fd6bf9c196532c5e1cfa8f0cc7f4f49a66dd25f42b2aa5fb387e6e15dc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chp_adapter_mlx-0.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7575be29e1dc1a96239fcca8d7f795af27d817a489287168fcd1f8d84fe48fe4
MD5 b0282d53d931550c0f1c8792ee93870f
BLAKE2b-256 826aeb2ed5d26474413cb9b0ddacfc7e376d49b582aba255718aa6a75234e8b4

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