We may earn an affiliate commission when you visit our partners.
Course image
Lucy Park and Sung Kim

In Pretraining LLMs you’ll explore the first step of training large language models using a technique called pretraining. You’ll learn the essential steps to pretrain an LLM, understand the associated costs, and discover how starting with smaller, existing open source models can be more cost-effective.

Read more

In Pretraining LLMs you’ll explore the first step of training large language models using a technique called pretraining. You’ll learn the essential steps to pretrain an LLM, understand the associated costs, and discover how starting with smaller, existing open source models can be more cost-effective.

Pretraining involves teaching an LLM to predict the next token using vast text datasets, resulting in a base model, and this base model requires further fine-tuning for optimal performance and safety. In this course, you’ll learn to pretrain a model from scratch and also to take a model that’s already been pretrained and continue the pretraining process on your own data.

In detail:

1. Explore scenarios where pretraining is the optimal choice for model performance. Compare text generation across different versions of the same model to understand the performance differences between base, fine-tuned, and specialized pre-trained models.

2. Learn how to create a high-quality training dataset using web text and existing datasets, which is crucial for effective model pretraining.

3. Prepare your cleaned dataset for training. Learn how to package your training data for use with the Hugging Face library.

4. Explore ways to configure and initialize a model for training and see how these choices impact the speed of pretraining.

5. Learn how to configure and execute a training run, enabling you to train your own model.

6. Learn how to assess your trained model’s performance and explore common evaluation strategies for LLMs, including important benchmark tasks used to compare different models’ performance.

After taking this course, you’ll be equipped with the skills to pretrain a model—from data preparation and model configuration to performance evaluation.

Enroll now

What's inside

Syllabus

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Provides an introduction to pretraining, which is a fundamental step in training large language models such as GPT-3 and BERT
Instructs learners in the process of creating a high-quality training dataset, which is essential for effective model pretraining
Guides learners on how to prepare their cleaned dataset for training and package it for use with the Hugging Face library, a popular tool for training and deploying machine learning models
Provides a comprehensive understanding of model configuration and initialization for training, allowing learners to optimize the training process
Enables learners to assess the performance of their trained model and explore common evaluation strategies for LLMs, including important benchmark tasks used to compare different models' performance

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Practical pretraining for llm developers

According to students, this course offers a phenomenal deep dive into pretraining Large Language Models, providing highly relevant content crucial for current industry needs. Learners consistently praise the incredibly practical labs and hands-on approach, which effectively solidify understanding and enable pretraining on custom data, particularly leveraging the Hugging Face library. While the course delivers a solid foundation in data preparation, model configuration, and evaluation, a common point highlighted is that it assumes a certain level of prerequisite knowledge in deep learning and Python, making it challenging for beginners. Nevertheless, it is considered extremely valuable for those with prior machine learning experience.
Explanations are clear, topics are current and essential for LLMs.
"Truly exceptional course that covers pretraining a model from scratch and continuing pretraining. The content is cutting-edge."
"Excellent course! The content is highly relevant to current industry needs."
"The instructors explain complex topics like data tokenization and distributed training very clearly."
"The course really helps in understanding the nuances of how LLMs are built from scratch, or how to continue pretraining."
Reinforces concepts with real-world LLM pretraining tasks.
"The labs were incredibly practical, letting me pretrain a small model on custom data."
"I appreciated the practical demonstrations of pretraining and evaluation metrics. The labs are well-designed and reinforce the concepts."
"The hands-on coding and projects are the strongest part of the course for me; it truly solidified my understanding."
"I particularly enjoyed the section on dataset creation – very practical advice for my own work."
Can be fast-paced, some labs might need more detailed troubleshooting.
"My only minor gripe is that some parts felt a bit fast-paced, especially if you're not already familiar with Hugging Face Transformers."
"The labs were difficult to follow without extensive prior knowledge, and I felt lost at times."
"The labs could be more robust, and sometimes the instructions felt a bit vague, leading to frustration. Needs better support for troubleshooting."
Best suited for learners with existing ML/Deep Learning background.
"This course is a phenomenal deep dive... Highly recommended for intermediate learners."
"Good course, though it assumes a certain level of prerequisite knowledge. It doesn't hold your hand."
"The course felt too advanced for me. I have some ML background but found the jump into LLM pretraining too steep."
"While the course covers essential topics, I struggled with some coding assignments without a strong background."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Pretraining LLMs with these activities:
Python Refresher
Brush up on your Python skills before starting the course to ensure a strong foundation and minimize any potential obstacles in your learning journey.
Browse courses on Python
Show steps
  • Review basic syntax and data structures
  • Practice coding exercises
  • Complete online tutorials or refresher courses
  • Build a small project to apply your skills
Subject Matter Experts
Seek out subject matter experts beyond your instructor to gain additional insights and perspectives on the course material, broadening your understanding and expanding your professional network.
Browse courses on Mentorship
Show steps
  • Identify potential mentors in the field
  • Reach out and introduce yourself
  • Schedule meetings or discussions
  • Seek guidance and advice
Peer-to-Peer Training
Engage in peer-to-peer training by mentoring other students in the class, reinforcing your understanding of the course material and developing your leadership and communication skills.
Browse courses on Communication
Show steps
  • Identify a student who could benefit from your support
  • Schedule regular sessions to review course material
  • Provide constructive feedback and guidance
  • Create practice exercises and assignments
Five other activities
Expand to see all activities and additional details
Show all eight activities
GPT-3 Response Generator
Build a GPT-3 based response generator using Hugging Face to practice your text generation skills and improve the quality of your responses in the course.
Browse courses on Hugging Face
Show steps
  • Install Hugging Face and transformers library
  • Load a pre-trained text generator model from Hugging Face
  • Write a function to generate text using the model
  • Create a simple web app that uses your function to generate responses
Fine-tuning for Specific Tasks
Follow guided tutorials to fine-tune pre-trained models for specific tasks, allowing you to apply the concepts learned in the course and enhance your problem-solving skills.
Browse courses on Fine-tuning
Show steps
  • Identify a specific task and dataset
  • Select an appropriate pre-trained model
  • Fine-tune the model on your task
  • Evaluate the performance of the fine-tuned model
Pretrained Model Performance Evaluation
Engage in practice drills to evaluate the performance of different pre-trained models on various benchmark tasks to reinforce your understanding of model evaluation techniques and gain practical experience.
Browse courses on Model Evaluation
Show steps
  • Create a dataset for model evaluation
  • Select relevant evaluation metrics
  • Implement model evaluation code
  • Evaluate and compare the performance of multiple models
  • Analyze the results and identify areas for improvement
State-of-the-Art Pretraining Techniques
Compile resources and articles on state-of-the-art pre-training techniques to expand your knowledge and stay updated with the latest advancements in the field of Large Language Models.
Show steps
  • Conduct a literature search for relevant papers and articles
  • Summarize the key findings and insights
  • Organize and categorize the resources
  • Create a presentation or document to share your findings
Contribute to Hugging Face
Engage with the open-source community by contributing to Hugging Face, the leading platform for Large Language Models, to gain practical experience and deepen your understanding of the ecosystem.
Browse courses on Open Source
Show steps
  • Find an issue or feature to work on
  • Fork the repository
  • Implement your changes
  • Submit a pull request

Career center

Learners who complete Pretraining LLMs will develop knowledge and skills that may be useful to these careers:

Reading list

We've selected 50 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Pretraining LLMs.
The premier applied machine learning masterwork, taking practitioners through intuitive concept breakdowns, production-grade Scikit-Learn workflows, and deep neural architecture implementations.
This widely recognized and comprehensive textbook that provides a deep dive into the subject of language processing. It is suitable for both undergraduate and graduate-level courses and is considered a must-read for gaining a strong theoretical and applied understanding of NLP. The authors are leading researchers in the field, and the book is frequently updated to reflect advancements. The latest draft is available online.
The definitive mathematical canon of modern deep learning, establishing foundational theory across numerical computation, backpropagation optimization, autoencoders, and generative modeling.
A timeless mathematical masterpiece that provides an uncompromising Bayesian and probabilistic foundation for linear classifiers, graphical models, kernel methods, and sampling algorithms.
Gathers hundreds of battle-tested recipes covering network programming, memory management, data structures, and functional decorators for veteran application developers.
Classic textbook on statistical learning. It covers a wide range of topics, including model evaluation, cross-validation, and bootstrapping. The book is written in a clear and concise style, and it is suitable for both beginners and experienced practitioners.
This practical book dives into using transformers, the dominant architecture for many state-of-the-art NLP tasks, with the Hugging Face Transformers library. , It's ideal for data scientists and coders who want to learn how to build and scale models for various NLP applications using this popular library. It covers contemporary topics and is highly relevant for current NLP practice.
Guides deep learning practitioners step-by-step through implementing transformer self-attention, token embeddings, and multi-layer perceptrons in pure PyTorch without relying on high-level wrappers.
The definitive mathematical and theoretical canon of statistical learning, establishing the rigorous analytical foundations of regularized regression, tree ensembles, and high-dimensional inference.
Delivers the canonical blueprint for numeric analysis from the creator of pandas, thoroughly detailing NumPy structures, data cleaning, and high-speed transformations.
A distilled practitioner field guide outlining best practices for the entire machine learning lifecycle, from problem formulation and feature engineering to model deployment and monitoring.
Introduces clean architecture, domain-driven design, and event-driven microservices to Python developers, demonstrating repository patterns and dependency inversion.
Illuminates modern generative neural architectures through celebrated visual diagrams and code workflows, covering contrastive embeddings, semantic search, and retrieval-augmented generation.
Delivers an end-to-end systems architecture guide for building reliable production ML systems, addressing data engineering trade-offs, real-time feature computation, and model drift mitigation.
Examines production-grade engineering patterns for training and serving large language models, addressing distributed GPU training, synthetic data pipelines, and quantitative model evaluations.
Bridges linear algebra, multivariable calculus, vector geometry, and probability directly to fundamental machine learning algorithms like PCA, Gaussian mixture models, and support vector machines.
Delivers an interactive, comprehensive curriculum teaching multi-layer perceptrons, convolutional neural networks, attention mechanisms, and optimization math with runnable multi-framework code.
Bridges the gap between statistical theory and the practical needs of data scientists. It covers essential statistical concepts and provides code examples in both R and Python. It's a very useful reference for applying statistical methods in data analysis.
Demystifies programming for practical utility, guiding beginners through real-world automation projects including web scraping, spreadsheet generation, and file audits.
Offers a comprehensive overview of LLMs, covering their theoretical foundations, practical applications, and future directions.
Instructs data scientists on applied model evaluation, cross-validation, hyperparameter tuning, and pipeline construction through Scikit-Learn maintainers Andreas Müller and Sarah Guido.
This foundational text offers a comprehensive introduction to statistical methods in NLP. It covers the necessary theory and algorithms for building NLP tools, with a rigorous treatment of mathematical and linguistic foundations. While published in 1999, it remains highly relevant for understanding the statistical underpinnings of many NLP techniques and valuable reference for researchers and students alike.
Provides a comprehensive overview of information theory, inference, and learning algorithms. It covers a wide range of topics, including model evaluation, Bayesian inference, and reinforcement learning. The book is written in a clear and concise style, and it is suitable for both beginners and experienced practitioners.
Provides a comprehensive overview of machine learning. It covers a wide range of topics, including model evaluation, supervised learning, and unsupervised learning. The book is written in a clear and concise style, and it is suitable for both beginners and experienced practitioners.
Focuses on static typing, structural subtyping, and defensive design techniques, demonstrating how modern type annotations prevent regressions in enterprise codebases.
Unpacks professional testing methodologies using pytest, explaining fixture management, parameterized tests, coverage tracking, and automated CI test execution.
Serves as a practical introduction to NLP with a strong focus on using the Natural Language Toolkit (NLTK) library in Python. It's excellent for beginners and those who want a hands-on approach to learning NLP concepts through programming examples. It's widely used as a textbook and provides a solid foundation for implementing basic NLP tasks.
Focuses on the fundamental principles of data science and how to think analytically to extract valuable insights from data. It is less technical than some other books and emphasizes the business applications of data science. It is highly recommended for anyone who needs to understand how data science can be applied to solve business problems.
Details battle-tested infrastructure patterns for deploying deep reasoning models, addressing memory bandwidth limits, continuous GPU batching, semantic caching, and operational latency minimization.
Is crucial for data scientists who work with large datasets and distributed systems. It provides a deep understanding of the underlying principles of data systems, including databases, distributed computing, and data processing. It valuable reference for building scalable and reliable data science solutions.
Investigates advanced software craft, detailing packaging distribution, bytecode internals, scaling architectures, and maintainability across large distributed systems.
Investigates the engineering realities of running automated ML pipelines in production, addressing data drift detection, automated retraining loops, telemetry infrastructure, and continuous validation.
Details cloud-native DevOps architectures for orchestrating automated machine learning lifecycles, integrating CI/CD triggers, model registry synchronization, and automated hyperparameter sweep workers.
Bridges volumetric point cloud analysis with Python, teaching LiDAR processing, spatial meshing, and 3D machine vision using modern scientific computing toolchains.
This textbook offers a technical perspective on NLP, synthesizing classical methods with contemporary machine learning techniques. , It covers topics from basic textual analysis to structured representations and semantic analysis, making it suitable for advanced undergraduate and graduate courses. It requires a background in programming and college-level mathematics.
Provides a comprehensive guide to building and evaluating predictive models. It covers various modeling techniques and emphasizes practical considerations such as data preprocessing, feature selection, and model tuning. It valuable resource for practitioners building predictive systems.
Focuses on token segmentation, attention context preservation, and hierarchical chunking, giving deep learning engineers targeted techniques to maximize transformer retrieval accuracy.
Presents a welcoming, foundational ramp into computational logic and programming, establishing syntax literacy, object modeling, and error handling for total beginners.
Analyzes edge-inference architectures for open-weights neural models, tackling parameter quantization, GGUF execution, KV cache memory bottlenecks, and efficient desktop serving.
A/B testing fundamental technique for data-driven decision-making. provides a comprehensive guide to designing, implementing, and analyzing online controlled experiments. It is essential reading for data scientists and analysts involved in product development and experimentation.
Provides a practical guide to machine learning using Python. It covers a wide range of topics, including model evaluation, deep learning, and natural language processing. The book is written in a clear and concise style, and it is suitable for both beginners and experienced practitioners.
Effective communication of data insights critical skill in data science. provides practical guidance and examples on how to create compelling data visualizations that tell a clear and impactful story. It is valuable for anyone who needs to present data to a non-technical audience.
Provides a comprehensive overview of reinforcement learning. It covers a wide range of topics, including model evaluation, Markov decision processes, and deep reinforcement learning. The book is written in a clear and concise style, and it is suitable for both beginners and experienced practitioners.
Demonstrates how to leverage PyTorch 2.0 compiler optimizations and torch.compile to accelerate transformer training, attention layer fusion, and distributed model parallelism.
Provides 50 focused exercise routines and guided breakdowns designed to build instinctive muscle memory across collections, functional pipelines, algorithms, and file I/O.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Pretraining LLMs.
Automated Reasoning with GPT Assistant API: ReAct Agents
Most relevant
Machine Learning Foundations for Product Managers
Most relevant
Foundations of Local Large Language models
Most relevant
Generative AI Essentials: Overview and Impact
Most relevant
Generative AI Teach-Out
Most relevant
Introduction to Large Language Models
Most relevant
Text Generation with Cohere: Recognizing Similarities
Most relevant
Getting Started with Mistral
Most relevant
Generative AI with Large Language Models
Most relevant

Coursera Buyer Protection & Guarantee

Verified partner policies & purchase protections

Accredited University Partner
Free Trial & Audit

7-Day Free Trial & Free Audit

7-day free trial on monthly Coursera Plus subscriptions; free audit option available on most individual courses to explore video lectures and readings at no charge.

Return & Refund Policy

14-Day Refund Guarantee

14-day refund window on annual Coursera Plus subscriptions and single-course purchases prior to certificate issuance. Monthly subscriptions do not offer refunds once billed.

Buyer Protections

Verified Academic & Industry Partner

Accredited university and industry certifications (e.g. Stanford, Google, IBM, Yale), secure SSL payment processing, and verifiable digital certificate links.

Key Purchase Protections
14-day refund window on annual Coursera Plus and single courses
7-day free trial on monthly Coursera Plus subscriptions
Free course audit option for lectures and readings
Verified certificates from top universities & companies
OpenCourser Verified Partner Policy details last reviewed: 2026-10-22
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser