Skip to main content

MLX-Reason-CT

Native MLX port of NVIDIA NV-Reason-CT for Apple Silicon. Run 3D CT reasoning and report generation locally on Mac.

  • Chest and abdomen CT
  • Structured reports and CT question answering
  • Local NIfTI input with Apple Silicon GPU acceleration
  • FP32 by default, with explicit BF16 arithmetic profiles on Metal

MLX port by Joseph Sandoval. Releases · Weights · Usage · Paper · HF collection

Part of MedMLX. Technical notes

Quick start · Input and output · Technical details · License

Requirements

Supported platform: macOS arm64 on an Apple Silicon Mac with Metal GPU access, Python 3.13 or 3.14 and uv. Inference fails explicitly when Metal is unavailable.

Weights occupy 17.4 GB. Measured peak MLX memory use is about 22.7 GB; allow additional unified memory for preprocessing, macOS and other apps.

Quick start

uv tool install --python 3.13 \
  https://github.com/MedMLX/MLX-Reason-CT/releases/download/v0.3.2/mlx_reason_ct-0.3.2-py3-none-any.whl

mlx-reason-ct download \
  --revision c690a63888b9c6c9bd006687335fbd650eb60275 \
  --model-dir models

Generate a chest CT report:

mlx-reason-ct report \
  --input ct.nii.gz --model-dir models --output-dir outputs

For abdomen CT:

mlx-reason-ct report \
  --input ct.nii.gz --model-dir models --output-dir outputs \
  --anatomy-region abdomen

To ask a question about the CT, set --prompt to your question. Use --anatomy-region none for the processor's plain centered crop and --history for follow-up questions about the same CT; see usage.

For source development, clone this repository and run make env; use uv run mlx-reason-ct for the commands above.

For a generated input with no patient data, follow the synthetic CT walkthrough. It covers installation, bundle verification, input generation and completion checks.

Python

from mlx_reason_ct.medmlx import run

result = run(image_path="ct.nii.gz", weights_path="models", output_dir="outputs")
print(result["outputs"]["report"])

Takes the same options as the CLI (prompt, anatomy_region, enable_thinking, precision, overwrite, history; anatomy_region=None for the centered crop). The model is also discoverable by medmlx as mlx-reason-ct. Full runner contract in docs/usage.md.

Input and output

Input is one 3D CT volume in NIfTI format (.nii or .nii.gz) with Hounsfield Unit values and valid spatial geometry. DICOM and 2D images are unsupported.

The upstream crop locates the chest from enclosed air. On whole-body scans, especially with arms raised, it can select the head and neck instead; crop such volumes to the chest or abdomen before running.

Each run writes:

  • report.txt — generated response
  • model_response.json — response, reasoning (with --enable-thinking) and generation metadata
  • run.json — execution metadata

Version 0.2.4 removes a trailing empty <answer></answer> element from the saved report in both text and JSON, while preserving reasoning and nonempty answer elements.

Technical details

Inference defaults to FP32 with weights converted directly from the original BF16 checkpoint, without retraining. See the source and arithmetic contracts and usage guide. Seeded test references are recorded on darwin-arm64; verification scope explains their bounds and what they do not establish.

Version 0.2.3 includes faster source-BF16 projection and attention kernels. On one M1 Max synthetic case, cached full-model time fell from 17:54 in the preceding source build to 14:49, with bitwise-unchanged recorded outputs. Full BF16 qualification remains incomplete; see the benchmark and limits.

Intended use

Intended for research and education, not clinical diagnosis or treatment decisions. Outputs require human review.

License

Original port contributions: Apache-2.0, Joseph Sandoval. NVIDIA model architecture, processor policy and weights retain OpenMDW-1.1, NVIDIA CORPORATION & AFFILIATES. Bundled Apple and PyTorch-derived portions retain MIT and BSD-3-Clause terms. Third-party notices.

Metadata

Release files for mlx-reason-ct 0.3.2

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-reason-ct 0.3.2
File Size Uploaded Provenance
mlx_reason_ct-0.3.2.tar.gz 3.8 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mlx-reason-ct 0.3.2
File Interpreter ABI Platform
mlx_reason_ct-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 MB

Release files / mlx_reason_ct-0.3.2.tar.gz

Download URL mlx_reason_ct-0.3.2.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6bf5e967e7d39394f4461af374a2ba6e1d509e698dfe3c2629e2e9071227f71f
BLAKE2b-256 checksum
How to use checksums
b3dc281d6006a1c183b07f3e741d13c2e822aefd623e0229661caeea8304c068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Release files / mlx_reason_ct-0.3.2-py3-none-any.whl

Download URL mlx_reason_ct-0.3.2-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
026f8060bf3c0970fdc874beb43d91fd93146aac3c588e32a7e3b264f6c3e370
BLAKE2b-256 checksum
How to use checksums
c23f4fe8b00141364d855289af5625e4144cd331d9934b4105c19d4ed3f73416
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Security for mlx-reason-ct 0.3.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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