Enterprise SLM from Scratch: Foundations thumbnail 1
Enterprise SLM from Scratch: Foundations thumbnail 2
Enterprise SLM from Scratch: Foundations

Enterprise SLM from Scratch: Foundations

An eight-session, hands-on engineering bootcamp that takes you from raw data to a deployed small language model. You build the whole pipeline yourself: data curation, transformer architecture, fine-tuning, and inference optimization.

View course on Vizuara
Sessions8
ModeLIVE
FormatHands-on Engineering
AudienceLearners
Course Description

This bootcamp covers the entire lifecycle of Small Language Model (SLM) engineering. You will move beyond theory by building a production-ready pipeline from scratch.

Learn to curate datasets, train transformers, apply LoRA/QLoRA fine-tuning, implement preference tuning, and optimize inference for on-prem or cloud deployment.

Learning Outcomes

By the end of this course, you will be able to:

Prerequisites
Course Sessions
Orientation
00

Course Logistics & Setup

Introduction to the bootcamp, setting up your development environment, and configuring coding agents for research and development.

Please ensure you have joined the Discord server and verified your email.

Topics

  • Course schedule and timings
  • Discord community access
  • Development workflow with coding agents
  • Compute requirement assessment

Resources

Course DiscordCompute requirement calculatorCoding agent workflow guide
Session 1
01

Transformer Architecture Foundations

Deep dive into the mechanics of the transformer architecture, from tokenization to multi-head attention.

Focus on the journey of a single token through the network.

Topics

  • RNNs to Transformers
  • Self-attention mechanisms
  • Q, K, V intuition
  • Masked attention
  • Multi-head attention implementation

Resources

Transformer visualizerMiro notes on attentionGPT-3 parameter calculation assignment
Session 2
02

Data Curation and Tokenization

Mastering the data pipeline: cleaning, deduplication, and BPE tokenization.

Learn how to define 'usable knowledge' for your model.

Topics

  • Dataset cleaning
  • Byte Pair Encoding (BPE) training
  • Token-to-vector conversion
  • Data pipeline architecture

Resources

Dataset cleaning visualizerBPE training slidesHuggingFace dataset links
Session 3
03

Pretraining the 125M SLM

Executing the pretraining phase for a 125M parameter model from scratch.

Hands-on deployment of your first base model.

Topics

  • Pretraining pipeline
  • Modal volume usage
  • Model checkpointing
  • Initial evaluation

Resources

125M SLM GitHub repoHuggingFace model linksPretraining data pipeline brief
Session 4
04

Fine-tuning and Quantization

Adapting your base model using parameter-efficient fine-tuning techniques.

Learn to balance performance and compute cost.

Topics

  • LoRA and QLoRA
  • Quantization theory
  • Fine-tuning dataset construction
  • Cost optimization

Resources

Fine-tuning GitHub repoLoRA/QLoRA visualizersFine-tuning cost calculator
Session 5
05

Alignment: RLHF, RLAIF, and DPO

Aligning your model with human preferences using advanced feedback techniques.

Implementing preference tuning during live lecture.

Topics

  • RLHF vs RLAIF
  • Direct Preference Optimization (DPO)
  • Data curation for alignment

Resources

RLHF interactive explainerDPO interactive explainerAlignment training instructions
Session 6
06

RAG, RAFT, and Evaluation

Enhancing model utility through retrieval-augmented generation and rigorous evaluation.

Comparing model performance across the SLM arena.

Topics

  • RAG architecture
  • RAFT (Retrieval Augmented Fine-Tuning)
  • SLM evaluation metrics

Resources

SLM ArenaEvaluation Miro board
Session 7
07

Inference Engineering

Optimizing model serving for speed and efficiency.

Measuring the impact of inference tricks.

Topics

  • KV Caching
  • Speculative Decoding
  • Continuous Batching
  • Paged Attention

Resources

KV Cache interactive siteSpeculative decoding visualizerInference pipeline assignment
Session 8
08

Cloud and Edge Deployment

Finalizing your model for production deployment.

Capstone project submission and final review.

Topics

  • Cloud deployment strategies
  • Edge deployment considerations
  • Final project showcase

Resources

Capstone submission portalSession transcripts
Assessments

GPT-3 Parameter Calculation

Hand-calculate the number of parameters in GPT-3 to understand model scaling.

Inference Pipeline Assignment

Build an inference pipeline and measure the performance gains of KV caching, speculative decoding, and batching.

Capstone Project

Deploy a custom-trained SLM and submit your pipeline for final review.