The Apple Silicon Neural Engine
With the transition to Apple Silicon (M1, M2, M3), modern Macs include a dedicated hardware component known as the Neural Engine. This specialized silicon is designed solely to accelerate machine learning and artificial intelligence tasks—such as live text OCR in photos, subject isolation in video calls, and voice recognition.
The software framework that bridges third-party applications to this hardware is called CoreML. To maximize speed, CoreML pre-compiles machine learning models (often massive neural networks) and aggressively caches them on your hard drive. If a developer updates their app with a new AI model, but the CoreML framework stubbornly clings to the old, corrupted cached model, the application will exhibit bizarre behavior. Features like background blur might fail instantly, or the application might crash the moment it attempts to invoke an AI routine.
To resolve these AI-specific failures, you must forcefully purge the CoreML cache using the Terminal.
Locating the Cache Directory
Because CoreML models can be massive and are generated on the fly, they are stored in the temporary system cache directories rather than the main application bundle.
The specific cache directory you need to target is located at: /private/var/folders/*/com.apple.coreml/
Purging the Cache via Terminal
Because this is a system-level temporary directory, you must use the Terminal with elevated administrator privileges to delete it safely.
- Ensure any applications that utilize heavy AI tasks (like Pixelmator Pro, Final Cut Pro, or Logic Pro) are completely closed.
- Open the Terminal application.
- Execute the following command to forcefully remove the compiled ML models:
sudo rm -rf /private/var/folders/*/*/*/com.apple.coreml
Press Enter, type your Mac’s administrator password (the characters will remain invisible for security), and press Enter again.
Warning: The rm -rf command is incredibly destructive. The wildcard asterisks (*) are necessary because macOS dynamically names the temporary folders with random alphanumeric strings upon boot. Ensure you type the path exactly as written to avoid deleting critical system files.
Restarting the Machine Learning Daemon
While the files are gone from the SSD, the background daemon responsible for routing tasks to the Neural Engine (coremlc or the broader mediaanalysisd depending on the specific task) might still be holding corrupted memory pointers.
You must forcefully terminate the background analysis daemon.
sudo killall mediaanalysisd
The launchd system will automatically and silently respawn a fresh instance of the daemon.
Rebuilding the Models
The next time you open the affected application and trigger an AI feature, you might notice a brief delay of a few seconds (accompanied by a small spike in CPU usage). This is perfectly normal. The CoreML framework is simply taking the raw machine learning model from the application bundle, compiling it fresh for the Neural Engine hardware, and generating a brand-new, uncorrupted cache. Subsequent uses of the feature will be lightning-fast once again.