#tensorflow #metal #neural-network #kernel

tract-metal

Tiny, no-nonsense, self contained, TensorFlow and ONNX inference

4 releases

new 0.21.10 Feb 21, 2025
0.21.9 Jan 8, 2025
0.21.8 Dec 5, 2024
0.21.7 Sep 23, 2024

#1145 in Machine learning

Download history 1/week @ 2024-11-12 6/week @ 2024-11-19 1/week @ 2024-11-26 142/week @ 2024-12-03 37/week @ 2024-12-10 3/week @ 2024-12-17 185/week @ 2025-01-07 77/week @ 2025-01-14 41/week @ 2025-01-21 25/week @ 2025-01-28 26/week @ 2025-02-04 35/week @ 2025-02-11

132 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

1.5MB
38K SLoC

tract-metal

Updating Metal Flash Attention library

git clone https://github.com/philipturner/metal-flash-attention.git
cd metal-flash-attention

# for iOS
swift build.swift --platform iOS --xcode-path /Applications/Xcode.app
cp build/lib/libMetalFlashAttention.metallib path/to/tract/metal/src/kernels/libMetalFlashAttention-ios.metallib

# for MacOS
swift build.swift --platform macOS --xcode-path /Applications/Xcode.app
cp build/lib/libMetalFlashAttention.metallib path/to/tract/metal/src/kernels/libMetalFlashAttention-macos.metallib

Dependencies

~16–24MB
~327K SLoC