Developers reverse engineer Apple's private API for the Neural Engine and implement neural network training on the ANE for the first time.

robot
Abstract generation in progress

CryptoWorld News: On March 3rd, developer Manjeet Singh (GitHub: maderix) collaborated with Claude Opus to reverse engineer Apple’s unreleased private API, achieving neural network training with backpropagation on the Apple Neural Engine (ANE) of the M4 chip for the first time. ANE is an accelerator designed specifically for inference, and Apple has never officially opened training capabilities. Developers can only indirectly access its inference functions through the CoreML framework. This project bypasses CoreML, directly mapping over 40 private classes such as _ANEClient and _ANECompiler to the IOKit kernel driver, and discovered the _ANEInMemoryModelDescriptor interface, which allows models to be compiled directly in memory—key to enabling training, as weights need to be recompiled after each update. Currently, training a single transformer layer (dim=768, seq=512) is implemented, with each step taking 9.3ms on M4, and an ANE utilization of 11.2% (1.78 TFLOPS, with a theoretical peak of 15.8 TFLOPS). Forward and backward input gradients are computed on the ANE, while weight gradients and the Adam optimizer run on the CPU. The project also found that the core primitive of ANE is convolution rather than matrix multiplication; expressing matrix multiplication with 1x1 convolutions can achieve about 3x throughput improvement. Bypassing CoreML for direct calls yields an additional 2-4x gain. The official Apple claim of “38 TOPS” is misleading. Currently, the project is in early stages: only supports single-layer training, uses synthetic data, and has approximately 119 resource leaks after compilation requiring process restarts to avoid. Multi-layer training and real data support are still under development. The project is open-sourced under the MIT license and has received about 2,800 stars in 5 days.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
  • Pin

Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)