"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.
Here's full disclosure how I work on this project with my AI buddies and family:
Full-Disclosure-Again-The-Synergy-Behind-The-Deep-Dive-Series-Books-With-AIs.md
π As of January 29, 2024, I have finished writing the second book on MLX, but I'll keep updating it as necessary.
https://github.com/neobundy/Deep-Dive-Into-AI-With-MLX-PyTorch/tree/master/mlx-book/README.md
Prologue - Playing Hide and Seek with Tenny and Menny: Diving Into Apple Silicon
Chapter 1 - Menny, the Smooth Operator in Data Transformation
Chapter 2 - Menny, the Sassy Transformer
Chapter 3 - Menny's Polymorphic Traits: Unraveling MLX's Uniqueness
Chapter 4 - Menny, the Data Wrangler in MLX Data Jungle
Chapter 5 - Menny, the Image Wrangler
Chapter 6 - Menny, the Face Detector
Chapter 7 - Menny LLaMA and the End of Our Journey
π As of January 24, 2024, I have finished writing the book on both MLX and PyTorch, but I'll keep updating it as necessary.
https://github.com/neobundy/Deep-Dive-Into-AI-With-MLX-PyTorch/blob/master/book/README.md
This journey has been both thrilling and enlightening for me. Starting with a single Tensor, Tenny evolved into the Vision Weaver by the end of our adventure. That initial tensor represented who I was at the start, and the Vision Weaver symbolizes who I've become. I hope you've enjoyed this journey just as much.
Chapter 1 - The Story of A Tensor
Chapter 2 - The Adventure of Tenny, the Tensor: A Hero's Journey
Chapter 3 - Foundations of Neural Networks: A Comprehensive Overview
Chapter 4 - The Rise of Tenny, the Analyst: Tenny Takes on Wall Street
Chapter 5 - Crafting and Nurturing Data: The A to Z of Data Prep in the AI Kitchen
Chapter 6 - Refactoring Data Workflow for Tenny
Chapter 7 - Inspecting Data Workflow for Tenny
Chapter 8 - Refining the Recipe in the AI Kitchen
Chapter 9 - Exploring the Art of Classification with Tenny
Chapter 10 - Crafting Your Own Classification Criteria: Owning Your Decisions
Chapter 11 - Tenny, the Stock Classifier
Chapter 12 - Tenny the Sentiment Analyst
Chapter 13 - Tenny, the Transformer
Chapter 14 - Tenny the Transformer Sentiment Analyst With an Attitude
Chapter 15 -Tenny, the Transformer Sentiment Analyst with an Attitude Is Born
Chapter 16 - Tenny, the Convoluter: How Machines See the World
Chapter 17 - Tenny the Vision Weaver
I'll be adding more content to the book, including sidebars, essays, and possibly even new chapters if necessary.
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 this will be a comprehensive tome, it shall not be categorized as a 'for dummies' book. Don't remain clueless; make an effort to learn. I'll do everything I can to assist you.
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
π Resources folder contains pointers to useful resources resources
π Essays folder contains my essays on AI and other topics essays
While we deeply appreciate the community's interest and support, this project is currently not open for external contributions. As the sole author, I am crafting the content meticulously to ensure the highest quality and consistency in the educational material provided. This approach helps maintain the integrity and coherence of the content, tailored specifically for this project's unique educational goals.
We encourage you to use this resource for your learning and hope it helps you in your AI journey. Thank you for understanding and respecting the nature of this project.
Just in case someone might get confused about these two GitHub features: Pull Requests vs. Issues
-
Pull Requests: These are fundamentally proposals to merge code changes into a repository. When you create a pull request, you're suggesting that the repository's maintainer should review your code changes and, if they agree, merge them into the main codebase. Pull requests are a collaborative tool for discussing the proposed changes, reviewing the code, and managing updates to the codebase. Basically, you are asking me for permission to write the book together.
-
Issues: On the other hand, issues are used to track tasks, enhancements, bugs, or other types of work within a repository. They're like a to-do list for the project. When you create an issue, you're highlighting a task that needs to be completed, a bug that needs to be fixed, or a feature that could be added. Issues can include everything from simple questions to detailed bug reports. They're a way to communicate with the maintainers and contributors about what needs attention. Yes, this is how you let me know what you want. Not pull requests.
It's important to note that while pull requests are about code/text changes, issues are more about ideas, tasks, and problems. Sometimes beginners mistake pull requests for a place to leave comments or ask questions, but that's what issues are for. Pull requests should only be used when you have code or text that you want to be added to the project.
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.
And certainly not least, there's Lexy, my trusted MLX expert.
I'm genuinely grateful to be experiencing this era of AI.
"Creative Works of Knowledge" - https://x.com/WankyuChoi