Skip to main content

MPS Ops

CUDA-only PyTorch operations for Apple Silicon.

This metapackage installs all mpsops packages - Metal implementations of operations that are typically CUDA-only.

Installation

Install everything:

pip install mpsops

Or install individual packages:

pip install mps-flash-attn    # Flash attention
pip install mps-bitsandbytes  # Quantized ops
pip install mps-deform-conv   # Deformable convolution
pip install mps-correlation   # Optical flow correlation
pip install mps-carafe        # Content-aware upsampling
pip install mps-conv3d        # 3D convolution for video

Packages

Package Description Use Case
mps-flash-attn Flash Attention Transformers, LLMs
mps-bitsandbytes NF4/FP4/FP8/INT8 quantization LLM inference, QLoRA
mps-deform-conv Deformable convolution Object detection (DETR, DCN)
mps-correlation Correlation layer Optical flow (RAFT, PWC-Net)
mps-carafe CARAFE upsampling Segmentation (Mask R-CNN)
mps-conv3d 3D Convolution Video models (I3D, SlowFast, MMAudio)

Quick Start

import mpsops

# Check what's installed
mpsops.print_status()

# Use the ops directly
from mpsops import flash_attn_func, deform_conv2d, correlation, carafe, conv3d, patch_conv3d

Compatibility

  • PyTorch: 2.0+
  • macOS: 12.0+ (Monterey)
  • Hardware: Apple Silicon (M1/M2/M3/M4)

Why?

Many state-of-the-art models use CUDA-only operations:

  • LLMs need flash attention and quantization
  • Object detection needs deformable convolution
  • Optical flow needs correlation layers
  • Segmentation needs specialized upsampling

On Mac, you get errors like:

NotImplementedError: flash_attn not implemented for MPS

MPS Ops provides native Metal implementations so these models run on Apple Silicon.

License

MIT

Metadata

Release files for mpsops 0.1.19

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

Source distribution (sdist)

Source distribution for mpsops 0.1.19
File Size Uploaded Provenance Actions
mpsops-0.1.19.tar.gz 5.6 kB Without provenance Details for mpsops-0.1.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpsops 0.1.19
File Interpreter ABI Platform Actions
mpsops-0.1.19-py3-none-any.whl Python 3 none any Details for mpsops-0.1.19-py3-none-any.whl

Total release size: 8.9 kB

Release files / mpsops-0.1.19.tar.gz

Download URL mpsops-0.1.19.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c2271ba39c679ef706fcfc256b1cc962e299eccffc06da5d9a960e52c9567e04
BLAKE2b-256 checksum
How to use checksums
42261a92bf66e3fbcb7284f03e37c0d919f63ba18d3468dba280840f5cd69a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / mpsops-0.1.19-py3-none-any.whl

Download URL mpsops-0.1.19-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a83f98d58c54748f885870507c2bf553d2fff04b9ac10780e84294e2a2a7a831
BLAKE2b-256 checksum
How to use checksums
c3b31e5a1bc780585593bd8656ae0fa38f436c7417e95a48a14e11fb063f8464
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for mpsops 0.1.19

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