Faster NumPy on Mac GPU with MLX

Published: 22 March 2024
on channel: Vincent Codes Finance
1,664
49

Accelerate your Numpy Scientific Workflows on Apple Silicon with MLX

In this video, I compare the execution speed of numpy and numba with MLX, a python library that executes code on Mac GPUs and provides a numpy-compatible API. For my tests, I simulate a large number time series that follow an AR(3)-GARCH(1,1) process and compute the t-stat for the H0 that mean returns are 0 for each sample path. Find out how MLX performs in comparison to numpy and numba!

Note: MLX requires Apple Silicon (M1/M2/M3).

👍 Please like if you found this video helpful, and subscribe to stay updated with my latest tutorials. 🔔

The sample code used in this video is available on GitHub: https://github.com/Vincent-Codes-Fina...

The written version of this tutorial is available at: https://vincent.codes.finance/posts/a...

🔖 Chapters:
00:00 Intro
00:37 What is MLX?
04:00 Sample numpy workflow
06:18 MLX code
08:32 Numba code
10:52 Benchmarking
13:57 Benchmark results
17:19 Outro

Video links:
MLX: https://ml-explore.github.io/mlx/buil...
numpy: https://numpy.org/
numba: https://numba.pydata.org/

🐍 More Vincent Codes Finance:
✍🏻 Blog: https://vincent.codes.finance
🐦 X:   / codesfinance  
🧵 Threads: https://www.threads.net/@codesfinance
😺 GitHub: https://github.com/Vincent-Codes-Finance
📘 Facebook:   / 61559283113665  
👨‍💼 LinkedIn:   / vincent-codes-finance  
🎓 Academic website: https://www.vincentgregoire.com/

#numba #mlx #numba #pandas #python #bigdata #research #researchtips #jupyternotebook #vscode #professor #pandas #finance #datascience #dataanalytics #dataanalysis


Watch video Faster NumPy on Mac GPU with MLX online without registration, duration hours minute second in high quality. This video was added by user Vincent Codes Finance 22 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,664 once and liked it 49 people.