During this workshop, you will learn how to leverage the ScaleDown Python package to optimize AI prompts, reduce token usage, and minimize your AI applications' carbon footprint.
We'll explore practical techniques for creating structured templates, implementing model-specific optimizations, and measuring environmental impact.
You'll gain hands-on experience with the package's key features while understanding how even small efficiency improvements can lead to significant cost savings and environmental benefits when adopted at scale.
- Google account if you want to use Google Colab
- Python 3.10 (recommended) or higher
- Jupyter notebook or jupyter-lab
- Open Google Colab notebook
- In the top left corner select "File" → "Save a Copy to Drive"
- This will open a new tab with a colab notebook that you can edit and run
- Follow the instructions in the notebook
- First clone the repo:
git clone https://github.com/pyladiesams/optimize-ai-prompts-jun2025
cd optimize-ai-prompts-jun2025
- Set up a virtual environment using virtualenv:
# Install virtualenv package (typically pre-installed)
pip install virtualenv
# Create virtual environment
python3 -m venv .venv
# Activate virtuale environment (command might differ per OS)
source ./.venv/bin/activate
# Install dependencies
pip install -r requirements.txt
- Navigate to
workshop
and runScaleDown_compression_challenge.ipynb
.
ScaleDown API key can be requested here.
The key in Google Colab will only be available during the workshop. If you want to follow the workshop after, please request your API key via the link above.
If you are using Jupyter notebook locally, please replace your api key
with your actual ScaleDown API key.
This workshop was set up by @pyladiesams and @varchanaiyer