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

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.0/mlx_reason_ct-0.3.0-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-mcp 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. Implementation and verification details are in docs. 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

Code: Apache-2.0, Joseph Sandoval. Weights: OpenMDW-1.1, NVIDIA CORPORATION & AFFILIATES. Third-party notices.

Implementation mapping

implementation-map.json records upstream-to-native changes, source references and qualification scope.

Metadata

Release files for mlx-reason-ct 0.3.0

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.0
File Size Uploaded Provenance
mlx_reason_ct-0.3.0.tar.gz 4.2 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 8.0 MB

Release files / mlx_reason_ct-0.3.0.tar.gz

Download URL mlx_reason_ct-0.3.0.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
5e2b61d390153d881a547f2283fd9d1ff3aff0ce6a4357072ea53bb08ec3b6b3
BLAKE2b-256 checksum
How to use checksums
cc0d5dd42d99218356f4ce5c732fcbe41346f2649b7b6034cefc69fc8cb4dd90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Download URL mlx_reason_ct-0.3.0-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7618b8b3388d3f3d1202246730ff0f089b8310d74ce18cda6b37771dd7be9f80
BLAKE2b-256 checksum
How to use checksums
012d9ad294461c944ad5e2d8daf7d325f68eaa6be95d693ad7ecd9329cc37e63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for mlx-reason-ct 0.3.0

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