This repository is for the Probably Private YouTube mini-course to introduce curious technical persons to the field of AI/ML security. In this mini-course, you'll learn:
- Red Teaming basics
- Adversarial machine learning
- Interesting attacks from research
- Applicable defenses and controls
Currently, these notebooks are in progress, so feel free to fork but expect changes!
If you have a suggestion for another library or additional topic, feel free to drop me a line. :)
This project contains the Jupyter Notebooks and the associated requirements file for Katharine Jarmul's AI/ML Security Mini-Course. It contains exercises (/notebooks) and solutions (/solutions), as well as any data or files needed (/data).
To have a look at an earlier version of the course which will work on older versions of Python, check out the original course repository (2019).
To install locally, please follow these steps:
These lessons has been tested for Python 3.9-Python 3.12 and primarily use the latest release of each library, except where versions are pinned. You likely can run most of the code with older releases, but if you run into an issue, try upgrading the library in question first.
pip install -r requirements.txt
$ conda create -n mlsecurity --copy python=3.12
$ conda activate mlsecurity
$ conda install pip
$ pip install -r requirements.txt
- Download Anaconda: https://www.anaconda.com/download
- Download GitHub Desktop: https://desktop.github.com/download/
- In GitHub Desktop, go to this repository and clone it.
- Download ollama for desktop: https://ollama.com/download
- Download a few llamafiles: https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#other-example-llamafiles and make sure to make them executable (If new to this, search: your OS + how to change file permissions to make executable)
- Open an Anaconda prompt, navigate to where the GitHub repository is, follow the conda install instruction above.
- Launch Jupyter Notebook by typing 'jupyter notebook' in that same prompt. More info on Step 6+7 here: https://dev.to/saintniyi/launch-anaconda-jupyter-notebook-environment-from-any-folder-in-any-drive-58mj
If you run into any issues, please let me know!
This repository will introduce external submodules with modifications (coming soon as I rework for newer Python versions) -- this is primarily due to making things compatible with Py3 or Jupyter. Some repositories you might want to take a look at installing individually or tracking changes are:
To have a look at an earlier version of the course which will work on older versions of Python, check out the original course repository (2019).
If you find any issues in these code examples, feel free to submit an Issue or Pull Request. I appreciate your input!
Reach out to @kjam here or via the Probably Private contact options.