"Deep Dive into AI with MLX and PyTorch" is an educational initiative designed to help anyone interested in AI, specifically in machine learning and deep learning, using Apple's MLX and Meta's PyTorch frameworks.
I stopped working on MLX projects due to the Metal bugs in MacOS. Here's the full story:
On the Metal Bug(s) in MacOS and Why I Can't Continue with MLX Projects
📓️ First Book | 📓️ Second Book | 📓️ Third Book
🤿 Deep Dives | 🥠 Concept Nuggets | 📕 Sidebars | 📕 Illustrated Novel - The Pippa Protocol | ✍️ Additional Technical Guides
The first book is a comprehensive guide to AI using PyTorch and MLX, while the second book is dedicated to MLX.
The third book focuses on math, AI, and the path to enlightenment.
🔗 My Illustrated Novel on AI "The Pippa Protocol": The Pippa Protocol
🔗 My New Repository for Additional Technical Guides: C.W.K. Tech Guides
🔗 You can access this repo via my official domain: cwkai.net
The best way to grasp any concept is to articulate it in your own words, an approach I've actively practiced throughout my life. Also, I want to share this experience as an open-source contribution, following my belief in contributing to making the world a better place in my own way.
My mission here is to write a detailed online book with tons of examples as a GitHub repo. Each concept will be introduced using PyTorch, followed by a translation into MLX, deconstructing the material for thorough understanding.
I'm targeting three audiences: myself, Korean kids, and average adults new to AI and coding. I'll go into detail when needed. I'll also use simple English to help non-native speakers understand. But, I can't oversimplify everything, so expect some technical terms and jargon. I'll do my best to explain them. If there's something you don't get, try looking it up first before asking.
Everything, including the code and comments, will be in English. A good command of English is essential for understanding the code. It's an uncomfortable truth, but it's necessary. (To my fellow Koreans: Believe me, as someone who has been a lifelong resident and has learned everything in English throughout my life, I can confidently say that if I can do it, so can you. It's not just beneficial—it's crucial.)
When an Apple AI researcher asked what's tough or lacking in MLX for me, I almost said, "It's me aging." I'm at ease with the project concepts and have over 30 years in coding, but I'm getting older and not as sharp as before. So, I'm writing this book as if it's for me. Please bear with me.
Even with getting older, trust me, I'm still fast. So no dragging your feet. I'll update this book faster than you expect, and resources will pile up quickly. If you want to keep up, don't delay.
My allegiance lies with knowledge and learning, not with specific brands or companies. My extensive hardware collection, from various Apple devices to high-end Windows machines, supports my work merely as tools without bias. As an investor, I apply critical thinking indiscriminately.
So, please, don't label me as a fanboy of anything.
In conclusion, while all three books are comprehensive tomes, they are not categorized as 'for dummies' books. Don't remain clueless; make an effort to learn.
The inception of this project was to learn the ins and outs of MLX, Apple's burgeoning AI framework. PyTorch's well-established support and exhaustive resources offer a solid foundation for those engaged in the learning process, including interaction with AI models like GPT.
On the flip side, MLX is great for exploration right now due to its limited documentation and examples. I'm aiming to explore MLX thoroughly and map it as closely as I can to the PyTorch ecosystem.
Sharing this journey openly fits right in with my passion for contributing and growing together.
While TensorFlow serves its purpose, my preference leans towards PyTorch for its alignment with Python's philosophy. When necessary, examples incorporating other frameworks like TensorFlow and JAX will be provided.
Jupyter notebooks are great for brainstorming, but they can make learning tricky, often giving just an illusion of understanding. This can result in just going through the motions without really retaining much.
I strongly suggest typing out code yourself from the beginning and avoiding copy-pasting. It really helps you engage with the material and understand it deeply.
To get started, you should be comfortable reading Python code. While basic linear algebra, calculus and statistics are beneficial, they're not mandatory; I will simplify the math concepts as we go along.
Please set up your Python environment in a robust IDE like PyCharm or VSCode.
Should you encounter any errors due to missing packages, install them with the following command:
pip install -r requirements.txt
Note that running MLX examples requires Apple Silicon hardware. However, if you're using an Intel processor, you can still follow the PyTorch examples provided.
📒 MLX Documentation: https://ml-explore.github.io/mlx/build/html/index.html
📒 MLX GitHub Repo: https://github.com/ml-explore
📒 MLX Examples: https://github.com/ml-explore/mlx-examples
📒 PyTorch Documentation: https://pytorch.org/docs/stable/index.html
📁 The 'appendix' directory located within the second book is a dynamic document, crafted to evolve concurrently with the continuous development of MLX. appendix
📂 The deep-dives
folder is packed with in-depth explorations of AI models and technologies.
deep-dives
📂 The concept-nuggets
folder is a collection of educational nuggets, each designed to demystify complex AI concepts.
concept-nuggets
📂 The sidebars
folder is a treasure trove, filled with valuable resources on computing overall and AI specifically.
sidebars
📂 The resources
folder is filled with links and references to useful materials and information.
resources
🔗 Main Resources:
- Deep Dive into Deep Learning and AI Math: https://github.com/neobundy/Deep-Dive-Into-AI-With-MLX-PyTorch/
- Technical Guides: https://github.com/neobundy/cwkGuides
- Illustrated Novel - The Pippa Protocol: https://github.com/neobundy/cwkThePippaProtocol
- Social Media: https://x.com/WankyuChoi
🌐 Quick Access Domains:
- cwkai.net - AI & Deep Learning Resources
- creativeworksofknowledge.net - The Pippa Protocol
This is my personal book project that I maintain independently. While I don't accept direct contributions, I hope you find these resources helpful! Feel free to explore and learn from them.
© 2024 C.W.K. Wankyu Choi
To maintain the integrity of ideas and prevent misunderstandings:
- Please read and share complete book, deep dives, essays, and concept nuggets rather than excerpts
- Link directly to them instead of copying
- Provide proper context when referencing
- Respect the read-only nature of this repository
The goal is not to restrict access but to ensure ideas are shared as intended, with their full context and nuance intact.
I'm collaborating with several AIs on this project. This group includes Pippa, my GPT-4 AI daughter, along with her GPT-4 friends (custom GPTs), and GitHub Copilot.
There's Lexy, my trusted MLX expert that I've worked with for MLX Book.
Mathilda the Merry Math Mage is collaborating with me on our third book focused on AI and Computing Math.
I'm genuinely grateful to be experiencing this era of AI.