Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mlx-pipe

Unix-style CLI wrappers for MLX speech and language models.

Alpha software: mlx-pipe currently targets Apple Silicon Macs and Python 3.11 or 3.12. The MLX audio ecosystem is moving quickly, so model-specific behavior may change between releases.

mlx-pipe keeps stdout pipe-friendly:

  • stt and llm write plain text to stdout.
  • tts writes WAV bytes to stdout, or to --out.
  • progress, model loading, and warnings go to stderr.
  • --json is available when structured output is needed.

Install

From PyPI. The package is published as mlx-pipe; the installed CLI command is mlx-pipe:

uv tool install mlx-pipe --python 3.12
mlx-pipe --help

For local development, clone the repository and use uv:

uv sync
uv run mlx-pipe --help

Python is pinned to >=3.11,<3.13 because the MLX audio stack is not yet stable on Python 3.13.

Quick Start

Run a local LLM:

uv run mlx-pipe llm "Say hello in one short sentence" \
  --model mlx-community/gemma-3-1b-it-4bit

Transcribe audio:

uv run mlx-pipe stt /tmp/asr.wav \
  --model RayyTien/Breeze-ASR-26-mlx-4bit

Generate speech:

uv run mlx-pipe tts "Hello from Voxtral." \
  --model mlx-community/Voxtral-4B-TTS-2603-mlx-4bit \
  --voice casual_male \
  --out /tmp/voxtral.wav

file /tmp/voxtral.wav

Expected file output:

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 24000 Hz

Pipe Composition

Transcribe speech, then send the transcript to an LLM:

uv run mlx-pipe stt /tmp/asr.wav \
  --model RayyTien/Breeze-ASR-26-mlx-4bit \
| uv run mlx-pipe llm "translate to Chinese" \
  --model mlx-community/gemma-3-1b-it-4bit

Generate text, then synthesize it:

uv run mlx-pipe llm "explain MLX in one sentence" \
  --model mlx-community/gemma-3-1b-it-4bit \
| uv run mlx-pipe tts \
  --model mlx-community/Voxtral-4B-TTS-2603-mlx-4bit \
  --voice casual_male \
  --out /tmp/mlx.wav

When stdin is piped into llm, the positional prompt is treated as the instruction:

{instruction}:

{stdin text}

Logprobs

Use --json --logprobs to include generated token metadata. Use --top-logprobs N to include the top N alternatives for each generated token.

uv run mlx-pipe llm "Say hello" \
  --model mlx-community/gemma-3-1b-it-4bit \
  --json \
  --logprobs \
  --top-logprobs 5 \
  --max-tokens 8

Output shape:

{
  "text": "Hello there! How can I help you",
  "meta": {"model": "mlx-community/gemma-3-1b-it-4bit"},
  "tokens": [
    {
      "token": 9259,
      "text": "Hello",
      "logprob": 0.0,
      "top_logprobs": [
        {"token": 9259, "text": "Hello", "logprob": 0.0}
      ]
    }
  ]
}

Config

Model resolution priority is:

  1. explicit --model
  2. user config
  3. built-in defaults

Set defaults:

uv run mlx-pipe config set llm.default mlx-community/gemma-3-1b-it-4bit
uv run mlx-pipe config set stt.default RayyTien/Breeze-ASR-26-mlx-4bit
uv run mlx-pipe config set tts.default mlx-community/Voxtral-4B-TTS-2603-mlx-4bit

Read config:

uv run mlx-pipe config get llm.default
uv run mlx-pipe config list

By default config is stored at:

~/.config/mlx-pipe/config.json

For tests or isolated runs, override it:

MLX_PIPE_CONFIG_HOME=$(mktemp -d) uv run mlx-pipe config list

Model Management

Download a model:

uv run mlx-pipe pull mlx-community/gemma-3-1b-it-4bit

List cached Hugging Face models:

uv run mlx-pipe list

Remove cached models:

uv run mlx-pipe remove mlx-community/gemma-3-1b-it-4bit

Suggested Models

LLM:

mlx-community/gemma-3-1b-it-4bit

ASR:

RayyTien/Breeze-ASR-26-mlx-4bit

Breeze-ASR-26 is intended for Taiwanese Hokkien / Taigi audio with Mandarin Chinese character output. For English test audio, use an English Whisper model instead.

TTS:

mlx-community/Voxtral-4B-TTS-2603-mlx-4bit

Voxtral requires tiktoken, which is included in this package's dependencies.

Development

Run the local checks:

uv sync
uv run pytest
uv run ruff check .
uv run python -m build
uv run twine check dist/*

Run CLI smoke checks without downloading models:

uv run mlx-pipe --help
uv run mlx-pipe llm --help
uv run mlx-pipe stt --help
uv run mlx-pipe tts --help

Run a config smoke check:

tmpdir=$(mktemp -d)
MLX_PIPE_CONFIG_HOME=$tmpdir uv run mlx-pipe config set llm.default local-llm
MLX_PIPE_CONFIG_HOME=$tmpdir uv run mlx-pipe config get llm.default
MLX_PIPE_CONFIG_HOME=$tmpdir uv run mlx-pipe config list

CI

The GitHub Actions workflow runs on a macOS arm64 hosted runner because MLX is Apple Silicon oriented. It verifies:

  • locked dependency resolution
  • unit tests
  • ruff lint
  • CLI help/config smoke checks

Full model e2e tests are intentionally manual for now because they download large models and can make routine CI slow and expensive.

Metadata

Release files for mlx-pipe 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlx-pipe 0.1.0a1
File Size Uploaded Provenance Actions
mlx_pipe-0.1.0a1.tar.gz 14.4 kB With provenance Details for mlx_pipe-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlx-pipe 0.1.0a1
File Interpreter ABI Platform Actions
mlx_pipe-0.1.0a1-py3-none-any.whl Python 3 none any Details for mlx_pipe-0.1.0a1-py3-none-any.whl

Total release size: 29.1 kB

Release files / mlx_pipe-0.1.0a1.tar.gz

Download URL mlx_pipe-0.1.0a1.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
79c0a85f15c991757855a4f558dfef36afe3b9e48327a752dd781812eead939f
BLAKE2b-256 checksum
How to use checksums
df77e43dc8f09e6bead67c4c83c5e1cc2b719a1da5e7360066804d95eeae6146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 17, 2026.

Transparency log

Release files / mlx_pipe-0.1.0a1-py3-none-any.whl

Download URL mlx_pipe-0.1.0a1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9d2d20ecc51c2637ec47e9a7f8338bf146fdb1526fc42af70d31a4d92b48be2
BLAKE2b-256 checksum
How to use checksums
57fc456b7f14e2f94467e28ff18c81465bf05a8b54722ac79de5d5b1ed4335f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 17, 2026.

Transparency log

Security for mlx-pipe 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mlx_pipe-0.1.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page