Welcome to the XLab AI Security Guide. You can view the contents of the course at https://xlabaisecurity.com/
This course covers a wide variety of topics in AI Security. For each topic we cover, there is a webpage describing the concept (example here). For most topic pages, the website will link to a series of coding excercises for hands-on experience with the concepts we describe. You will have the option to run the code you write either locally or in the cloud with Google Colab.
This project is still in development. For now, most of the content in the adversarial basis section has been completed. We are currently developing the LLM jailbreaking sections and hope to be done in the next few weeks.
If you want to get started using our guide, below are some useful links:
- The welcome page: This explains what we mean by "AI security" and why we think this area of work is important.
- Prerequisites: Before diving into the content of the course, make sure you read this page so you are aware of what we assume you know.
- Installation: If you are not planning on running your code in Google Colab, you will have to install a few packages. This page provides instructions for how to install these packages, including xlab-security which we developed internally.
In this monorepo, we include our Python package, the website, and the code for every pre-trained model we developed for this course. Note that all models are hosted on our Hugging Face rather than our GitHub.
This repository contains the code for xlab-security, a Python package that we have developed for this course. Students use this package to import useful utility functions and run tests for the coding excercises they complete.
The link to the production version of the Python package can be found here. To install the production version of the package, you can run:
pip install xlab-security
Once you have installed the package, you can import it within your Python file or Jupyter notebook by writing:
import xlabTo run the app locally run:
cd ai-security-course
npm run dev
To build the app run:
rm -rf .next
npm run export
This will generate an out directory which can be placed on a web server.