Assemble Your Transformer Architecture
This is the theoretical centerpiece of the curriculum. Explore the architecture that underpins modern Generative AI like Gemini and GPT. Understand attention mechanisms, positional encoding, and build your own transformer model.
Key Topics
- The Transformer: History and architecture
- Self-Attention Mechanisms: How models weigh word importance
- Masked Attention: Preventing the model from seeing the future
- Multi-Head Attention: Capturing different relationship types
- Context-sensitive next-token prediction
Learning Outcomes
- Investigate how Transformers process prompts
- Understand the mathematical mechanism of attention
- Visualize how a model 'thinks' by examining attention weights
- Differentiate between Transformer components (encoders/decoders)
- Build retrieval-based QA systems
Practical Projects
- Visualize attention weights to see model focus during generation
- Fine-tune mBERT for answer span extraction
- Build a cross-lingual QA system using African language documents
Recommended Datasets
8 datasets are aligned with this course for hands-on exercises and projects.
MAFAND-MT
Machine Translation for 21 African Languages
AfriQA
Cross-lingual Question Answering for 10 African Languages
XL-Sum
Abstractive Summarization for African Languages
Belebele
Reading Comprehension for 122 Language Variants
KenSwQuAD
Swahili Question Answering Dataset
NaijaRC
Reading Comprehension for Nigerian Languages
African Medical Records (OCR)
Nigerian Handwritten Clinical Records for OCR
Kencorpus
Kenyan Languages Corpus: Swahili, Dholuo, Luhya
About This Course
The transformer architecture revolutionized NLP. In this course, you’ll understand every component of transformers and build one from scratch for machine translation and other sequence-to-sequence tasks.
Key Topics
- Self-Attention: The core mechanism of transformers
- Multi-Head Attention: Parallel attention for richer representations
- Positional Encoding: Adding position information
- Encoder-Decoder Architecture: Building complete transformer models
- Training Transformers: Efficient training strategies
Prerequisites
- Completion of Courses 01-03 or equivalent knowledge
- Strong understanding of matrix operations
- Experience with PyTorch