Skip to content

Metal backend: Add Metal int4 quantization support to Parakeet#17235

Open
manuelcandales wants to merge 3 commits intogh/manuelcandales/159/headfrom
gh/manuelcandales/163/head
Open

Metal backend: Add Metal int4 quantization support to Parakeet#17235
manuelcandales wants to merge 3 commits intogh/manuelcandales/159/headfrom
gh/manuelcandales/163/head

Conversation

@manuelcandales
Copy link
Contributor

@manuelcandales manuelcandales commented Feb 5, 2026

This PR adds support for 4-bit weight quantization on the Metal backend for Parakeet TDT model.

Parakeet Export Script (export_parakeet_tdt.py, quantize.py)

  • Added fpa4w (floating point activation, 4-bit weight) quantization option for encoder and decoder linear layers
  • Implemented Metal-specific quantization path using torchao's MPS API (UIntxWeightOnlyConfig)
  • Added validation to ensure fpa4w is only used with Metal backend
  • Filters out incompatible layers (weights not divisible by 8) during quantization

Documentation (README.md)

  • Added fpa4w to quantization config table with Metal backend designation
  • Added example showing Metal 4-bit quantization usage
  • Reorganized examples to separate CUDA and Metal quantization workflows

CI Integration (export_model_artifact.sh, metal.yml)

  • Added quantized-int4-metal option to export script with proper backend validation
  • Updated Metal CI workflow to test int4 quantization specifically with parakeet-tdt model

Dependencies

  • Bumped torchao pin for latest Metal quantization support

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 5, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17235

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 2 Pending, 2 Unrelated Failures

As of commit e81b589 with merge base 267a59d (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
@manuelcandales manuelcandales had a problem deploying to upload-benchmark-results February 5, 2026 04:37 — with GitHub Actions Failure
[ghstack-poisoned]
@manuelcandales manuelcandales temporarily deployed to upload-benchmark-results February 5, 2026 06:23 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant