A Python project that generates professional PowerPoint presentations about tokens in Large Language Models (LLMs) using the python-pptx library.
This repository demonstrates automated presentation creation with a clean, minimalistic design. The main presentation explains what tokens are, why they matter, and how they work in the context of large language models.
The tokens_in_llms.pptx file contains a 10-slide presentation covering:
- Title Slide - Understanding Tokens: The Building Blocks of Large Language Models
- What is a Token? - Basic definition and examples
- Why Tokens Matter - Importance in LLM processing
- The Tokenization Process - Visual flowchart of text-to-embedding conversion
- Types of Tokenization - Word-level, character-level, and subword methods
- Subword Tokenization Example - Practical examples showing token splits
- Token Limits & Context Windows - Understanding model constraints
- Practical Implications - Cost, speed, and usage considerations
- Optimizing Token Usage - Best practices and tips
- Key Takeaways - Summary of main concepts
- Black
(0, 0, 0)- Primary text and accents - White
(255, 255, 255)- Backgrounds - Light Gray
(240, 240, 240)- Content boxes - Medium Gray
(128, 128, 128)- Secondary elements - Dark Gray
(64, 64, 64)- Body text
- Titles: 44-66pt bold
- Content: 20pt
- Small text: 18pt
- Widescreen 16:9 aspect ratio (16" x 9")
pip install python-pptx pillowOr on macOS:
pip3 install python-pptx pillow --break-system-packagesGenerate the presentation:
python tokens_presentation.pyThis creates tokens_in_llms.pptx in the same directory.
.
├── README.md # This file
├── tokens_presentation.py # Main script for tokens presentation
├── tokens_in_llms.pptx # Generated presentation output
├── complete_pptx_code.py # Additional presentation example
├── key_lessons.md # Development notes and lessons learned
└── CLAUDE.md # AI assistant instructions
To modify the presentation, edit tokens_presentation.py:
- Change colors: Update the color constants at the top of the file
- Edit content: Modify the text in
add_standard_slide()calls - Add slides: Use the
add_standard_slide()helper or create custom slides
add_standard_slide(
"Slide Title",
[
"First bullet point",
"Second bullet point",
"Third bullet point"
]
)- Blank layout - Uses
prs.slide_layouts[6]for full control over elements - Layered design - Background elements first, then content
- Reusable components - Helper functions for consistent slide structure
- Visual elements - Accent lines, rounded rectangles, and arrows for engagement
- Python 3.7+
- python-pptx
- Pillow (for image support)
MIT License - Feel free to use and modify for your own presentations.
Generated with Claude Code