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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chp_adapter_mlx-0.28.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.28.0.tar.gz
Algorithm Hash digest
SHA256 05ec523c27d33956dc75e25c59964935a43b11fe985899f442693269aa6507df
MD5 ea62b2740544f5e66d9bebaa06b723b6
BLAKE2b-256 54ed6568eafa695bdbfe9351039a1df47038c58bc1cd04bff847b1e52ce9481d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chp_adapter_mlx-0.28.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2951ed05977580616f729c67b3a5a4fd081fa50a29307b2dc609e80e4bfd61d0
MD5 2588189420092fd22721f5f2ce0479f8
BLAKE2b-256 f2adeb0f1fb709edb631c21712db766f6bc9583491ca9c035d160c9320717878

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