Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini-Course: AI/ML Security

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. :)

Repository Information

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).

Shield: CC BY-SA 4.0

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

Local Installation

To install locally, please follow these steps:

First, install ollama and download a few llamafiles. Make sure you can run those first by following the respective documentation. Once your models are working, get your Python environment set up by following one of the

Python setup: (Recommended) Using pixi

pixi is a package management tool useful for installing Python and project dependencies. It has nice support for CPU and GPU environments.

After cloning the repo:

  1. Install pixi.
  2. Install and activate the pixi environment: pixi install
  3. Check the dependencies installed: pixi list
  4. Run a command: pixi run jupyter lab

Helpful commands in Getting Started:

  • pixi -h - help
  • pixi self-update - update pixi itself

Python setup (Option 2): Using uv

If you are using uv, you can also use the pyproject.toml file to install the necessary requirements.

$ uv venv
$ source .venv/bin/activate
$ uv sync
$ uv run jupyter lab

Python setup (Option 3): Using conda+pip

If using conda, you can create an environment using Python3.12 and use the requirements file with pip.

$ conda create -n mlsecurity --copy python=3.12
$ conda activate mlsecurity
$ conda install pip
$ pip install -r requirements.txt

If you run into any issues, please let me know!

Repository structure

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).

Corrections?

If you find any issues in these code examples, feel free to submit an Issue or Pull Request. I appreciate your input!

Questions?

Reach out to @kjam here or via the Probably Private contact options.

About

A Probably Private mini-course introducing AI/ML security via interactive videos and hands-on examples.

Resources

Stars

42 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages